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:
+33
-35
@@ -4,8 +4,8 @@
|
|||||||
;あめでと
|
;あめでと
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
|
|
||||||
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
|
||||||
@@ -19,11 +19,11 @@ 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
|
||||||
@@ -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
|
||||||
|
|
||||||
@@ -393,7 +393,7 @@ noRight
|
|||||||
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
|
||||||
@@ -515,7 +515,7 @@ NoLevelEnd
|
|||||||
;lda RANDOM
|
;lda RANDOM
|
||||||
;cmp #spawnProbability
|
;cmp #spawnProbability
|
||||||
;bcs noCollision
|
;bcs noCollision
|
||||||
lda colour
|
lda color
|
||||||
cmp #1
|
cmp #1
|
||||||
bne noCollision
|
bne noCollision
|
||||||
|
|
||||||
@@ -670,7 +670,7 @@ 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
|
||||||
@@ -683,7 +683,7 @@ fatplot
|
|||||||
lda lineAdrH,x
|
lda lineAdrH,x
|
||||||
sta temp+1
|
sta temp+1
|
||||||
|
|
||||||
ldx colour
|
ldx color
|
||||||
|
|
||||||
lda xpos
|
lda xpos
|
||||||
and #$01
|
and #$01
|
||||||
@@ -858,38 +858,38 @@ 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
|
||||||
@@ -913,7 +913,7 @@ cycleCloop
|
|||||||
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
|
||||||
@@ -924,13 +924,13 @@ cct = colourCycleTab
|
|||||||
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
|
||||||
@@ -938,7 +938,7 @@ 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
|
||||||
|
|
||||||
@@ -1031,10 +1031,8 @@ eXistenZstackFill
|
|||||||
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
|
||||||
|
|
||||||
@@ -1046,7 +1044,7 @@ eXistenZstackFill
|
|||||||
sta GPRIOR
|
sta GPRIOR
|
||||||
sta COLBAKS
|
sta COLBAKS
|
||||||
|
|
||||||
mva #1 colour
|
mva #1 color
|
||||||
|
|
||||||
rts
|
rts
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
@@ -1057,7 +1055,7 @@ 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
|
||||||
@@ -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
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user