mirror of https://github.com/a2-4am/4cade.git
reboot on Ctrl-R
This commit is contained in:
parent
e24a920f6e
commit
03ca3cab72
|
@ -99,6 +99,7 @@ ResetVector ; 6 bytes, copied to $100
|
|||
!source "src/ui.offscreen.a"
|
||||
!source "src/ui.cheats.a"
|
||||
!source "src/ui.credits.a"
|
||||
!source "src/ui.reboot.a"
|
||||
!source "src/ui.common.a"
|
||||
!source "src/ui.font.a"
|
||||
!source "src/ui.overlay.a"
|
||||
|
|
|
@ -35,6 +35,7 @@ kBrowseCredits = 7
|
|||
kBrowseCheat = 8
|
||||
kSoftBell = 9 ; must match kInputError
|
||||
kBrowseJoystick = 10
|
||||
kBrowseRageQuit = 11
|
||||
|
||||
ldy #kNumBrowseKeys
|
||||
- dey
|
||||
|
@ -130,6 +131,7 @@ BrowseDispatchTableLo
|
|||
!byte <OnBrowseCheat
|
||||
!byte <SoftBell
|
||||
!byte <Joystick
|
||||
!byte <OnRageQuit
|
||||
BrowseDispatchTableHi
|
||||
!byte >OnBrowseSearch
|
||||
!byte >OnBrowsePrevious
|
||||
|
@ -142,8 +144,10 @@ BrowseDispatchTableHi
|
|||
!byte >OnBrowseCheat
|
||||
!byte >SoftBell
|
||||
!byte >Joystick
|
||||
!byte >OnRageQuit
|
||||
|
||||
kNumBrowseKeys = 13 ; number of entries in next 2 tables (each)
|
||||
kNumBrowseKeys = 14
|
||||
; number of entries in next 2 tables (each)
|
||||
BrowseKeys
|
||||
!byte $83 ; Ctrl-C = toggle cheat mode
|
||||
!byte $81 ; Ctrl-A = about
|
||||
|
@ -158,6 +162,7 @@ BrowseKeys
|
|||
!byte $8B ; up arrow = previous
|
||||
!byte $88 ; left arrow = previous
|
||||
!byte $90 ; Ctrl-P = launch joystick calibration program
|
||||
!byte $92 ; Ctrl-R = reboot
|
||||
BrowseKeyDispatch
|
||||
!byte kBrowseCheat
|
||||
!byte kBrowseCredits
|
||||
|
@ -172,6 +177,7 @@ BrowseKeyDispatch
|
|||
!byte kBrowsePrevious
|
||||
!byte kBrowsePrevious
|
||||
!byte kBrowseJoystick
|
||||
!byte kBrowseRageQuit
|
||||
|
||||
GameCount
|
||||
!word 0
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
;license:MIT
|
||||
;(c) 2020 by qkumba
|
||||
;
|
||||
; reboot system
|
||||
;
|
||||
; Public functions
|
||||
; - OnRageQuit
|
||||
;
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; OnRageQuit
|
||||
; reboot system
|
||||
;
|
||||
; in: none
|
||||
; out: nothing
|
||||
;------------------------------------------------------------------------------
|
||||
OnRageQuit
|
||||
inc $101 ; bank in ROM
|
||||
lda #$A6
|
||||
sta $104
|
||||
lda #$FA
|
||||
sta $105 ; JMP $FAA6
|
||||
jmp $100
|
|
@ -20,6 +20,7 @@ kInputCredits = 7
|
|||
kInputCheat = 8
|
||||
kInputError = 9
|
||||
kInputJoystick = 10
|
||||
kInputRageQuit = 11
|
||||
|
||||
InputDispatchTableLo
|
||||
!byte <OnSearch
|
||||
|
@ -33,6 +34,7 @@ InputDispatchTableLo
|
|||
!byte <OnCheat
|
||||
!byte <OnError
|
||||
!byte <Joystick
|
||||
!byte <OnRageQuit
|
||||
InputDispatchTableHi
|
||||
!byte >OnSearch
|
||||
!byte >OnClear
|
||||
|
@ -45,8 +47,10 @@ InputDispatchTableHi
|
|||
!byte >OnCheat
|
||||
!byte >OnError
|
||||
!byte >Joystick
|
||||
!byte >OnRageQuit
|
||||
|
||||
kNumInputKeys = 11 ; number of entries in next 2 tables (each)
|
||||
kNumInputKeys = 12
|
||||
; number of entries in next 2 tables (each)
|
||||
InputKeys
|
||||
!byte $83 ; Ctrl-C = toggle cheat mode
|
||||
!byte $81 ; Ctrl-A = about
|
||||
|
@ -61,6 +65,7 @@ InputKeys
|
|||
!byte $9B ; Esc = clear input buffer (if any)
|
||||
; or switch to mega attract mode
|
||||
!byte $90 ; Ctrl-P = launch joystick calibration program
|
||||
!byte $92 ; Ctrl-R = reboot
|
||||
InputKeyDispatch
|
||||
!byte kInputCheat
|
||||
!byte kInputCredits
|
||||
|
@ -73,6 +78,7 @@ InputKeyDispatch
|
|||
!byte kInputLaunch
|
||||
!byte kInputClear
|
||||
!byte kInputJoystick
|
||||
!byte kInputRageQuit
|
||||
|
||||
.noKeyMatch
|
||||
jsr IsSearchKey
|
||||
|
|
Loading…
Reference in New Issue