compiles under linux

This commit is contained in:
2024-11-27 11:26:56 -05:00
parent ca41c634f0
commit f5c5ac4736
2 changed files with 343 additions and 345 deletions
+343 -345
View File
@@ -4,26 +4,26 @@
;あめでと ;あめでと
;--------------------------------------------------- ;---------------------------------------------------
icl 'lib/atarisys.asm' icl 'lib/ATARISYS.ASM'
icl 'lib/macro.asm' icl 'lib/MACRO.ASM'
display=$a000 display=$a000
screenWidth = 80 ;in pixels screenWidth = 80 ;in pixels
maxLines = 55 ; number of lines on the screen (must be odd) maxLines = 55 ; number of lines on the screen (must be odd)
spawnProbability = (256*1/5) spawnProbability = (256*1/5)
margin = 2 ; top and bottom screen safety margin margin = 2 ; top and bottom screen safety margin
racquetPosMin = $2 ; min position of the paddle moved by the user racquetPosMin = $2 ; min position of the paddle moved by the user
racquetPosMax = screenWidth-8 ; max position of the paddle moved by the user racquetPosMax = screenWidth-8 ; max position of the paddle moved by the user
racquetSize = 10 racquetSize = 10
maxSpeed = 2; maximum speed of a ball. must be power of 2 ('and #' used) maxSpeed = 2 ; maximum speed of a ball. must be power of 2 ('and #' used)
maxBalls = 100 ; maximum number of moving balls, <$80 (bpl used!) maxBalls = 100 ; maximum number of moving balls, <$80 (bpl used!)
maxMemory = 7 ; number of saved pixel positions maxMemory = 7 ; number of saved pixel positions
;Beware! For easier calc somewhere it uses "modulo maxMemory" ; Beware! For easier calc somewhere it uses "modulo maxMemory"
;calculations and therefore this value must be a power of 2! ; calculations and therefore this value must be a power of 2 -1 (?)!
maxBrickLines = 14 ; maximum number of lines of bricks to be eradicated maxBrickLines = 14 ; maximum number of lines of bricks to be eradicated
.zpvar xpos ypos .word = $80 ; position of the ball .zpvar xpos ypos .word = $80 ; position of the ball
.zpvar colour .byte ; colour of the pixel to plot .zpvar color .byte ; color of the pixel to plot
.zpvar deXpos deYpos .byte ;position for deletion .zpvar deXpos deYpos .byte ;position for deletion
.zpvar dX dY .word ;main loop shortcuts to the table values .zpvar dX dY .word ;main loop shortcuts to the table values
;.zpvar dx dy .word ;delta ;.zpvar dx dy .word ;delta
@@ -38,18 +38,18 @@ maxBrickLines = 14 ; maximum number of lines of bricks to be eradicated
org $2000 org $2000
;--------------------------------------------------- ;---------------------------------------------------
dl dl
.by $20 .by $20
dta $42,a(statusBuffer) dta $42,a(statusBuffer)
.by $80+$50 .by $80+$50
dta $4f+$20,a(display) ;VSCROLL dta $4f+$20,a(display) ;VSCROLL
:((maxlines-1)/2) dta a($2f8f) :((maxlines-1)/2) dta a($2f8f)
;---- ;----
.by $42+$10 ;Hscroll .by $42+$10 ;Hscroll
DLracquetAddr0 DLracquetAddr0
.wo racquetDisp .wo racquetDisp
.by $41 .by $41
.wo dl .wo dl
;--------------------------------------------------- ;---------------------------------------------------
racquetDisp racquetDisp
:42 .byte $0 :42 .byte $0
@@ -58,7 +58,7 @@ racquetDisp
;-------------------------------------------------- ;--------------------------------------------------
statusBuffer statusBuffer
dta d" Lives: 5 HS: 000000 Score: 000000 " dta d" Lives: 5 HS: 000000 Score: 000000 "
score=statusBuffer+33 score=statusBuffer+33
HiScore=statusBuffer+17 HiScore=statusBuffer+17
Lives=statusBuffer+8 Lives=statusBuffer+8
@@ -142,16 +142,16 @@ JNotFire
:4 lsr :4 lsr
clc clc
adc #'0' adc #'0'
sta hexDump sta hexDump
lda racquetPos lda racquetPos
and #$0F and #$0F
clc clc
adc #'0' adc #'0'
sta hexDump+1 sta hexDump+1
mva #0 dliCount mva #0 dliCount
mva #13 VSCROL mva #13 VSCROL
jmp XITVBV jmp XITVBV
;-------------------------------------------------- ;--------------------------------------------------
@@ -172,7 +172,7 @@ DLI
txa txa
asl asl
asl asl
;lda brickColourTab,x ;lda brickcolorTab,x
sta COLBAK sta COLBAK
inx inx
@@ -187,7 +187,7 @@ main
loop loop
mva #maxBalls-1 currBall mva #maxBalls-1 currBall
jsr cycleColours jsr cyclecolors
flight flight
@@ -219,10 +219,10 @@ flight
lda memCycleTable,x lda memCycleTable,x
clc clc
adc #1 ;next position in the table adc #1 ;next position in the table
cmp #maxMemory cmp #maxMemory
bne notMaxMem bne notMaxMem
lda #0 lda #0
notMaxMem notMaxMem
sta memCycleTable,x ; memCycleTable saved sta memCycleTable,x ; memCycleTable saved
tax tax
lda xposMemTableAdrL,x lda xposMemTableAdrL,x
@@ -249,23 +249,23 @@ notMaxMem
; deyxpos, deypos (.byte) - pixel position ; deyxpos, deypos (.byte) - pixel position
;-------------------------------------------------- ;--------------------------------------------------
; let's calculate coordinates from xpos and ypos ; let's calculate coordinates from xpos and ypos
;lda dexpos ;lda dexpos
lsr lsr
tay tay
;--- ;---
;ldx deypos ;ldx deypos
lda lineAdrL,x lda lineAdrL,x
sta temp sta temp
lda lineAdrH,x lda lineAdrH,x
sta temp+1 sta temp+1
lda dexpos lda dexpos
and #$01 and #$01
tax tax
lda (temp),y lda (temp),y
and debittable,x and debittable,x
sta (temp),y sta (temp),y
;move the ball!!! ;move the ball!!!
adw xpos dX xpos adw xpos dX xpos
@@ -383,141 +383,141 @@ noRight
; high byte is the integer position ; high byte is the integer position
; low byte is the "fractional" part ; low byte is the "fractional" part
; let's calculate coordinates from xpos and ypos ; let's calculate coordinates from xpos and ypos
lda xpos+1 lda xpos+1
lsr lsr
tay tay
;--- ;---
ldx ypos+1 ldx ypos+1
lda lineAdrL,x lda lineAdrL,x
sta temp sta temp
lda lineAdrH,x lda lineAdrH,x
sta temp+1 sta temp+1
ldx colour ldx color
lda xpos+1 lda xpos+1
and #$01 and #$01
bne pRightNibble bne pRightNibble
pLeftNibble pLeftNibble
lda (temp),y lda (temp),y
sta collisionCheck sta collisionCheck
and #$0F and #$0F
ora LNColtable,x ora LNColtable,x
sta (temp),y sta (temp),y
lda collisionCheck lda collisionCheck
and #$F0 and #$F0
cmp #%10000000 cmp #%10000000
jne noCollision jne noCollision
jmp plotEnd ;unconditional branch jmp plotEnd ;unconditional branch
pRightNibble pRightNibble
lda (temp),y lda (temp),y
sta collisionCheck sta collisionCheck
and #$F0 and #$F0
ora RNColtable,x ora RNColtable,x
sta (temp),y sta (temp),y
lda collisionCheck lda collisionCheck
and #$0F and #$0F
cmp #%00001000 cmp #%00001000
jne noCollision jne noCollision
plotEnd plotEnd
lda ypos+1 lda ypos+1
cmp #maxLines+margin-2-1 cmp #maxLines+margin-2-1
jcs noCollision ;ball is outside the screen! jcs noCollision ;ball is outside the screen!
;switch direction, Charles ;switch direction, Charles
; an idea for assuming which direction to switch - dX or dY? ; an idea for assuming which direction to switch - dX or dY?
; on a diagram below in the middle there is an approached brick ; on a diagram below in the middle there is an approached brick
/* /*
\ / \ /
\-dY / \-dY /
\ / \ /
-dX [] -dX -dX [] -dX
/ \ / \
/-dY \ /-dY \
/ \ / \
*/ */
; it means: ; it means:
; if |dX|>|dY| then dX == -dX ; if |dX|>|dY| then dX == -dX
; else dY == -dY ; else dY == -dY
; get absolute values ; get absolute values
lda dX+1 lda dX+1
bpl dXpositive bpl dXpositive
;dX is negative here ;dX is negative here
lda dY+1 lda dY+1
bpl dXneg_dYpos bpl dXneg_dYpos
;dX and dY are negative here ;dX and dY are negative here
cmp dX+1 cmp dX+1
bcc dX_gr_dY__dX_dYneg bcc dX_gr_dY__dX_dYneg
; |dY| >= |dX| ; hour 5 ; |dY| >= |dX| ; hour 5
negw dY negw dY
jmp bounceDone jmp bounceDone
dX_gr_dY__dX_dYneg dX_gr_dY__dX_dYneg
; hour 4 ; hour 4
negw dX negw dX
jmp bounceDone jmp bounceDone
dXneg_dYpos dXneg_dYpos
; dY in A ; dY in A
clc clc
adc dX+1 adc dX+1
bpl dY_gr_dX__dXneg_dYpos bpl dY_gr_dX__dXneg_dYpos
; |dX| > |dy|; hour 2 ; |dX| > |dy|; hour 2
negw dX negw dX
jmp bounceDone jmp bounceDone
dY_gr_dX__dXneg_dYpos dY_gr_dX__dXneg_dYpos
; hour 1 ; hour 1
negw dY negw dY
jmp bounceDone jmp bounceDone
dXpositive dXpositive
lda dY+1 lda dY+1
bpl dX_dYpositive bpl dX_dYpositive
;dX positive, dY negative ;dX positive, dY negative
clc clc
adc dX+1 adc dX+1
bpl dX_gr_dY__dXpos_dYneg bpl dX_gr_dY__dXpos_dYneg
; hour 7 ; hour 7
negw dY negw dY
jmp bounceDone jmp bounceDone
dX_gr_dY__dXpos_dYneg dX_gr_dY__dXpos_dYneg
; hour 8 ; hour 8
negw dX negw dX
jmp bounceDone jmp bounceDone
dX_dYpositive dX_dYpositive
;(dY+1)* is in A ;(dY+1)* is in A
cmp dX+1 cmp dX+1
bcc dX_gr_dY__dX_dYpos bcc dX_gr_dY__dX_dYpos
; dY > dX ; hour 11 ; dY > dX ; hour 11
negw dY negw dY
jmp bounceDone jmp bounceDone
dX_gr_dY__dX_dYpos dX_gr_dY__dX_dYpos
; dY < dX ; hour 10 ; dY < dX ; hour 10
negw dX negw dX
bounceDone bounceDone
jsr ScoreUp jsr ScoreUp
dew BricksInLevel dew BricksInLevel
lda BricksInLevel lda BricksInLevel
ora BricksInLevel+1 ora BricksInLevel+1
bne NoLevelEnd bne NoLevelEnd
; all bricks gone - level ended! ; all bricks gone - level ended!
jmp gameOver jmp gameOver
NoLevelEnd NoLevelEnd
;spawn the new bally ;spawn the new bally
; if there is still an empty slot for a new ball somewhere... ; if there is still an empty slot for a new ball somewhere...
;lda RANDOM ;lda RANDOM
;cmp #spawnProbability ;cmp #spawnProbability
;bcs noCollision ;bcs noCollision
lda colour lda color
cmp #1 cmp #1
bne noCollision bne noCollision
eXistenZcReate eXistenZcReate
;creates a new ball ;creates a new ball
@@ -548,13 +548,13 @@ eXistenZcReate
; random initial speed and direction ; random initial speed and direction
lda random lda random
bpl dXplus bpl dXplus
lda #-1 lda #-1
sta dxTableH,x sta dxTableH,x
bne dXlower bne dXlower
dXplus dXplus
lda #1 lda #1
sta dxTableH,x sta dxTableH,x
dXlower dXlower
lda random lda random
@@ -563,7 +563,7 @@ dXlower
;randomize 1 maxSpeed-1 ;dy can not be too small or the game would take forever ;randomize 1 maxSpeed-1 ;dy can not be too small or the game would take forever
lda #1 lda #1
sta dyTableH,x sta dyTableH,x
lda random lda random
sta dyTableL,x sta dyTableL,x
@@ -618,16 +618,16 @@ flightLoopEnd
endOfBallzLoop endOfBallzLoop
;pause ;pause
dec currBall dec currBall
jpl flight jpl flight
pause 1 ;all balls pause 1 ;all balls
bit AutoPlay bit AutoPlay
bpl NoAuto bpl NoAuto
pause 2 ;additional pause if auto play mode pause 2 ;additional pause if auto play mode
NoAuto NoAuto
lda eXistenZstackPtr lda eXistenZstackPtr
@@ -642,20 +642,20 @@ DecreaseLives
NextLive NextLive
ldy #maxBalls ldy #maxBalls
sty eXistenZstackPtr sty eXistenZstackPtr
;OK, one ball starts! ;OK, one ball starts!
lda eXistenZstack,Y lda eXistenZstack,Y
dey dey
sty eXistenZstackPtr sty eXistenZstackPtr
tax tax
jsr randomStart ;just one random pixxxel jsr randomStart ;just one random pixxxel
;previously the whole band of ballz ;previously the whole band of ballz
jmp loop jmp loop
;game over ;game over
gameOver gameOver
jsr HiScoreCheckWrite jsr HiScoreCheckWrite
lda RANDOM lda RANDOM
and #$07 and #$07
sta COLPM0 sta COLPM0
jmp gameOver jmp gameOver
;------------------- ;-------------------
@@ -670,60 +670,60 @@ delayLoop
fatplot fatplot
; xpos, ypos (.byte) - pixel position ; xpos, ypos (.byte) - pixel position
; xpos<80 ; xpos<80
; pixel colour in "colour" ; pixel color in "color"
;-------------------------------------------------- ;--------------------------------------------------
; let's calculate coordinates from xpos and ypos ; let's calculate coordinates from xpos and ypos
lda xpos lda xpos
lsr lsr
tay tay
;--- ;---
ldx ypos ldx ypos
lda lineAdrL,x lda lineAdrL,x
sta temp sta temp
lda lineAdrH,x lda lineAdrH,x
sta temp+1 sta temp+1
ldx colour ldx color
lda xpos lda xpos
and #$01 and #$01
bne fpRightNibble bne fpRightNibble
fpLeftNibble fpLeftNibble
lda (temp),y lda (temp),y
and #$0F and #$0F
ora LNColtable,x ora LNColtable,x
sta (temp),y sta (temp),y
rts rts
fpRightNibble fpRightNibble
lda (temp),y lda (temp),y
and #$F0 and #$F0
ora RNColtable,x ora RNColtable,x
sta (temp),y sta (temp),y
rts rts
;-------------------------------------------------- ;--------------------------------------------------
fatdeplot fatdeplot
; deyxpos, deypos (.byte) - pixel position ; deyxpos, deypos (.byte) - pixel position
;-------------------------------------------------- ;--------------------------------------------------
; let's calculate coordinates from xpos and ypos ; let's calculate coordinates from xpos and ypos
lda dexpos lda dexpos
lsr lsr
tay tay
;--- ;---
ldx deypos ldx deypos
lda lineAdrL,x lda lineAdrL,x
sta temp sta temp
lda lineAdrH,x lda lineAdrH,x
sta temp+1 sta temp+1
lda dexpos lda dexpos
and #$01 and #$01
tax tax
lda (temp),y lda (temp),y
and debittable,x and debittable,x
sta (temp),y sta (temp),y
rts rts
;-------------------------------------------------- ;--------------------------------------------------
clearDeadBall clearDeadBall
;-------------------------------------------------- ;--------------------------------------------------
@@ -856,46 +856,46 @@ higher6
;-------------------------------------------------- ;--------------------------------------------------
clearScreen clearScreen
;-------------------------------------------------- ;--------------------------------------------------
lda #0 lda #0
tax tax
Loopi1 @
:(maxLines*40/256+1) sta display+$100*#,x :(maxLines*40/256+1) sta display+$100*#,x
inx inx
bne Loopi1 bne @-
rts rts
;-------------------------------------------------- ;--------------------------------------------------
cycleColoursReset cyclecolorsReset
ldy #6 ldy #6
cycleRloop cycleRloop
lda colourCycleTabReset,y lda colorCycleTabReset,y
sta colourCycleTab,y sta colorCycleTab,y
dey dey
bpl cycleRloop bpl cycleRloop
mva #0 colour mva #0 color
;-------------------------------------------------- ;--------------------------------------------------
cycleColours cyclecolors
;-------------------------------------------------- ;--------------------------------------------------
inc colour inc color
lda colour lda color
cmp #8 cmp #8
bne noColourReset bne nocolorReset
mva #1 colour mva #1 color
noColourReset nocolorReset
ldy #6 ldy #6
cycleCloop cycleCloop
lda colourCycleTab,y lda colorCycleTab,y
;sta COLPM1,y ;sta COLPM1,y
sta PCOLR1,y sta PCOLR1,y
dey dey
bpl cycleCloop bpl cycleCloop
;shift colours ;shift colors
/* /*
2 2
2 4 2 4
2 4 6 2 4 6
2 4 6 8 2 4 6 8
2 4 6 8 10 2 4 6 8 10
2 4 6 8 10 12 2 4 6 8 10 12
2 4 6 8 10 12 14 2 4 6 8 10 12 14
4 6 8 10 12 14 2 4 6 8 10 12 14 2
@@ -906,95 +906,95 @@ cycleCloop
14 2 4 6 8 10 12 14 2 4 6 8 10 12
2 4 6 8 10 12 14 2 4 6 8 10 12 14
4 6 8 10 12 14 4 6 8 10 12 14
6 8 10 12 14 6 8 10 12 14
8 10 12 14 8 10 12 14
10 12 14 10 12 14
12 14 12 14
14 14
261 262 263 264 265 266 267 261 262 263 264 265 266 267
*/ */
cct = colourCycleTab cct = colorCycleTab
ldx cct+6 ldx cct+6
mva cct+5 cct+6 mva cct+5 cct+6
mva cct+4 cct+5 mva cct+4 cct+5
mva cct+3 cct+4 mva cct+3 cct+4
mva cct+2 cct+3 mva cct+2 cct+3
mva cct+1 cct+2 mva cct+1 cct+2
mva cct+0 cct+1 mva cct+0 cct+1
stx cct+0 stx cct+0
rts rts
colourCycleTab colorCycleTab
.by 14,2,4,6,8,10,12 .by 14,2,4,6,8,10,12
colourCycleTabReset colorCycleTabReset
.by 14,2,4,6,8,10,12 .by 14,2,4,6,8,10,12
brickColourTab brickcolorTab
.by 0 .by 0
;-------------------------------------------------- ;--------------------------------------------------
initialize initialize
;-------------------------------------------------- ;--------------------------------------------------
mva #$00 PCOLR0 ; = $02C0 ;- - rejestr-cień COLPM0 mva #$00 PCOLR0 ; = $02C0 ;- - rejestr-cień COLPM0
jsr cycleColoursReset jsr cyclecolorsReset
mva #$7C COLBAKS mva #$7C COLBAKS
mva #0 dliCount mva #0 dliCount
jsr ScoreClear jsr ScoreClear
mva #"9" Lives mva #"9" Lives
jsr clearscreen jsr clearscreen
jsr drawBricks jsr drawBricks
lda dmactls lda dmactls
and #$fc and #$fc
ora #$02 ; normal screen width ora #$02 ; normal screen width
;ora #$01 ; narrow screen width ;ora #$01 ; narrow screen width
sta dmactls sta dmactls
mwa #dl dlptrs mwa #dl dlptrs
vdli DLI vdli DLI
; prepare mem address tables (for "snake" routine) ; prepare mem address tables (for "snake" routine)
;first address initialized ;first address initialized
mva #<xposMemTable xposMemTableAdrL mva #<xposMemTable xposMemTableAdrL
mva #>xposMemTable xposMemTableAdrH mva #>xposMemTable xposMemTableAdrH
mva #<yposMemTable yposMemTableAdrL mva #<yposMemTable yposMemTableAdrL
mva #>yposMemTable yposMemTableAdrH mva #>yposMemTable yposMemTableAdrH
;now add maxBalls to the following addresses ;now add maxBalls to the following addresses
;just take the previous one and add "maxBalls" ;just take the previous one and add "maxBalls"
ldx #0 ldx #0
initLoop1 initLoop1
clc clc
lda xposMemTableAdrL,x lda xposMemTableAdrL,x
adc #<maxBalls ; maxBalls <$80 adc #<maxBalls ; maxBalls <$80
sta xposMemTableAdrL+1,x sta xposMemTableAdrL+1,x
lda xposMemTableAdrH,x lda xposMemTableAdrH,x
adc #>maxBalls ; maxBalls <$80, so it is == 0 adc #>maxBalls ; maxBalls <$80, so it is == 0
sta xposMemTableAdrH+1,x sta xposMemTableAdrH+1,x
clc clc
lda yposMemTableAdrL,x lda yposMemTableAdrL,x
adc #<maxBalls ; maxBalls <$80 adc #<maxBalls ; maxBalls <$80
sta yposMemTableAdrL+1,x sta yposMemTableAdrL+1,x
lda yposMemTableAdrH,x lda yposMemTableAdrH,x
adc #>maxBalls ; maxBalls <$80, so it is == 0 adc #>maxBalls ; maxBalls <$80, so it is == 0
sta yposMemTableAdrH+1,x sta yposMemTableAdrH+1,x
inx inx
cpx #maxMemory-1 cpx #maxMemory-1
bne initLoop1 bne initLoop1
;snake memory addressess initialized! ;snake memory addressess initialized!
;clear the balleXistenZ (nothing is bouncing!) ;clear the balleXistenZ (nothing is bouncing!)
;and other tables ;and other tables
ldx #0 ldx #0
txa txa
eXistenZclearLoop eXistenZclearLoop
sta balleXistenZ,x sta balleXistenZ,x
sta dxTableL,x sta dxTableL,x
sta dxTableH,x sta dxTableH,x
sta dyTableL,x sta dyTableL,x
sta dyTableH,x sta dyTableH,x
@@ -1004,10 +1004,10 @@ eXistenZclearLoop
sta yposTableH,x sta yposTableH,x
sta memCycleTable,x sta memCycleTable,x
inx inx
cpx #maxBalls cpx #maxBalls
bne eXistenZclearLoop bne eXistenZclearLoop
sta balleXistenZcatch sta balleXistenZcatch
dex dex
@@ -1025,30 +1025,28 @@ eXistenZstackFill
;sty clearPtr ;sty clearPtr
;OK, one ball starts! ;OK, one ball starts!
;ldy eXistenZstackPtr ;ldy eXistenZstackPtr
lda eXistenZstack,Y lda eXistenZstack,Y
dey dey
sty eXistenZstackPtr sty eXistenZstackPtr
tax
tax jsr randomStart ;just one random pixxxel
;previously the whole band of ballz
jsr randomStart ;just one random pixxxel ;VBI
;previously the whole band of ballz mva #screenWidth/2 racquetPos
;VBI
mva #screenWidth/2 racquetPos
vmain vint,7 vmain vint,7
lda #$0 ;+GTIACTLBITS lda #$0 ;+GTIACTLBITS
; sta PRIOR ; sta PRIOR
sta GPRIOR sta GPRIOR
sta COLBAKS sta COLBAKS
mva #1 colour mva #1 color
rts rts
;-------------------------------------------------- ;--------------------------------------------------
drawBricks drawBricks
;-------------------------------------------------- ;--------------------------------------------------
@@ -1057,24 +1055,24 @@ drawBricks
; for x=margin to screenWidth-margin: ; for x=margin to screenWidth-margin:
; for y=margin to maxBrickLines+margin: ; for y=margin to maxBrickLines+margin:
; fatplot(x,y) ; fatplot(x,y)
mva #8 colour mva #8 color
mva #margin*2 ypos mva #margin*2 ypos
drawBricksLoopY drawBricksLoopY
mva #margin*3 xpos mva #margin*3 xpos
drawBricksLoop drawBricksLoop
jsr fatplot jsr fatplot
inc xpos inc xpos
lda xpos lda xpos
cmp #screenWidth-margin*3 cmp #screenWidth-margin*3
bne drawBricksLoop bne drawBricksLoop
inc ypos inc ypos
lda ypos lda ypos
cmp #maxBrickLines+margin*2 cmp #maxBrickLines+margin*2
bne drawBricksLoopY bne drawBricksLoopY
; set number of bricks in this level ; set number of bricks in this level
mwa #952 BricksInLevel mwa #952 BricksInLevel
rts rts
;-------------------------------------------------- ;--------------------------------------------------
randomStart randomStart
; X - ball number ; X - ball number
@@ -1084,10 +1082,10 @@ randomStart
;randomize margin $ff-margin ;randomize margin $ff-margin
lda #40 lda #40
sta xposTableH,x sta xposTableH,x
;randomize margin*2+maxBrickLines maxLines-margin*4 ;randomize margin*2+maxBrickLines maxLines-margin*4
lda #30 lda #30
sta yposTableH,x sta yposTableH,x
; random initial speed and direction ; random initial speed and direction
;randomize 0 maxSpeed-1 ;randomize 0 maxSpeed-1
@@ -1119,7 +1117,7 @@ lineAdrH
bittable bittable
.byte %11110000 .byte %11110000
.byte %00001111 .byte %00001111
RNColtable ; Right Nibble Colour Table RNColtable ; Right Nibble color Table
.byte %00000000 .byte %00000000
.byte %00000001 .byte %00000001
.byte %00000010 .byte %00000010
@@ -1129,7 +1127,7 @@ RNColtable ; Right Nibble Colour Table
.byte %00000110 .byte %00000110
.byte %00000111 .byte %00000111
.byte %00001000 .byte %00001000
LNColtable ; Left Nibble Colour Table LNColtable ; Left Nibble color Table
.byte %00000000 .byte %00000000
.byte %00010000 .byte %00010000
.byte %00100000 .byte %00100000
@@ -1152,7 +1150,7 @@ xposTableL :maxBalls .byte 0 ; "fractional" part
xposTableH :maxBalls .byte 0 ; "fractional" part xposTableH :maxBalls .byte 0 ; "fractional" part
yposTableL :maxBalls .byte 0 ; yposTableL :maxBalls .byte 0 ;
yposTableH :maxBalls .byte 0 ; yposTableH :maxBalls .byte 0 ;
;ball position memory tables - the ball trace works like a "snake" ; ball position memory tables - the ball trace works like a "snake"
; (one set, one erased) ; (one set, one erased)
; there are "maxMemory" number of tables, "maxballs" length each ; there are "maxMemory" number of tables, "maxballs" length each
; too bad their addressess are not known in advance, ; too bad their addressess are not known in advance,
BIN
View File
Binary file not shown.