.include "joy-error.inc"
.include "nes.inc"
+ .macpack module
+
; ------------------------------------------------------------------------
; Header. Includes jump table
-.segment "HEADER"
+ module_header _nes_stdjoy_joy
; Driver signature
.addr $0000
-; Button state masks (8 values)
-
- .byte $10 ; JOY_UP
- .byte $20 ; JOY_DOWN
- .byte $40 ; JOY_LEFT
- .byte $80 ; JOY_RIGHT
- .byte $01 ; JOY_FIRE (A)
- .byte $02 ; JOY_FIRE2 (B)
- .byte $04 ; (Select)
- .byte $08 ; (Start)
-
; Jump table.
.addr INSTALL
tay ; Joystick number (0,1) into Y
lda #1
- sta APU_PAD1,y
+ sta APU_PAD1
lda #0
- sta APU_PAD1,y
+ sta APU_PAD1
; Read joystick