mirror of
https://github.com/pkali/Avery_Breakout.git
synced 2026-05-20 22:33:55 +02:00
compiles under linux
This commit is contained in:
+38
-40
@@ -4,8 +4,8 @@
|
||||
;あめでと
|
||||
;---------------------------------------------------
|
||||
|
||||
icl 'lib/atarisys.asm'
|
||||
icl 'lib/macro.asm'
|
||||
icl 'lib/ATARISYS.ASM'
|
||||
icl 'lib/MACRO.ASM'
|
||||
|
||||
display=$a000
|
||||
screenWidth = 80 ;in pixels
|
||||
@@ -15,15 +15,15 @@ margin = 2 ; top and bottom screen safety margin
|
||||
racquetPosMin = $2 ; min position of the paddle moved by the user
|
||||
racquetPosMax = screenWidth-8 ; max position of the paddle moved by the user
|
||||
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!)
|
||||
maxMemory = 7 ; number of saved pixel positions
|
||||
;Beware! For easier calc somewhere it uses "modulo maxMemory"
|
||||
;calculations and therefore this value must be a power of 2!
|
||||
; Beware! For easier calc somewhere it uses "modulo maxMemory"
|
||||
; calculations and therefore this value must be a power of 2 -1 (?)!
|
||||
maxBrickLines = 14 ; maximum number of lines of bricks to be eradicated
|
||||
|
||||
.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 dX dY .word ;main loop shortcuts to the table values
|
||||
;.zpvar dx dy .word ;delta
|
||||
@@ -172,7 +172,7 @@ DLI
|
||||
txa
|
||||
asl
|
||||
asl
|
||||
;lda brickColourTab,x
|
||||
;lda brickcolorTab,x
|
||||
sta COLBAK
|
||||
|
||||
inx
|
||||
@@ -187,7 +187,7 @@ main
|
||||
loop
|
||||
|
||||
mva #maxBalls-1 currBall
|
||||
jsr cycleColours
|
||||
jsr cyclecolors
|
||||
|
||||
flight
|
||||
|
||||
@@ -393,7 +393,7 @@ noRight
|
||||
lda lineAdrH,x
|
||||
sta temp+1
|
||||
|
||||
ldx colour
|
||||
ldx color
|
||||
|
||||
lda xpos+1
|
||||
and #$01
|
||||
@@ -507,15 +507,15 @@ bounceDone
|
||||
lda BricksInLevel
|
||||
ora BricksInLevel+1
|
||||
bne NoLevelEnd
|
||||
; all bricks gone - level ended!
|
||||
; all bricks gone - level ended!
|
||||
jmp gameOver
|
||||
NoLevelEnd
|
||||
;spawn the new bally
|
||||
;spawn the new bally
|
||||
; if there is still an empty slot for a new ball somewhere...
|
||||
;lda RANDOM
|
||||
;cmp #spawnProbability
|
||||
;bcs noCollision
|
||||
lda colour
|
||||
lda color
|
||||
cmp #1
|
||||
bne noCollision
|
||||
|
||||
@@ -670,7 +670,7 @@ delayLoop
|
||||
fatplot
|
||||
; xpos, ypos (.byte) - pixel position
|
||||
; xpos<80
|
||||
; pixel colour in "colour"
|
||||
; pixel color in "color"
|
||||
;--------------------------------------------------
|
||||
; let's calculate coordinates from xpos and ypos
|
||||
lda xpos
|
||||
@@ -683,7 +683,7 @@ fatplot
|
||||
lda lineAdrH,x
|
||||
sta temp+1
|
||||
|
||||
ldx colour
|
||||
ldx color
|
||||
|
||||
lda xpos
|
||||
and #$01
|
||||
@@ -858,38 +858,38 @@ clearScreen
|
||||
;--------------------------------------------------
|
||||
lda #0
|
||||
tax
|
||||
Loopi1
|
||||
@
|
||||
:(maxLines*40/256+1) sta display+$100*#,x
|
||||
inx
|
||||
bne Loopi1
|
||||
bne @-
|
||||
rts
|
||||
;--------------------------------------------------
|
||||
cycleColoursReset
|
||||
cyclecolorsReset
|
||||
ldy #6
|
||||
cycleRloop
|
||||
lda colourCycleTabReset,y
|
||||
sta colourCycleTab,y
|
||||
lda colorCycleTabReset,y
|
||||
sta colorCycleTab,y
|
||||
dey
|
||||
bpl cycleRloop
|
||||
mva #0 colour
|
||||
mva #0 color
|
||||
;--------------------------------------------------
|
||||
cycleColours
|
||||
cyclecolors
|
||||
;--------------------------------------------------
|
||||
inc colour
|
||||
lda colour
|
||||
inc color
|
||||
lda color
|
||||
cmp #8
|
||||
bne noColourReset
|
||||
mva #1 colour
|
||||
noColourReset
|
||||
bne nocolorReset
|
||||
mva #1 color
|
||||
nocolorReset
|
||||
ldy #6
|
||||
cycleCloop
|
||||
lda colourCycleTab,y
|
||||
lda colorCycleTab,y
|
||||
;sta COLPM1,y
|
||||
sta PCOLR1,y
|
||||
dey
|
||||
bpl cycleCloop
|
||||
|
||||
;shift colours
|
||||
;shift colors
|
||||
/*
|
||||
2
|
||||
2 4
|
||||
@@ -913,7 +913,7 @@ cycleCloop
|
||||
14
|
||||
261 262 263 264 265 266 267
|
||||
*/
|
||||
cct = colourCycleTab
|
||||
cct = colorCycleTab
|
||||
ldx cct+6
|
||||
mva cct+5 cct+6
|
||||
mva cct+4 cct+5
|
||||
@@ -924,13 +924,13 @@ cct = colourCycleTab
|
||||
stx cct+0
|
||||
|
||||
rts
|
||||
colourCycleTab
|
||||
colorCycleTab
|
||||
|
||||
.by 14,2,4,6,8,10,12
|
||||
|
||||
colourCycleTabReset
|
||||
colorCycleTabReset
|
||||
.by 14,2,4,6,8,10,12
|
||||
brickColourTab
|
||||
brickcolorTab
|
||||
.by 0
|
||||
;--------------------------------------------------
|
||||
initialize
|
||||
@@ -938,7 +938,7 @@ initialize
|
||||
|
||||
mva #$00 PCOLR0 ; = $02C0 ;- - rejestr-cień COLPM0
|
||||
|
||||
jsr cycleColoursReset
|
||||
jsr cyclecolorsReset
|
||||
|
||||
mva #$7C COLBAKS
|
||||
|
||||
@@ -1031,10 +1031,8 @@ eXistenZstackFill
|
||||
lda eXistenZstack,Y
|
||||
dey
|
||||
sty eXistenZstackPtr
|
||||
|
||||
tax
|
||||
|
||||
|
||||
jsr randomStart ;just one random pixxxel
|
||||
;previously the whole band of ballz
|
||||
|
||||
@@ -1046,7 +1044,7 @@ eXistenZstackFill
|
||||
sta GPRIOR
|
||||
sta COLBAKS
|
||||
|
||||
mva #1 colour
|
||||
mva #1 color
|
||||
|
||||
rts
|
||||
;--------------------------------------------------
|
||||
@@ -1057,7 +1055,7 @@ drawBricks
|
||||
; for x=margin to screenWidth-margin:
|
||||
; for y=margin to maxBrickLines+margin:
|
||||
; fatplot(x,y)
|
||||
mva #8 colour
|
||||
mva #8 color
|
||||
mva #margin*2 ypos
|
||||
drawBricksLoopY
|
||||
mva #margin*3 xpos
|
||||
@@ -1119,7 +1117,7 @@ lineAdrH
|
||||
bittable
|
||||
.byte %11110000
|
||||
.byte %00001111
|
||||
RNColtable ; Right Nibble Colour Table
|
||||
RNColtable ; Right Nibble color Table
|
||||
.byte %00000000
|
||||
.byte %00000001
|
||||
.byte %00000010
|
||||
@@ -1129,7 +1127,7 @@ RNColtable ; Right Nibble Colour Table
|
||||
.byte %00000110
|
||||
.byte %00000111
|
||||
.byte %00001000
|
||||
LNColtable ; Left Nibble Colour Table
|
||||
LNColtable ; Left Nibble color Table
|
||||
.byte %00000000
|
||||
.byte %00010000
|
||||
.byte %00100000
|
||||
@@ -1152,7 +1150,7 @@ xposTableL :maxBalls .byte 0 ; "fractional" part
|
||||
xposTableH :maxBalls .byte 0 ; "fractional" part
|
||||
yposTableL :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)
|
||||
; there are "maxMemory" number of tables, "maxballs" length each
|
||||
; too bad their addressess are not known in advance,
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user