Merge pull request #22 from peterferrie/master

really preserve swap during initial header load
This commit is contained in:
4am 2019-03-18 18:31:32 -04:00 committed by GitHub
commit 0528bef255
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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