mirror of
https://github.com/Pecusx/dino-game.git
synced 2026-05-20 22:33:23 +02:00
Joy 2B+ support :)
This commit is contained in:
@@ -24,6 +24,7 @@ swap_table=$0600 ; table for swap bytes in left characters :)
|
|||||||
.zpvar JumpPhase .byte
|
.zpvar JumpPhase .byte
|
||||||
.zpvar Hit .byte
|
.zpvar Hit .byte
|
||||||
.zpvar Level .byte
|
.zpvar Level .byte
|
||||||
|
.zpvar PaddleState .byte
|
||||||
.zpvar play_flag .byte
|
.zpvar play_flag .byte
|
||||||
.zpvar NTSCounter .byte
|
.zpvar NTSCounter .byte
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
@@ -132,6 +133,8 @@ FirstSTART
|
|||||||
mva #$ff portb
|
mva #$ff portb
|
||||||
; and wait one frame :)
|
; and wait one frame :)
|
||||||
waitRTC ; or waitRTC ?
|
waitRTC ; or waitRTC ?
|
||||||
|
jsr Check2button ; reset JoyB2+ state
|
||||||
|
sta PaddleState
|
||||||
jsr ClearScreen
|
jsr ClearScreen
|
||||||
jsr GenerateCharsets
|
jsr GenerateCharsets
|
||||||
jsr GenerateClouds
|
jsr GenerateClouds
|
||||||
@@ -1080,6 +1083,8 @@ DinoLoop4
|
|||||||
beq Up
|
beq Up
|
||||||
lda TRIG0 ; Fire = Up
|
lda TRIG0 ; Fire = Up
|
||||||
beq Up
|
beq Up
|
||||||
|
jsr Check2button ; 2nd button = down
|
||||||
|
bcc Down
|
||||||
; check keyboard
|
; check keyboard
|
||||||
lda SKSTAT
|
lda SKSTAT
|
||||||
cmp #$f7 ; SHIFT
|
cmp #$f7 ; SHIFT
|
||||||
@@ -1327,6 +1332,13 @@ pressed
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
Check2button
|
||||||
|
lda PADDL0
|
||||||
|
and #$c0
|
||||||
|
eor #$C0
|
||||||
|
cmp PaddleState
|
||||||
|
rts
|
||||||
|
;--------------------------------------------------
|
||||||
.proc PrepareMusicPlayer
|
.proc PrepareMusicPlayer
|
||||||
jsr StopMusic
|
jsr StopMusic
|
||||||
VMAIN VBLinterrupt,7 ; jsr SetVBL
|
VMAIN VBLinterrupt,7 ; jsr SetVBL
|
||||||
|
|||||||
Reference in New Issue
Block a user