really preserve swap during initial header load

This commit is contained in:
Peter Ferrie 2019-03-18 15:28:46 -07:00
parent 093776ae8a
commit 058ad84ca0

View File

@ -80,8 +80,7 @@
WIDTH = 40 WIDTH = 40
HEIGHT = 24 HEIGHT = 24
LDRBASE = $2DB LDRBASE = $2DB
INSTALLBUFFER = $21E ; yes, the overlay overwrites the loader... INSTALLBUFFER = $20E ; yes, the overlay overwrites the loader...
; see also "warning!" below
SWAPBUFFER = $900 ; (LoadSaveEnd - LoadSaveStart) size SWAPBUFFER = $900 ; (LoadSaveEnd - LoadSaveStart) size
; needed by Diversi-DOS, must be page-aligned ; needed by Diversi-DOS, must be page-aligned
; region is preserved across calls ; region is preserved across calls
@ -362,6 +361,10 @@ InstallStart
+ +
;open source file and read header if available ;open source file and read header if available
lda SWAPBUFFER
pha
lda SWAPBUFFER+1
pha
jsr LoadSaveHeader jsr LoadSaveHeader
bcs + bcs +
lda SaveCH lda SaveCH
@ -375,6 +378,10 @@ InstallStart
dec PreventAddPage + 1 ;tri-state flag because Diversi-DOS dec PreventAddPage + 1 ;tri-state flag because Diversi-DOS
inc HeaderExists + 1 inc HeaderExists + 1
+ +
pla
sta SWAPBUFFER+1
pla
sta SWAPBUFFER
jsr SetTextCoords1 jsr SetTextCoords1
@ -1694,7 +1701,7 @@ SecondLine
!fill WIDTH * 7, SPACE !fill WIDTH * 7, SPACE
!text " 4LIVE by 4am && qkumba " !text " 4LIVE by 4am && qkumba "
!fill WIDTH, SPACE !fill WIDTH, SPACE
!text " Revision 05 / Serial number 180410 " !text " Revision 06 / Serial number 190318 "
!fill WIDTH * 2, SPACE !fill WIDTH * 2, SPACE
!text " https://github.com/a2-4am/4live " !text " https://github.com/a2-4am/4live "
!fill WIDTH * 9, SPACE !fill WIDTH * 9, SPACE