; Header. Includes jump table
.segment "JUMPTABLE"
-
+
; Driver signature
.byte $6A, $6F, $79 ; "joy"
- .byte $00 ; Driver API version number
+ .byte JOY_API_VERSION ; Driver API version number
; Button state masks (8 values)
INSTALL:
lda #<JOY_ERR_OK
ldx #>JOY_ERR_OK
-
-; rts ; Run into DEINSTALL instead
+; rts ; Run into UNINSTALL instead
; ------------------------------------------------------------------------
; UNINSTALL routine. Is called before the driver is removed from memory.
; Driver signature
.byte $65, $6d, $64 ; "emd"
- .byte $00 ; EM API version number
+ .byte EMD_API_VERSION ; EM API version number
; Jump table.
bne @L1
; Copy the remainder of the page
-
-@L2: ldy #EM_COPY_COUNT
+
+@L2: ldy #EM_COPY::COUNT
lda (ptr3),y ; Get bytes in last page
beq @L4
sta tmp1
; Copy the remainder of the page
-@L2: ldy #EM_COPY_COUNT
+@L2: ldy #EM_COPY::COUNT
lda (ptr3),y ; Get bytes in last page
beq @L4
sta tmp1
sta ptr3
stx ptr3+1 ; Save the passed em_copy pointer
- ldy #EM_COPY_OFFS
+ ldy #EM_COPY::OFFS
lda (ptr3),y
sta ptr1
- ldy #EM_COPY_PAGE
+ ldy #EM_COPY::PAGE
lda (ptr3),y
sta ptr1+1 ; From
- ldy #EM_COPY_BUF
+ ldy #EM_COPY::BUF
lda (ptr3),y
sta ptr2
iny
lda (ptr3),y
sta ptr2+1 ; To
- ldy #EM_COPY_COUNT+1
+ ldy #EM_COPY::COUNT+1
lda (ptr3),y ; Get number of pages
- sta tmp1
+ sta tmp1
rts