.export _mouse_def_callbacks
.import _mouse_def_pointershape
.import _mouse_def_pointercolor
+ .import mcb_spritememory
+ .import mcb_spritepointer
.include "mouse-kernel.inc"
.include "c64.inc"
; Sprite definitions. The first value can be changed to adjust the number
; of the sprite used for the mouse. All others depend on this value.
MOUSE_SPR = 0 ; Sprite used for the mouse
-MOUSE_SPR_MEM = $0340 ; Memory location
MOUSE_SPR_MASK = $01 .shl MOUSE_SPR ; Positive mask
MOUSE_SPR_NMASK = .lobyte(.not MOUSE_SPR_MASK) ; Negative mask
VIC_SPR_X = (VIC_SPR0_X + 2*MOUSE_SPR) ; Sprite X register
initmcb:
+; Make all RAM accessible
+
+ lda #$30
+ ldy $01
+ sei
+ sta $01
+
; Copy the mouse sprite data
ldx #64 - 1
@L0: lda _mouse_def_pointershape,x
- sta MOUSE_SPR_MEM,x
+ sta mcb_spritememory,x
dex
bpl @L0
; Set the mouse sprite pointer
- lda #<(MOUSE_SPR_MEM / 64)
- sta $07F8 + MOUSE_SPR
+ lda #<(mcb_spritememory / 64)
+ sta mcb_spritepointer + MOUSE_SPR
+
+; Restore memory configuration
+
+ sty $01
+ cli
; Set the mouse sprite color