mirror of
https://github.com/mi57730/a2d.git
synced 2024-11-25 10:30:50 +00:00
Hook reset to cleanly quit DeskTop back to ProDOS. Resolves #141
* Fails on Virtual II and KEGS/GSPort/GSPlus, as they fail to disable aux memory on reset * Will fail within Disk Copy overlay
This commit is contained in:
parent
6abca47257
commit
05b1c02fe9
@ -78,6 +78,7 @@ file, then select the appropriate command from the Apple menu.
|
||||
* Correct rendering issues with desktop volume icons. (#117)
|
||||
* Prevent occasional rectangle drawn on desktop after window close. (#120)
|
||||
* Empty directories can be copied/moved. (#121)
|
||||
* Ctrl+Reset quits cleanly back to ProDOS (except buggy emulators). (#141)
|
||||
* Desk Accessories:
|
||||
* Date: Read-only on systems with a clock. On systems without a clock, date is saved for next session. (#30, #39)
|
||||
* Calculator: don't mis-paint when moved offscreen and other fixes. (#33, #34)
|
||||
|
@ -2139,6 +2139,12 @@ eject_flag:
|
||||
|
||||
str_quit_code: PASCAL_STRING "Quit.tmp"
|
||||
|
||||
reset_handler:
|
||||
;; Restore DeskTop Main expected state...
|
||||
sta ALTZPON
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
|
||||
start:
|
||||
MLI_RELAY_CALL OPEN, open_params
|
||||
bne fail
|
||||
@ -2158,6 +2164,7 @@ fail: jsr ShowAlert
|
||||
|
||||
.endproc
|
||||
cmd_quit := cmd_quit_impl::start
|
||||
reset_handler := cmd_quit_impl::reset_handler
|
||||
|
||||
;;; ============================================================
|
||||
;;; Exit DHR, restore device list, reformat /RAM.
|
||||
@ -15422,6 +15429,19 @@ str_preview_txt:
|
||||
|
||||
start:
|
||||
|
||||
;;; ============================================================
|
||||
;;; Set the reset vector to cold start
|
||||
.scope hook_reset_vector
|
||||
|
||||
;; Main hook
|
||||
lda #<desktop_main::reset_handler
|
||||
sta RESETVEC
|
||||
lda #>desktop_main::reset_handler
|
||||
sta RESETVEC+1
|
||||
eor #$A5
|
||||
sta RESETVEC+2
|
||||
|
||||
.endscope
|
||||
;;; ============================================================
|
||||
;;; Detect Machine Type
|
||||
|
||||
|
@ -45,6 +45,7 @@ HR3_OFF := $C0B6
|
||||
|
||||
;;; Monitor
|
||||
INIT := $FB2F
|
||||
SETPWRC := $FB6F
|
||||
VERSION := $FBB3
|
||||
BELL1 := $FBDD
|
||||
VTAB := $FC22
|
||||
@ -52,6 +53,7 @@ VTABZ := $FC24
|
||||
HOME := $FC58
|
||||
PRBYTE := $FDDA
|
||||
COUT := $FDED
|
||||
MOVE := $FE2C
|
||||
SETKBD := $FE89
|
||||
SETVID := $FE93
|
||||
MONZ := $FF69
|
||||
@ -181,6 +183,7 @@ DESTINATIONHI := $43
|
||||
;;; Other Locations
|
||||
XFERSTARTLO := $03ED
|
||||
XFERSTARTHI := $03EE
|
||||
RESETVEC := $03F2
|
||||
|
||||
|
||||
;;; ============================================================
|
||||
|
Loading…
Reference in New Issue
Block a user