mirror of
https://github.com/cc65/cc65.git
synced 2025-01-03 16:33:19 +00:00
Fixed logic flaw
This commit is contained in:
parent
2c00f1e898
commit
67def0ca0d
@ -91,9 +91,9 @@ readbuttons:
|
|||||||
; Y has joystick of interest 0/1
|
; Y has joystick of interest 0/1
|
||||||
; return value:
|
; return value:
|
||||||
; $00: no button,
|
; $00: no button,
|
||||||
; $80: left/B button,
|
; $01: left/B button,
|
||||||
; $40: right/A button,
|
; $02: right/A button,
|
||||||
; $c0: both buttons
|
; $03: both buttons
|
||||||
; preserves X
|
; preserves X
|
||||||
tya
|
tya
|
||||||
beq L5
|
beq L5
|
||||||
@ -114,10 +114,7 @@ L2: tya
|
|||||||
L3: iny ; .......1
|
L3: iny ; .......1
|
||||||
lda #0 ; Fallback to 2600 joystick mode
|
lda #0 ; Fallback to 2600 joystick mode
|
||||||
sta CTLSWB
|
sta CTLSWB
|
||||||
L4: tya
|
L4: tya ; ......21
|
||||||
ror ; .......2 1
|
|
||||||
ror ; 1....... 2
|
|
||||||
ror ; 21......
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
L5: ; Joystick 0 processing
|
L5: ; Joystick 0 processing
|
||||||
@ -147,8 +144,8 @@ READ:
|
|||||||
L8: lda SWCHA ; Read joystick
|
L8: lda SWCHA ; Read joystick
|
||||||
ror ; .RLDU... - joystick 0
|
ror ; .RLDU... - joystick 0
|
||||||
L9: tax
|
L9: tax
|
||||||
jsr readbuttons ; A = 21......, X = .RLDU...
|
jsr readbuttons ; A = ......21, X = .RLDU...
|
||||||
rol ; A = 1 .......2
|
ror ; A = .......2 1
|
||||||
tay ; Y = .......2
|
tay ; Y = .......2
|
||||||
txa ; A = .RLDU...
|
txa ; A = .RLDU...
|
||||||
ror ; A = 1.RLDU..
|
ror ; A = 1.RLDU..
|
||||||
|
Loading…
Reference in New Issue
Block a user