more in LC RAM2

This commit is contained in:
Peter Ferrie 2019-09-10 09:51:04 -07:00
parent 8a96d53217
commit 3a50ceceb8
6 changed files with 40 additions and 44 deletions

View File

@ -105,7 +105,6 @@ LastMover
!pseudopc $D600 { !pseudopc $D600 {
!source "src/ui.font.data.a" !source "src/ui.font.data.a"
!source "src/prodos.impl.a" !source "src/prodos.impl.a"
!warn *
!if * > $DEFF { !if * > $DEFF {
!error "code is too large: ends at ", * !error "code is too large: ends at ", *
} }

View File

@ -9,7 +9,7 @@
; D000..E4E9 - persistent data structures (gGlobalPrefsStore, gGamesListStore) ; D000..E4E9 - persistent data structures (gGlobalPrefsStore, gGamesListStore)
; ...end of data and start of code are approximate, in between is unused... ; ...end of data and start of code are approximate, in between is unused...
; ...if they ever overlap, things will go boom... ; ...if they ever overlap, things will go boom...
; EA09..FFF9 - main program code ; EA72..FFF9 - main program code
; FFFA..FFFF - NMI, reset, IRQ vectors ; FFFA..FFFF - NMI, reset, IRQ vectors
; ;
; LC RAM BANK 2 ; LC RAM BANK 2

View File

@ -172,6 +172,7 @@ gCurrentlyVisibleSlideshowIndex
Launch Launch
+READ_RAM2_WRITE_RAM2 +READ_RAM2_WRITE_RAM2
jsr SaveOrRestoreScreenHoles ; save screen hole contents
ldx #1 ldx #1
- lda $100,x - lda $100,x
sta $DF00,x ; back up stack sta $DF00,x ; back up stack

View File

@ -164,41 +164,3 @@ SaveSmallFile
jsr hddopendir ; exit via ProRWTS2 (must re-open the file after query) jsr hddopendir ; exit via ProRWTS2 (must re-open the file after query)
+READ_RAM1_WRITE_RAM1 +READ_RAM1_WRITE_RAM1
rts rts
;------------------------------------------------------------------------------
; SaveOrRestoreScreenHoles
; preserve screen hole contents across demo execution
; to avoid crashing later on disk access
;
; in: nothing
; out: all flags clobbered
; all registers clobbered
;------------------------------------------------------------------------------
SaveOrRestoreScreenHoles
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 --
rts
holey_stuff
!fill 64

View File

@ -4,7 +4,6 @@
; Pseudo-ProDOS environment ; Pseudo-ProDOS environment
; ;
!pseudopc $DA00 {
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; ProDOS_enter ; ProDOS_enter
; intercept certain ProDOS requests ; intercept certain ProDOS requests
@ -547,4 +546,41 @@ ProDOS_prefix=$bfd0
} }
end_promote end_promote
}
;------------------------------------------------------------------------------
; SaveOrRestoreScreenHoles
; preserve screen hole contents across demo execution
; to avoid crashing later on disk access
;
; in: nothing
; out: all flags clobbered
; all registers clobbered
;------------------------------------------------------------------------------
SaveOrRestoreScreenHoles
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 --
rts
holey_stuff
!fill 64

View File

@ -199,8 +199,6 @@ RunAttractModule
@key !word $FDFD @key !word $FDFD
!word 0 !word 0
jsr SaveOrRestoreScreenHoles ; save screen hole contents
jmp Launch ; will return to caller via |Reenter| jmp Launch ; will return to caller via |Reenter|
; not a demo, so maybe a slideshow or single screenshot ; not a demo, so maybe a slideshow or single screenshot