]> git.sur5r.net Git - cc65/blobdiff - libsrc/nes/joy/nes-stdjoy.s
Removed joy_masks array.
[cc65] / libsrc / nes / joy / nes-stdjoy.s
index 76ca9600533705395609344ed7cc30aa67dd403c..3032e9330083bc5f10b43fc0f9781b0ddff5eac0 100644 (file)
         .include        "joy-error.inc"
         .include        "nes.inc"
 
+        .macpack        module
+
 
 ; ------------------------------------------------------------------------
 ; Header. Includes jump table
 
-.segment        "JUMPTABLE"
+        module_header   _nes_stdjoy_joy
 
 ; Driver signature
 
         .byte   $6A, $6F, $79           ; "joy"
         .byte   JOY_API_VERSION         ; Driver API version number
 
-; Button state masks (8 values)
+; Library reference
 
-        .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)
+        .addr   $0000
 
 ; Jump table.
 
@@ -89,9 +84,9 @@ READJOY:
         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