Second button in Joy B2+ works

This commit is contained in:
Pecusx
2023-05-31 09:08:35 +02:00
parent a759699523
commit 15f66500b8
8 changed files with 23 additions and 18 deletions
+2 -2
View File
@@ -183,8 +183,8 @@ EndOfCreditsVBI
tax tax
lda PADDL0,x lda PADDL0,x
sta PADDL0 sta PADDL0
lda PADDL1,x ; lda PADDL1,x
sta PADDL1 ; sta PADDL1
jmp XITVBV jmp XITVBV
.ELIF TARGET = 5200 .ELIF TARGET = 5200
lda SkStatSimulator lda SkStatSimulator
+1 -1
View File
@@ -364,7 +364,7 @@ WeaponUnits
.by 1 ;Ton_of_Dirt ;_26 .by 1 ;Ton_of_Dirt ;_26
.by 4 ;Liquid_Dirt ;_27 .by 4 ;Liquid_Dirt ;_27
.by 2 ;Dirt_Charge ;_28 .by 2 ;Dirt_Charge ;_28
.by 10 ;Punch ;_29 .by 2 ;Punch ;_29
.by 1 ;Buy_me ;_30 .by 1 ;Buy_me ;_30
.by 5 ;Laser ;_31 .by 5 ;Laser ;_31
.by 1 ;White_Flag ;_32 .by 1 ;White_Flag ;_32
+1 -1
View File
@@ -70,7 +70,7 @@ price_Dirt_Ball = 130 ;_25
price_Ton_of_Dirt = 171 ;_26 price_Ton_of_Dirt = 171 ;_26
price_Liquid_Dirt = 330 ;_27 price_Liquid_Dirt = 330 ;_27
price_Dirt_Charge = 343 ;_28 price_Dirt_Charge = 343 ;_28
price_Punch = 158 ;_29 price_Punch = 208 ;_29
price_Buy_me = 170 ;_30 price_Buy_me = 170 ;_30
price_Laser = 277 ;_31 price_Laser = 277 ;_31
price_White_Flag = $0 ;_32 price_White_Flag = $0 ;_32
+14 -10
View File
@@ -35,8 +35,9 @@
icl 'definitions.asm' icl 'definitions.asm'
;--------------------------------------------------- ;---------------------------------------------------
FirstZpageVariable = $57 FirstZpageVariable = $56
.zpvar DliColorBack .byte = FirstZpageVariable .zpvar DliColorBack .byte = FirstZpageVariable
.zpvar PaddleState .byte ; old state 2nd button for 2 buttons joysticks
.zpvar GradientNr .byte .zpvar GradientNr .byte
.zpvar GradientColors .word .zpvar GradientColors .word
.zpvar WindChangeInRound .byte ; wind change after each turn (not round only) flag - (0 - round only, >0 - each turn) .zpvar WindChangeInRound .byte ; wind change after each turn (not round only) flag - (0 - round only, >0 - each turn)
@@ -420,9 +421,8 @@ notpressedJoyGetKey
lda STRIG0 lda STRIG0
beq JoyButton beq JoyButton
.IF TARGET = 800 ; Second joy button , Select and Option key only on A800 .IF TARGET = 800 ; Second joy button , Select and Option key only on A800
lda PADDL0 jsr Check2button
cmp #$e4 bcc SecondButton
bne SecondButton
bne checkSelectKey bne checkSelectKey
checkSelectKey checkSelectKey
lda CONSOL lda CONSOL
@@ -446,6 +446,14 @@ getkeyend
sty ATRACT ; reset atract mode sty ATRACT ; reset atract mode
mvy #sfx_keyclick sfx_effect mvy #sfx_keyclick sfx_effect
rts rts
.IF TARGET = 800 ; Second joy button only on A800
Check2button
lda PADDL0
and #$c0
cmp PaddleState
sta PaddleState
rts
.ENDIF
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
@@ -472,12 +480,8 @@ StillWait
beq StillWait beq StillWait
.IF TARGET = 800 .IF TARGET = 800
; second joy button ; second joy button
lda PADDL0 ; jsr GetKey.Check2button
cmp #$e4 ; bcs StillWait
bne StillWait
; lda PADDL1
; cmp #$e4
; bne StillWait
lda SKSTAT lda SKSTAT
cmp #$ff cmp #$ff
bne StillWait bne StillWait
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+5 -4
View File
@@ -1329,10 +1329,11 @@ checkJoy
lda joyToKeyTable,y lda joyToKeyTable,y
jmp jumpFromStick jmp jumpFromStick
notpressedJoy notpressedJoy
;second fire .IF TARGET = 800
lda PADDL0 ;second fire only Atari 800
cmp #$e4 jsr GetKey.Check2button
jne pressedTAB jcc pressedTAB
.ENDIF
;fire ;fire
lda STRIG0 lda STRIG0
jeq pressedSpace jeq pressedSpace