mirror of
https://github.com/cc65/cc65.git
synced 2025-02-26 23:30:03 +00:00
Selection whether to use page 6 for mouse P/M data is not done in
Makefile.inc, like the other compile-time options. Small fix in the P/M mouse "show" routine: adapt mouse cursor colors to current screen colors.
This commit is contained in:
parent
88e3e60550
commit
7eaf721e7c
@ -31,3 +31,7 @@ CA65FLAGS += -D NUMDRVS=4 -D LINEBUF=80 -D UCASE_FILENAME=1 -D DEFAULT_DEVICE=1
|
|||||||
# Disabled by default, you should enable it if the linker script relocates the
|
# Disabled by default, you should enable it if the linker script relocates the
|
||||||
# character generator (like atarixl-largehimem.cfg).
|
# character generator (like atarixl-largehimem.cfg).
|
||||||
#CA65FLAGS += -D CHARGEN_RELOC -D USEWSYNC
|
#CA65FLAGS += -D CHARGEN_RELOC -D USEWSYNC
|
||||||
|
|
||||||
|
# Disable if you don't want to use page 6 for mouse P/M data.
|
||||||
|
# If disabled, top of the RAM is used for P/M data.
|
||||||
|
CA65FLAGS += -D USE_PAGE6
|
||||||
|
@ -7,8 +7,6 @@
|
|||||||
; be called from an interrupt handler
|
; be called from an interrupt handler
|
||||||
;
|
;
|
||||||
|
|
||||||
USE_PAGE6 = 1
|
|
||||||
|
|
||||||
.include "atari.inc"
|
.include "atari.inc"
|
||||||
.importzp sp
|
.importzp sp
|
||||||
.export _mouse_pm_callbacks
|
.export _mouse_pm_callbacks
|
||||||
@ -26,7 +24,7 @@ USE_PAGE6 = 1
|
|||||||
; number of the P/M used for the mouse. All others depend on this value.
|
; number of the P/M used for the mouse. All others depend on this value.
|
||||||
; Valid P/M numbers are 0 to 4. When 4 is used, the missiles are used
|
; Valid P/M numbers are 0 to 4. When 4 is used, the missiles are used
|
||||||
; as a player.
|
; as a player.
|
||||||
.if USE_PAGE6
|
.ifdef USE_PAGE6
|
||||||
MOUSE_PM_NUM = 2 ; P/M used for the mouse
|
MOUSE_PM_NUM = 2 ; P/M used for the mouse
|
||||||
; This cannot be changed since only player #2 uses the memory at $600.
|
; This cannot be changed since only player #2 uses the memory at $600.
|
||||||
.else
|
.else
|
||||||
@ -102,7 +100,7 @@ show:
|
|||||||
lda #1
|
lda #1
|
||||||
.endif
|
.endif
|
||||||
sta GRACTL
|
sta GRACTL
|
||||||
;rts ; optimized out
|
jmp update_colors
|
||||||
|
|
||||||
prep:
|
prep:
|
||||||
draw:
|
draw:
|
||||||
@ -187,7 +185,7 @@ update_colors:
|
|||||||
pm_init:
|
pm_init:
|
||||||
lda #0
|
lda #0
|
||||||
|
|
||||||
.if USE_PAGE6
|
.ifdef USE_PAGE6
|
||||||
|
|
||||||
sta MOUSE_PM_BASE
|
sta MOUSE_PM_BASE
|
||||||
ldx #6 ; page 6
|
ldx #6 ; page 6
|
||||||
@ -224,7 +222,7 @@ pm_init:
|
|||||||
iny
|
iny
|
||||||
bne @iniloo
|
bne @iniloo
|
||||||
|
|
||||||
.if ! USE_PAGE6
|
.ifndef USE_PAGE6
|
||||||
lda MOUSE_PM_BASE+1
|
lda MOUSE_PM_BASE+1
|
||||||
and #$F8
|
and #$F8
|
||||||
.endif
|
.endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user