X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libsrc%2Fc64%2Fjoy%2Fc64-ptvjoy.s;h=bb1ba0982da3f30b9d06af375ea508d0d1d0dca7;hb=66ca781bb176cf316bb068d970fd7b3495d51e90;hp=b4314968e1ddfeaa31505e0d86e650d3c04636c7;hpb=983c6285e1578902e8294c870582f3bca7593dc8;p=cc65 diff --git a/libsrc/c64/joy/c64-ptvjoy.s b/libsrc/c64/joy/c64-ptvjoy.s index b4314968e..bb1ba0982 100644 --- a/libsrc/c64/joy/c64-ptvjoy.s +++ b/libsrc/c64/joy/c64-ptvjoy.s @@ -21,7 +21,11 @@ ; Driver signature .byte $6A, $6F, $79 ; "joy" - .byte JOY_API_VERSION ; Driver API version number + .byte JOY_API_VERSION ; Driver API version number + +; Library reference + + .addr $0000 ; Button state masks (8 values) @@ -60,7 +64,7 @@ JOY_COUNT = 4 ; Number of joysticks we support INSTALL: lda #JOY_ERR_OK -; rts ; Run into UNINSTALL instead +; rts ; Run into UNINSTALL instead ; ------------------------------------------------------------------------ ; UNINSTALL routine. Is called before the driver is removed from memory. @@ -84,18 +88,18 @@ COUNT: ; READ: Read a particular joystick passed in A. ; -READ: tax ; Joystick number into X +READ: tax ; Joystick number into X bne joy2 ; Read joystick 1 -joy1: lda #$7F +joy1: lda #$7F sei - sta CIA1_PRA - lda CIA1_PRB + sta CIA1_PRA + lda CIA1_PRB cli - and #$1F - eor #$1F + and #$1F + eor #$1F rts ; Read joystick 2 @@ -103,15 +107,15 @@ joy1: lda #$7F joy2: dex bne joy3 - lda #$E0 - ldy #$FF + lda #$E0 + ldy #$FF sei - sta CIA1_DDRA - lda CIA1_PRA - sty CIA1_DDRA + sta CIA1_DDRA + lda CIA1_PRA + sty CIA1_DDRA cli - and #$1F - eor #$1F + and #$1F + eor #$1F rts ; Read joystick 3