Posted Mon Sep 26, 2011 3:31 PM
Posted Mon Sep 26, 2011 7:30 PM
Nukey Shay, on Sun Feb 6, 2011 11:24 PM, said:
Posted Mon Sep 26, 2011 9:55 PM
Posted Mon Sep 26, 2011 10:52 PM
Posted Tue Sep 27, 2011 2:57 AM
Edited by Random Terrain, Tue Sep 27, 2011 3:21 AM.
Posted Tue Sep 27, 2011 5:57 AM
Random Terrain, on Tue Sep 27, 2011 2:57 AM, said:
Posted Tue Sep 27, 2011 6:11 AM
Schizophretard, on Tue Sep 27, 2011 5:57 AM, said:
Posted Tue Sep 27, 2011 10:01 AM
Edited by theloon, Tue Sep 27, 2011 10:01 AM.
Posted Tue Sep 27, 2011 12:17 PM
theloon, on Tue Sep 27, 2011 10:01 AM, said:
Posted Tue Sep 27, 2011 1:00 PM
dim atari7800=z rem ** this has to happen before a drawscreen or subroutine, or anything rem ** else that may obliterate temp1... atari7800=temp1&1 rem ** uncomment the following line to test 7800 pausing in stella. rem ** changing from color to BW will pause. rem ** switching back to color will remain paused. rem ** changing from color to BW will unpause. rem ** switching back to color will will remain unpaused. rem atari7800=1 rem ** For a 2600 atari7800 is now 0. For a 7800 atari7800 is now 1. scorecolor=$0a player0: %01111110 %11000011 %11000011 %00000000 %00000000 %01100110 %01100110 end player0x=40:player0y=40 mainloop COLUBK=0 COLUP0=$0a player0x=player0x+1 drawscreen rem **2600 pause handling... if atari7800=0 && switchbw then goto pausegame rem **7800 pause handling... if atari7800=1 && switchbw then atari7800=%00000011: goto pausegame if atari7800>1 && !switchbw then atari7800=1 goto mainloop pausegame COLUBK=$a4 COLUP0=$0a drawscreen rem ** this code should be at the bottom of the pause loop rem ** 2600 pause handling... if atari7800=0 && !switchbw then goto mainloop if atari7800=0 then goto pausegame rem ** 7800 pause handling... if atari7800=%00000011 && switchbw then goto pausegame atari7800=%00000111 if switchbw then goto mainloop goto pausegame
Posted Tue Sep 27, 2011 1:21 PM
RevEng, on Tue Sep 27, 2011 1:00 PM, said:
Posted Tue Sep 27, 2011 1:42 PM
Posted Tue Sep 27, 2011 1:52 PM
RevEng, on Tue Sep 27, 2011 1:42 PM, said:
Edited by Random Terrain, Tue Sep 27, 2011 1:55 PM.
Posted Tue Sep 27, 2011 5:27 PM
Posted Tue Sep 27, 2011 10:43 PM
RevEng, on Tue Sep 27, 2011 5:27 PM, said:
Posted Wed Sep 28, 2011 12:21 AM
RevEng, on Tue Sep 27, 2011 5:27 PM, said:
Posted Wed Sep 28, 2011 1:36 AM
Random Terrain, on Tue Sep 27, 2011 2:57 AM, said:
;===============================================================
;===============================================================
;
;
; Create aliases for variables.
;
;
;----------------------------------------------------------------
;
; (You can have more than one alias for each variable.)
;
;----------------------------------------------------------------
;----------------------------------------------------------------
;
; Pause position.
;
;
dim Bit0_Pause_Position = z
;----------------------------------------------------------------
;
; Pause Check.
;
;
dim Bit1_Pause_Check = z
;===============================================================
;===============================================================
;
;
;
; START/RESTART SETUP
;
;
;
;===============================================================
;===============================================================
scorecolor = $0A
player0:
%01111110
%11000011
%11000011
%00000000
%00000000
%01100110
%01100110
end
player0x = 2 : player0y = 40 : a = 1
;===============================================================
;===============================================================
;
;
; Remembers position of COLOR/BW switch.
;
;
Bit0_Pause_Position{0} = 0
if switchbw then Bit0_Pause_Position{0} = 1
;===============================================================
;===============================================================
;
;
;
; MAIN LOOP
;
;
;
;===============================================================
;===============================================================
__Main_Loop
COLUBK = 0
COLUP0 = $0A
player0x = player0x + a
if player0x < 2 then a = 1
if player0x > 150 then a = 255
drawscreen
;===============================================================
;===============================================================
;
;
; Pause check.
;
;
;----------------------------------------------------------------
;----------------------------------------------------------------
;
; Checks current position of COLOR/BW switch.
;
;
Bit1_Pause_Check{1} = 0
if switchbw then Bit1_Pause_Check{1} = 1
;----------------------------------------------------------------
;
; Compares bits to see if COLOR/BW switch has moved.
; ---- If the switch has moved, the game is paused.
;
;
if Bit0_Pause_Position{0} then if !Bit1_Pause_Check{1} then goto __Pause_Game
if !Bit0_Pause_Position{0} then if Bit1_Pause_Check{1} then goto __Pause_Game
goto __Main_Loop
__Pause_Game
COLUBK = $A4
COLUP0 = $0A
drawscreen
;===============================================================
;===============================================================
;
;
; Unpause when fire button is pressed.
;
;
;----------------------------------------------------------------
;----------------------------------------------------------------
;
; If fire button is not pressed, skip.
;
;
if !joy0fire then goto __Skip_Pause_Fire
;----------------------------------------------------------------
;
; Remembers position of COLOR/BW switch and returns to game.
;
;
Bit0_Pause_Position{0} = 0
if switchbw then Bit0_Pause_Position{0} = 1
goto __Main_Loop
__Skip_Pause_Fire
goto __Pause_Game
pause_test_01.bin 4K
53 downloadsEdited by Random Terrain, Wed Sep 28, 2011 3:27 AM.
Posted Wed Sep 28, 2011 3:52 AM
Posted Wed Sep 28, 2011 3:58 AM
Schizophretard, on Wed Sep 28, 2011 3:52 AM, said:
Edited by Random Terrain, Wed Sep 28, 2011 3:59 AM.
Posted Wed Sep 28, 2011 3:58 AM
Posted Wed Sep 28, 2011 4:07 AM
Posted Wed Sep 28, 2011 4:15 AM
Posted Wed Sep 28, 2011 4:48 AM
Posted Wed Sep 28, 2011 5:05 AM
Schizophretard, on Wed Sep 28, 2011 4:48 AM, said:
Posted Wed Sep 28, 2011 7:22 AM
Random Terrain, on Wed Sep 28, 2011 5:05 AM, said:
Schizophretard, on Wed Sep 28, 2011 4:48 AM, said:
Edited by Random Terrain, Wed Sep 28, 2011 7:23 AM.
0 members, 0 guests, 0 anonymous users