mirror of
https://github.com/pkali/Avery_Breakout.git
synced 2026-05-20 22:33:55 +02:00
fire+start fixes
This commit is contained in:
+33
-76
@@ -146,29 +146,8 @@ StartText
|
|||||||
;------------JOY-------------
|
;------------JOY-------------
|
||||||
;happy happy joy joy
|
;happy happy joy joy
|
||||||
;check for joystick now
|
;check for joystick now
|
||||||
/*
|
|
||||||
inc MyClok
|
|
||||||
lda MyClok
|
|
||||||
and #$07
|
|
||||||
bne jNotRight
|
|
||||||
*/
|
|
||||||
ldy PORTA
|
ldy PORTA
|
||||||
/*
|
|
||||||
tya
|
|
||||||
and #$01 ;up
|
|
||||||
bne jNotUp
|
|
||||||
ldx joystickConversion ;up
|
|
||||||
lda #1
|
|
||||||
sta keyboardGrid,x
|
|
||||||
jNotUp
|
|
||||||
tya
|
|
||||||
and #$02 ;down
|
|
||||||
bne jNotDown
|
|
||||||
ldx joystickConversion+1 ;up
|
|
||||||
lda #1
|
|
||||||
sta keyboardGrid,x
|
|
||||||
jNotDown
|
|
||||||
*/
|
|
||||||
tya
|
tya
|
||||||
and #$04 ;left
|
and #$04 ;left
|
||||||
bne jNotLeft
|
bne jNotLeft
|
||||||
@@ -254,7 +233,7 @@ SkipRMTVBL
|
|||||||
;sfx
|
;sfx
|
||||||
lda sfx_effect
|
lda sfx_effect
|
||||||
bmi lab2
|
bmi lab2
|
||||||
asl @ ; * 2
|
asl ; * 2
|
||||||
tay ;Y = 2,4,..,16 instrument number * 2 (0,2,4,..,126)
|
tay ;Y = 2,4,..,16 instrument number * 2 (0,2,4,..,126)
|
||||||
ldx #3 ;X = 3 channel (0..3 or 0..7 for stereo module)
|
ldx #3 ;X = 3 channel (0..3 or 0..7 for stereo module)
|
||||||
lda #12 ;A = 12 note (0..60)
|
lda #12 ;A = 12 note (0..60)
|
||||||
@@ -264,22 +243,6 @@ SkipRMTVBL
|
|||||||
sta sfx_effect ;reinit value
|
sta sfx_effect ;reinit value
|
||||||
;
|
;
|
||||||
lab2
|
lab2
|
||||||
/*
|
|
||||||
lda ticksPerSecond
|
|
||||||
cmp #60
|
|
||||||
bne PALMusic
|
|
||||||
; it is NTSC HERE -- slow down the sound
|
|
||||||
lda ticks
|
|
||||||
and #%00000111
|
|
||||||
beq skipSoundFrame
|
|
||||||
PALMusic
|
|
||||||
lda slowMusic
|
|
||||||
beq playNow
|
|
||||||
lda ticks
|
|
||||||
and #%00000011
|
|
||||||
beq skipSoundFrame
|
|
||||||
playNow
|
|
||||||
*/
|
|
||||||
jsr RASTERMUSICTRACKER+3
|
jsr RASTERMUSICTRACKER+3
|
||||||
skipSoundFrame
|
skipSoundFrame
|
||||||
|
|
||||||
@@ -318,27 +281,19 @@ skipSoundFrame
|
|||||||
;stx DLI_X
|
;stx DLI_X
|
||||||
mva #$80 PRIOR
|
mva #$80 PRIOR
|
||||||
|
|
||||||
;ldx dliCount
|
|
||||||
|
|
||||||
;txa
|
|
||||||
;asl
|
|
||||||
;asl
|
|
||||||
;lda brickcolorTab,x
|
|
||||||
lda VCOUNT
|
lda VCOUNT
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
sta WSYNC
|
sta WSYNC
|
||||||
sta COLBAK
|
sta COLBAK
|
||||||
|
|
||||||
;inx
|
|
||||||
;stx dliCount
|
|
||||||
;ldx DLI_X
|
|
||||||
lda DLI_A
|
lda DLI_A
|
||||||
rti
|
rti
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
main
|
main
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
jsr wait_for_depress
|
||||||
jsr MakeDarkScreen
|
jsr MakeDarkScreen
|
||||||
jsr initialize
|
jsr initialize
|
||||||
RMTsong song_main_menu
|
RMTsong song_main_menu
|
||||||
@@ -347,7 +302,7 @@ main
|
|||||||
|
|
||||||
mva #$0 AutoPlay
|
mva #$0 AutoPlay
|
||||||
jsr ScoreClear
|
jsr ScoreClear
|
||||||
mva #"9" Lives
|
mva #"1" Lives
|
||||||
jsr clearscreen
|
jsr clearscreen
|
||||||
mva #$0 LevelType
|
mva #$0 LevelType
|
||||||
jsr LoadLevelData.level000 ; set visible number to 000
|
jsr LoadLevelData.level000 ; set visible number to 000
|
||||||
@@ -383,10 +338,10 @@ gameOver
|
|||||||
and #%00001110
|
and #%00001110
|
||||||
sta COLPF0
|
sta COLPF0
|
||||||
lda CONSOL
|
lda CONSOL
|
||||||
and #%00000010 ; SELECT
|
and #@consol(start) ; START
|
||||||
beq main
|
beq main
|
||||||
lda TRIG0 ; fire
|
lda TRIG0 ; fire
|
||||||
beq main
|
jeq main
|
||||||
jmp @-
|
jmp @-
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
@@ -400,10 +355,9 @@ gameOver
|
|||||||
jsr BuildLevelFromBuffer
|
jsr BuildLevelFromBuffer
|
||||||
mwa #dl_start dlptrs
|
mwa #dl_start dlptrs
|
||||||
lda #$0 ;+GTIACTLBITS
|
lda #$0 ;+GTIACTLBITS
|
||||||
; sta PRIOR
|
|
||||||
sta GPRIOR
|
sta GPRIOR
|
||||||
sta COLBAKS
|
sta COLBAKS
|
||||||
lda #%00110010 ; normal screen width, DL on, P/M off
|
lda #@dmactl(standard|dma) ; normal screen width, DL on, P/M off
|
||||||
sta dmactls
|
sta dmactls
|
||||||
pause 1
|
pause 1
|
||||||
StartLoop
|
StartLoop
|
||||||
@@ -461,14 +415,14 @@ level000
|
|||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
jsr MakeDarkScreen
|
jsr MakeDarkScreen
|
||||||
ldx #2
|
ldx #2
|
||||||
@ lda LevelNumber,x
|
@ lda LevelNumber,x
|
||||||
sec
|
sec
|
||||||
sbc #$20
|
sbc #$20
|
||||||
sta LevelText+16,x
|
sta LevelText+16,x
|
||||||
dex
|
dex
|
||||||
bpl @-
|
bpl @-
|
||||||
mwa #dl_level dlptrs
|
mwa #dl_level dlptrs
|
||||||
lda #%00110010 ; normal screen width, DL on, P/M off
|
lda #@dmactl(standard|dma) ; normal screen width, DL on, P/M off
|
||||||
sta dmactls
|
sta dmactls
|
||||||
pause 80
|
pause 80
|
||||||
rts
|
rts
|
||||||
@@ -478,9 +432,9 @@ level000
|
|||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
jsr MakeDarkScreen
|
jsr MakeDarkScreen
|
||||||
ldx #5
|
ldx #5
|
||||||
@ lda score,x
|
@ lda score,x
|
||||||
sta OverText+33,x
|
sta OverText+33,x
|
||||||
dex
|
dex
|
||||||
bpl @-
|
bpl @-
|
||||||
mwa #dl_over dlptrs
|
mwa #dl_over dlptrs
|
||||||
lda #%00110010 ; normal screen width, DL on, P/M off
|
lda #%00110010 ; normal screen width, DL on, P/M off
|
||||||
@@ -495,10 +449,9 @@ level000
|
|||||||
jsr MakeDarkScreen
|
jsr MakeDarkScreen
|
||||||
mwa #dl dlptrs
|
mwa #dl dlptrs
|
||||||
lda #$0 ;+GTIACTLBITS
|
lda #$0 ;+GTIACTLBITS
|
||||||
; sta PRIOR
|
|
||||||
sta GPRIOR
|
sta GPRIOR
|
||||||
sta COLBAKS
|
sta COLBAKS
|
||||||
lda #%00110010 ; normal screen width, DL on, P/M off
|
lda #@dmactl(standard|dma) ; normal screen width, DL on, P/M off
|
||||||
sta dmactls
|
sta dmactls
|
||||||
pause 1
|
pause 1
|
||||||
rts
|
rts
|
||||||
@@ -624,7 +577,7 @@ noTop
|
|||||||
bit AutoPlay
|
bit AutoPlay
|
||||||
bmi GoAuto
|
bmi GoAuto
|
||||||
lda CONSOL
|
lda CONSOL
|
||||||
and #%00000100 ; OPTION
|
and #@consol(option) ; OPTION
|
||||||
bne bounceNormally
|
bne bounceNormally
|
||||||
GoAuto
|
GoAuto
|
||||||
jmp bottomBounce ; turns off the ball kill
|
jmp bottomBounce ; turns off the ball kill
|
||||||
@@ -844,7 +797,7 @@ NoScoreUp
|
|||||||
ora BricksInLevel+1
|
ora BricksInLevel+1
|
||||||
bne NoLevelEnd
|
bne NoLevelEnd
|
||||||
; all bricks gone - level ended!
|
; all bricks gone - level ended!
|
||||||
jmp GoNextLevel
|
jmp GoNextLevel
|
||||||
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...
|
||||||
@@ -904,14 +857,6 @@ dXlower
|
|||||||
sta dyTableL,x
|
sta dyTableL,x
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; sound
|
|
||||||
;lda random
|
|
||||||
;and #%00001000
|
|
||||||
;lda #%00000000
|
|
||||||
;sta consol
|
|
||||||
|
|
||||||
|
|
||||||
noCollision
|
noCollision
|
||||||
noMoreSlots
|
noMoreSlots
|
||||||
|
|
||||||
@@ -954,7 +899,6 @@ flightLoopEnd
|
|||||||
|
|
||||||
|
|
||||||
endOfBallzLoop
|
endOfBallzLoop
|
||||||
;pause
|
|
||||||
|
|
||||||
dec currBall
|
dec currBall
|
||||||
jpl flight
|
jpl flight
|
||||||
@@ -965,8 +909,10 @@ endOfBallzLoop
|
|||||||
bpl NoAuto
|
bpl NoAuto
|
||||||
pause 1 ;additional pause if auto play mode (slower)
|
pause 1 ;additional pause if auto play mode (slower)
|
||||||
lda CONSOL
|
lda CONSOL
|
||||||
and #%00000001 ; START
|
and #@consol(start) ; START
|
||||||
beq LevelOver ; Start pressed in Auto Play - exit
|
beq LevelOver ; Start pressed in Auto Play - exit
|
||||||
|
lda TRIG0
|
||||||
|
beq LevelOver
|
||||||
|
|
||||||
NoAuto
|
NoAuto
|
||||||
lda eXistenZstackPtr
|
lda eXistenZstackPtr
|
||||||
@@ -975,6 +921,7 @@ NoAuto
|
|||||||
LevelOver
|
LevelOver
|
||||||
; level over
|
; level over
|
||||||
mva #$ff EndLevelFlag
|
mva #$ff EndLevelFlag
|
||||||
|
jsr wait_for_depress
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
@@ -1682,6 +1629,16 @@ noingame
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
.proc wait_for_depress ; ion
|
||||||
|
;--------------------------------------------------
|
||||||
|
lda CONSOL
|
||||||
|
and:cmp #%00000111
|
||||||
|
bne wait_for_depress
|
||||||
|
lda TRIG0
|
||||||
|
beq wait_for_depress
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
;--------------------------------------------------
|
||||||
Menu_data
|
Menu_data
|
||||||
.byte '200',EOL ; number of bricks in ATASCII
|
.byte '200',EOL ; number of bricks in ATASCII
|
||||||
.byte '1',EOL ; brick size in pixels
|
.byte '1',EOL ; brick size in pixels
|
||||||
|
|||||||
Binary file not shown.
+1
-1
@@ -12,7 +12,7 @@
|
|||||||
sta ICBAL,x
|
sta ICBAL,x
|
||||||
lda #>fname
|
lda #>fname
|
||||||
sta ICBAH,x
|
sta ICBAH,x
|
||||||
lda #04 ;kod dostępu: $04 odczyt, $08 zapis, $09 dopisywanie, $0c odczyt/zapis
|
lda #04 ;kod dostępu: $04 odczyt, $08 zapis, $09 dopisywanie, $0c odczyt/zapis
|
||||||
sta ICAX1,x
|
sta ICAX1,x
|
||||||
lda #$00 ;dodatkowy parametr, $00 jest zawsze dobre
|
lda #$00 ;dodatkowy parametr, $00 jest zawsze dobre
|
||||||
sta ICAX2,x
|
sta ICAX2,x
|
||||||
|
|||||||
@@ -653,6 +653,13 @@ scr32 = @dmactl(narrow|dma|players|missiles|lineX1)
|
|||||||
mode10 = %10000000
|
mode10 = %10000000
|
||||||
mode11 = %11000000
|
mode11 = %11000000
|
||||||
.ende
|
.ende
|
||||||
|
|
||||||
|
.enum @consol
|
||||||
|
start = %001
|
||||||
|
select = %010
|
||||||
|
option = %100
|
||||||
|
.ende
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; KBCODEs
|
; KBCODEs
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
@@ -722,4 +729,8 @@ scr32 = @dmactl(narrow|dma|players|missiles|lineX1)
|
|||||||
_space = 33
|
_space = 33
|
||||||
.ende
|
.ende
|
||||||
|
|
||||||
|
; ---------------------------------------------------------------------------
|
||||||
|
; MISCELLANEOUS
|
||||||
|
; ---------------------------------------------------------------------------
|
||||||
|
|
||||||
EOL = $9b
|
EOL = $9b
|
||||||
|
|||||||
Reference in New Issue
Block a user