added MEGA65-specific JOYCRSR command

This commit is contained in:
FeralChild64 committed 2020-12-03 18:08:04 +01:00
1 parent 33e1e1ba4b
commit 755b7bb1a4
6 files changed
+44 -2

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
;; #LAYOUT# M65 BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
cmd_joycrsr:
; Make sure we are in MEGA65 native mode
jsr helper_ensure_native_mode
; Fetch joystick ID
jsr fetch_coma_uint8
+bcs do_SYNTAX_error
; Check if joystick ID is valid
cmp #$03
+bcs do_ILLEGAL_QUANTITY_error
; Set the joystick responsible for moving cursor keys
sta M65_JOYCRSR ; XXX consider introducing Kernal call for this
rts
@@ -0,0 +1,10 @@
;; #LAYOUT# M65 BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
helper_ensure_native_mode:
jsr M65_MODEGET
+bcs do_NATIVE_MODE_ONLY_error
rts