diff --git a/src/4cade.a b/src/4cade.a index 6cee76d71..db0c9a5d7 100644 --- a/src/4cade.a +++ b/src/4cade.a @@ -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" diff --git a/src/ui.browse.mode.a b/src/ui.browse.mode.a index 061eb2aef..6d76e2e59 100644 --- a/src/ui.browse.mode.a +++ b/src/ui.browse.mode.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 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 diff --git a/src/ui.reboot.a b/src/ui.reboot.a new file mode 100644 index 000000000..71a8c6b0b --- /dev/null +++ b/src/ui.reboot.a @@ -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 diff --git a/src/ui.search.mode.a b/src/ui.search.mode.a index f6746b79d..38d927900 100644 --- a/src/ui.search.mode.a +++ b/src/ui.search.mode.a @@ -20,6 +20,7 @@ kInputCredits = 7 kInputCheat = 8 kInputError = 9 kInputJoystick = 10 +kInputRageQuit = 11 InputDispatchTableLo !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