mirror of
https://github.com/a2-4am/4cade.git
synced 2024-09-13 14:56:27 +00:00
stable exit to GS/OS
This commit is contained in:
parent
068f485964
commit
9c6a93029e
@ -46,6 +46,11 @@ Reenter
|
||||
jsr DisableAccelerator ; back to 1 MHz (especially important on IIgs
|
||||
; which restores default speed on Ctrl-Reset)
|
||||
jsr CloseHandles ; close any open handles to restore ProRWTS
|
||||
ldx #(end_promote-promote-1)
|
||||
- lda promote,x ; copy ProDOS shim to main memory for GS/OS exit
|
||||
sta $bf00,x
|
||||
dex
|
||||
bpl -
|
||||
ldx #5
|
||||
- lda ResetVector,x ; copy reentry wrapper to bottom of stack
|
||||
sta $100,x ; (used as reset vector because //e always
|
||||
|
@ -336,7 +336,7 @@ OneTimeSetup
|
||||
lda $E100BD ; Make sure GS/OS was the boot OS
|
||||
!cpu 6502
|
||||
beq @NotGSOS
|
||||
ldx #5
|
||||
ldx #(QuitToGSOS_e-QuitToGSOS)-1
|
||||
- lda QuitToGSOS,x
|
||||
sta PatchQuit,x
|
||||
dex
|
||||
@ -454,8 +454,14 @@ CopyDevs
|
||||
!byte 1
|
||||
|
||||
QuitToGSOS
|
||||
lda #$8B
|
||||
sta ProDOS_exit+1 ; restore bank 1
|
||||
lda #$FF ; no prefix
|
||||
sta ProDOS_prefix
|
||||
|
||||
!cpu 65816
|
||||
clc
|
||||
xce
|
||||
jmp $E0D000
|
||||
!cpu 6502
|
||||
QuitToGSOS_e
|
||||
|
@ -7,8 +7,7 @@
|
||||
;
|
||||
; LC RAM BANK 1
|
||||
; D000..E908 - persistent data structures (gGlobalPrefsStore, gGamesListStore)
|
||||
; ...unused...
|
||||
; E914..FFF1 - main program code
|
||||
; E909..FFF1 - main program code
|
||||
; FFF2..FFF9 - API functions and global constants available for main program
|
||||
; code, prelaunchers, transition effects, &c.
|
||||
; (Wait/UnwaitForVBL, MockingboardStuff, MachineStatus)
|
||||
|
@ -18,11 +18,6 @@ LaunchInternal
|
||||
sty RestoreStackNextTime + 1
|
||||
; tell |Reenter| to restore the stack and stack pointer
|
||||
|
||||
ldx #(end_promote-promote-1)
|
||||
- lda promote,x ; copy ProDOS shim to main memory
|
||||
sta $bf00,x
|
||||
dex
|
||||
bpl -
|
||||
tya
|
||||
ldy #$18
|
||||
- sta $bf57,y
|
||||
|
Loading…
Reference in New Issue
Block a user