added MEGA65-specific JOYCRSR command
This commit is contained in:
1 parent
33e1e1ba4b
commit
755b7bb1a4
6 files changed
+44
-2
No files matched your search
@@ -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
|
||||
File renamed without changes.
@@ -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
|
||||
Reference in new issue
Block a user