Posted Thu Jul 24, 2008 12:19 PM
Posted Thu Jul 24, 2008 12:38 PM
yuppicide, on Thu Jul 24, 2008 1:19 PM, said:
Posted Thu Jul 24, 2008 1:14 PM
Posted Thu Jul 24, 2008 4:22 PM
COLUPF=66 : COLUBK=130 start pfhline 0 0 31 on drawscreen if !joy0fire then goto start test x=rand if x< 1 || x>30 then goto test pfpixel x 0 off display drawscreen if !joy0up then goto display goto start
Edited by Impaler_26, Thu Jul 24, 2008 4:24 PM.
Posted Thu Jul 24, 2008 5:43 PM
COLUPF=28 : COLUBK=84 start pfhline 0 0 31 on drawscreen if !joy0fire then goto start test x=rand if x< 1 || x>29 then goto test a=x+1 pfpixel x 0 off pfpixel a 0 off display drawscreen if !joy0up then goto display goto start
Edited by Impaler_26, Thu Jul 24, 2008 5:44 PM.
Posted Wed Jul 30, 2008 11:17 AM
REM ** f is my timer to make the line scroll down by one every time ** f=f+1 REM ** g is implementing by one so the line moves down by one space ** g=g+1 REM ** if f=10 then it'll draw the first line ** if f=10 then pfhline 4 g 28 on REM ** if f=20 then it'll clear the first line and draw the second ** if f=20 then pfhline 4 h 28 off: pfhline 4 g 28 on REM ** if f=30 then.. well you get the idea.. so I won't comment each and every one of these ** if f=30 then pfhline 4 h 28 off: pfhline 4 g 28 on if f=40 then pfhline 4 h 28 off: pfhline 4 g 28 on if f=50 then pfhline 4 h 28 off: pfhline 4 g 28 on if f=60 then pfhline 4 h 28 off: pfhline 4 g 28 on if f=70 then pfhline 4 h 28 off: pfhline 4 g 28 on if f=80 then pfhline 4 h 28 off: pfhline 4 g 28 on if f=90 then pfhline 4 h 28 off: pfhline 4 g 28 on if f=100 then pfhline 4 h 28 off: pfhline 4 g 28 on if f=110 then pfhline 4 h 28 off: pfhline 4 g 28 on if f=120 then pfhline 4 h 28 off: pfhline 4 g 28 on if f=130 then pfhline 4 h 28 off: pfhline 4 g 28 on if f=140 then pfhline 4 h 28 off: pfhline 4 g 28 on if f=150 then pfhline 4 h 28 off: pfhline 4 g 28 on if f=160 then pfhline 4 h 28 off: pfhline 4 g 28 on if f=170 then pfhline 4 h 28 off: pfhline 4 g 28 on if f=180 then pfhline 4 h 28 off: pfhline 4 g 28 on REM ** the line is at the bottom so it needs to disappear.. reset f, g, and h to 0 so we can start this all over again and have another line come down at you. ** if f=181 then pfhline 4 h 28 off: f=0: g=0: h=0 REM ** set h=g. Remember g was what line coming down you were on. I need to set this to h because I want to use it above to clear the last line. g=current line, h=last line ** h=g drawscreen
Edited by yuppicide, Wed Jul 30, 2008 12:14 PM.
Posted Wed Jul 30, 2008 8:13 PM
yuppicide, on Wed Jul 30, 2008 1:17 PM, said:
COLUBK = $00 : rem ** black background COLUPF = $1A : rem ** yellow playfield scorecolor = $0E : rem ** white score rem ** f is the frame counter f = 0 : rem ** initialize the frame counter rem ** h is the horizontal line number h = 0 : rem ** initialize the horizontal line number rem ** s is the speed setting, in frames s = 20 : rem ** set the initial speed to 20 frames rem ** changing s to a smaller number will be faster rem ** changing s to a larger number will be slower rem ** l is the line counter (the number of lines that have fallen) l = 0 : rem ** initialize the line counter score = 0 : rem ** initialize the score (total lines fallen) loop_1 pfhline 4 h 28 on : rem ** draw a horizontal line loop_2 drawscreen : rem ** display the screen as currently defined f = f + 1 : if f <> s then loop_2 : rem ** display the current screen again f = 0 : rem ** reset f after every s frames pfhline 4 h 28 off : rem ** erase the old horizontal line h = h + 1 : rem ** increment the horizontal line number rem ** reset h if the line just scrolled off the screen rem ** and then increment the line counter and the score if h = 11 then h = 0 : l = l + 1 : score = score + 1 rem ** speed up a little bit after every 10 lines if l = 10 then l = 0 : s = s - 1 rem ** check the speed against some desired maximum setting if s < 3 then s = 3 goto loop_1 : rem ** go draw the new horizontal lineMichael
Posted Wed Jul 30, 2008 9:45 PM
Posted Thu Jul 31, 2008 7:26 AM
Edited by yuppicide, Thu Jul 31, 2008 7:34 AM.
Posted Thu Jul 31, 2008 10:17 AM
yuppicide, on Thu Jul 31, 2008 9:26 AM, said:
Posted Thu Jul 31, 2008 11:17 AM
kenfused, on Thu Jul 31, 2008 11:17 AM, said:
yuppicide, on Thu Jul 31, 2008 9:26 AM, said:
Posted Thu Jul 31, 2008 12:34 PM
SeaGtGruff, on Thu Jul 31, 2008 12:17 PM, said:
Posted Thu Jul 31, 2008 1:27 PM
SeaGtGruff, on Thu Jul 31, 2008 1:47 PM, said:
Posted Thu Jul 31, 2008 8:32 PM
stephena, on Thu Jul 31, 2008 3:27 PM, said:
SeaGtGruff, on Thu Jul 31, 2008 1:47 PM, said:
lda #1 sta CTRLPF ora INTIM sta randSo if that's right, bB uses whatever value happens to be in INTIM when that section of startup code is being performed, but does "ora #1"* with it to make sure rand doesn't get seeded with 0 (since that would "break" rand).
lda INTIM ora #1 sta randSo to more accurately emulate the randomness of the Atari, not only would you want to initialize the TIA registers and RAM addresses to random values, but you would also want to set the timer to a random value. Which raises the question, if the timer is random on powerup, does that mean the timer *interval* is also random? That is, if the timer would be counting down from whatever initial value it contained on powerup, could it potentially be counting down at any of the intervals (i.e., 1 cycle, 8 cycles, 64 cycles, or 1024 cycles)? Of course, once the timer counted down past 0, it would continue counting down at the 1-cycle rate.
Posted Fri Aug 1, 2008 4:49 AM
SeaGtGruff, on Thu Jul 31, 2008 11:02 PM, said:
Edited by stephena, Fri Aug 1, 2008 6:20 AM.
Posted Fri Aug 1, 2008 9:19 AM
stephena, on Fri Aug 1, 2008 5:49 AM, said:
LDX #unknown_value_1 LDA #unknown_value_2 STA TIM1T,XI presume this also means the RIOT's timer *flag* might be on or off on powerup, just as each of the 6507's processor flags might be on or off, and just as the program counter could be pointing anywhere, etc.
Edited by SeaGtGruff, Fri Aug 1, 2008 9:22 AM.
Posted Fri Aug 1, 2008 6:03 PM
SeaGtGruff, on Fri Aug 1, 2008 11:19 AM, said:
0 members, 0 guests, 0 anonymous users