mirror of
https://github.com/a2-4am/4cade.git
synced 2024-06-28 10:29:31 +00:00
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.offscreen.a"
|
||||||
!source "src/ui.cheats.a"
|
!source "src/ui.cheats.a"
|
||||||
!source "src/ui.credits.a"
|
!source "src/ui.credits.a"
|
||||||
|
!source "src/ui.reboot.a"
|
||||||
!source "src/ui.common.a"
|
!source "src/ui.common.a"
|
||||||
!source "src/ui.font.a"
|
!source "src/ui.font.a"
|
||||||
!source "src/ui.overlay.a"
|
!source "src/ui.overlay.a"
|
||||||
|
|
|
@ -35,6 +35,7 @@ kBrowseCredits = 7
|
||||||
kBrowseCheat = 8
|
kBrowseCheat = 8
|
||||||
kSoftBell = 9 ; must match kInputError
|
kSoftBell = 9 ; must match kInputError
|
||||||
kBrowseJoystick = 10
|
kBrowseJoystick = 10
|
||||||
|
kBrowseRageQuit = 11
|
||||||
|
|
||||||
ldy #kNumBrowseKeys
|
ldy #kNumBrowseKeys
|
||||||
- dey
|
- dey
|
||||||
|
@ -130,6 +131,7 @@ BrowseDispatchTableLo
|
||||||
!byte <OnBrowseCheat
|
!byte <OnBrowseCheat
|
||||||
!byte <SoftBell
|
!byte <SoftBell
|
||||||
!byte <Joystick
|
!byte <Joystick
|
||||||
|
!byte <OnRageQuit
|
||||||
BrowseDispatchTableHi
|
BrowseDispatchTableHi
|
||||||
!byte >OnBrowseSearch
|
!byte >OnBrowseSearch
|
||||||
!byte >OnBrowsePrevious
|
!byte >OnBrowsePrevious
|
||||||
|
@ -142,8 +144,10 @@ BrowseDispatchTableHi
|
||||||
!byte >OnBrowseCheat
|
!byte >OnBrowseCheat
|
||||||
!byte >SoftBell
|
!byte >SoftBell
|
||||||
!byte >Joystick
|
!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
|
BrowseKeys
|
||||||
!byte $83 ; Ctrl-C = toggle cheat mode
|
!byte $83 ; Ctrl-C = toggle cheat mode
|
||||||
!byte $81 ; Ctrl-A = about
|
!byte $81 ; Ctrl-A = about
|
||||||
|
@ -158,6 +162,7 @@ BrowseKeys
|
||||||
!byte $8B ; up arrow = previous
|
!byte $8B ; up arrow = previous
|
||||||
!byte $88 ; left arrow = previous
|
!byte $88 ; left arrow = previous
|
||||||
!byte $90 ; Ctrl-P = launch joystick calibration program
|
!byte $90 ; Ctrl-P = launch joystick calibration program
|
||||||
|
!byte $92 ; Ctrl-R = reboot
|
||||||
BrowseKeyDispatch
|
BrowseKeyDispatch
|
||||||
!byte kBrowseCheat
|
!byte kBrowseCheat
|
||||||
!byte kBrowseCredits
|
!byte kBrowseCredits
|
||||||
|
@ -172,6 +177,7 @@ BrowseKeyDispatch
|
||||||
!byte kBrowsePrevious
|
!byte kBrowsePrevious
|
||||||
!byte kBrowsePrevious
|
!byte kBrowsePrevious
|
||||||
!byte kBrowseJoystick
|
!byte kBrowseJoystick
|
||||||
|
!byte kBrowseRageQuit
|
||||||
|
|
||||||
GameCount
|
GameCount
|
||||||
!word 0
|
!word 0
|
||||||
|
|
23
src/ui.reboot.a
Normal file
23
src/ui.reboot.a
Normal file
|
@ -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
|
kInputCheat = 8
|
||||||
kInputError = 9
|
kInputError = 9
|
||||||
kInputJoystick = 10
|
kInputJoystick = 10
|
||||||
|
kInputRageQuit = 11
|
||||||
|
|
||||||
InputDispatchTableLo
|
InputDispatchTableLo
|
||||||
!byte <OnSearch
|
!byte <OnSearch
|
||||||
|
@ -33,6 +34,7 @@ InputDispatchTableLo
|
||||||
!byte <OnCheat
|
!byte <OnCheat
|
||||||
!byte <OnError
|
!byte <OnError
|
||||||
!byte <Joystick
|
!byte <Joystick
|
||||||
|
!byte <OnRageQuit
|
||||||
InputDispatchTableHi
|
InputDispatchTableHi
|
||||||
!byte >OnSearch
|
!byte >OnSearch
|
||||||
!byte >OnClear
|
!byte >OnClear
|
||||||
|
@ -45,8 +47,10 @@ InputDispatchTableHi
|
||||||
!byte >OnCheat
|
!byte >OnCheat
|
||||||
!byte >OnError
|
!byte >OnError
|
||||||
!byte >Joystick
|
!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
|
InputKeys
|
||||||
!byte $83 ; Ctrl-C = toggle cheat mode
|
!byte $83 ; Ctrl-C = toggle cheat mode
|
||||||
!byte $81 ; Ctrl-A = about
|
!byte $81 ; Ctrl-A = about
|
||||||
|
@ -61,6 +65,7 @@ InputKeys
|
||||||
!byte $9B ; Esc = clear input buffer (if any)
|
!byte $9B ; Esc = clear input buffer (if any)
|
||||||
; or switch to mega attract mode
|
; or switch to mega attract mode
|
||||||
!byte $90 ; Ctrl-P = launch joystick calibration program
|
!byte $90 ; Ctrl-P = launch joystick calibration program
|
||||||
|
!byte $92 ; Ctrl-R = reboot
|
||||||
InputKeyDispatch
|
InputKeyDispatch
|
||||||
!byte kInputCheat
|
!byte kInputCheat
|
||||||
!byte kInputCredits
|
!byte kInputCredits
|
||||||
|
@ -73,6 +78,7 @@ InputKeyDispatch
|
||||||
!byte kInputLaunch
|
!byte kInputLaunch
|
||||||
!byte kInputClear
|
!byte kInputClear
|
||||||
!byte kInputJoystick
|
!byte kInputJoystick
|
||||||
|
!byte kInputRageQuit
|
||||||
|
|
||||||
.noKeyMatch
|
.noKeyMatch
|
||||||
jsr IsSearchKey
|
jsr IsSearchKey
|
||||||
|
|
Loading…
Reference in New Issue
Block a user