mirror of
https://github.com/a2-4am/4cade.git
synced 2025-02-09 02:31:05 +00:00
Merge branch 'master' of https://github.com/a2-4am/4cade
This commit is contained in:
commit
381c18dcdc
@ -13,6 +13,7 @@ FirstMover
|
|||||||
Reenter ; self-running demos should call this to exit back to 4cade
|
Reenter ; self-running demos should call this to exit back to 4cade
|
||||||
+READ_RAM1_WRITE_RAM1
|
+READ_RAM1_WRITE_RAM1
|
||||||
jsr CloseHandles ; close any open handles to restore ProRWTS state to original
|
jsr CloseHandles ; close any open handles to restore ProRWTS state to original
|
||||||
|
jsr SaveScreenHoles ; restore screen hole contents from saved copy
|
||||||
Main
|
Main
|
||||||
ldx #$FF
|
ldx #$FF
|
||||||
txs
|
txs
|
||||||
|
@ -51,6 +51,11 @@ ProRWTSBuffer
|
|||||||
; so we reuse as much of the 1-time code as possible
|
; so we reuse as much of the 1-time code as possible
|
||||||
; and fill the rest with zeros
|
; and fill the rest with zeros
|
||||||
OneTimeSetup
|
OneTimeSetup
|
||||||
|
lda MachineStatus
|
||||||
|
sta oldstatus
|
||||||
|
jsr SaveScreenHoles ; save initial copy of screen hole content
|
||||||
|
lda #$91
|
||||||
|
sta holepatch ; enable restoring of copy from now on
|
||||||
lda hddopendir+1 ; save current directory as 'root'
|
lda hddopendir+1 ; save current directory as 'root'
|
||||||
ldy hddopendir+3
|
ldy hddopendir+3
|
||||||
+STAY gRootDirectory
|
+STAY gRootDirectory
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
; - LoadFile
|
; - LoadFile
|
||||||
; - LoadDHRFile
|
; - LoadDHRFile
|
||||||
; - SaveSmallFile
|
; - SaveSmallFile
|
||||||
|
; - CloseHandles
|
||||||
|
; - SaveScreenHoles
|
||||||
;
|
;
|
||||||
; A general note about paths:
|
; A general note about paths:
|
||||||
;
|
;
|
||||||
@ -240,6 +242,15 @@ traverse
|
|||||||
@go
|
@go
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
; promote [private]
|
||||||
|
;
|
||||||
|
; tiny ProDOS-style interface for ProRWTS
|
||||||
|
; in: whatever ProDOS expects for the supported functions
|
||||||
|
; out: carry clear, A=0
|
||||||
|
; X, Y, and other flags clobbered
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
|
||||||
promote
|
promote
|
||||||
!pseudopc $bf00 {
|
!pseudopc $bf00 {
|
||||||
lda $c08b
|
lda $c08b
|
||||||
@ -269,6 +280,50 @@ ProDOS_prefix=$bfd0
|
|||||||
}
|
}
|
||||||
end_promote
|
end_promote
|
||||||
|
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
; SaveScreenHoles
|
||||||
|
; preserve screen hole contents across demo execution
|
||||||
|
; to avoid crashing later on disk access
|
||||||
|
;
|
||||||
|
; in: nothing
|
||||||
|
; out: all flags clobbered
|
||||||
|
; all registers clobbered
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
SaveScreenHoles
|
||||||
|
lda #4
|
||||||
|
sta namhi
|
||||||
|
ldx #0
|
||||||
|
stx namlo
|
||||||
|
sta bloklo
|
||||||
|
-- ldy #$78
|
||||||
|
- lda (namlo),y
|
||||||
|
pha
|
||||||
|
lda holey_stuff,x
|
||||||
|
holepatch ;sta->lda
|
||||||
|
lda (namlo),y
|
||||||
|
pla
|
||||||
|
sta holey_stuff,x
|
||||||
|
inx
|
||||||
|
tya
|
||||||
|
eor #$80
|
||||||
|
tay
|
||||||
|
bmi -
|
||||||
|
iny
|
||||||
|
bpl -
|
||||||
|
inc namhi
|
||||||
|
dec bloklo
|
||||||
|
bne --
|
||||||
|
lda oldstatus
|
||||||
|
ldx MachineStatus
|
||||||
|
sta MachineStatus
|
||||||
|
sta oldstatus
|
||||||
|
rts
|
||||||
|
oldstatus
|
||||||
|
!byte 0
|
||||||
|
holey_stuff
|
||||||
|
!fill 64
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; ProDOS_enter
|
; ProDOS_enter
|
||||||
; intercept certain ProDOS requests
|
; intercept certain ProDOS requests
|
||||||
|
@ -82,6 +82,7 @@ gAttractIndex
|
|||||||
|
|
||||||
+LOAD_FILE_IMM @key
|
+LOAD_FILE_IMM @key
|
||||||
|
|
||||||
|
jsr SaveScreenHoles ; save screen hole contents in case game changes them
|
||||||
ldx #(End_Prelaunch-Prelaunch-1)
|
ldx #(End_Prelaunch-Prelaunch-1)
|
||||||
- lda Prelaunch,x ; copy pre-launch code to main memory
|
- lda Prelaunch,x ; copy pre-launch code to main memory
|
||||||
sta $100,x
|
sta $100,x
|
||||||
|
@ -87,7 +87,8 @@ call :asm
|
|||||||
1>nul copy /y res\_FileInformation.txt build\ >>build\log
|
1>nul copy /y res\_FileInformation.txt build\ >>build\log
|
||||||
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\LAUNCHER.SYSTEM" >>build\log
|
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\LAUNCHER.SYSTEM" >>build\log
|
||||||
%CADIUS% CREATEFOLDER "build\%DISK%" "/%VOLUME%/X/" >>build\log
|
%CADIUS% CREATEFOLDER "build\%DISK%" "/%VOLUME%/X/" >>build\log
|
||||||
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\PREFS.CONF" >>build\log
|
1>nul copy /y res\prefs.conf build\PREFS.CONF >>build\log
|
||||||
|
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\PREFS.CONF" >>build\log
|
||||||
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\GAMES.CONF" >>build\log
|
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\GAMES.CONF" >>build\log
|
||||||
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\ATTRACT.CONF" >>build\log
|
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\ATTRACT.CONF" >>build\log
|
||||||
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\FX.CONF" >>build\log
|
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\FX.CONF" >>build\log
|
||||||
|
Loading…
x
Reference in New Issue
Block a user