mirror of
https://github.com/a2-4am/passport.git
synced 2024-12-22 04:29:59 +00:00
restart then increment progress bar while writing out final copy from RAM disk
This commit is contained in:
parent
b311927145
commit
12530f8f6f
@ -689,10 +689,9 @@ WriteRAMToDisk
|
||||
jsr SetMark
|
||||
jsr SwapProDOS
|
||||
|
||||
;prevent track write from calling RAM again
|
||||
|
||||
jsr RestartProgress ; restart progress bar
|
||||
lda #FALSE
|
||||
sta gUsingRAMDisk
|
||||
sta gUsingRAMDisk ; prevent track write from calling RAM again
|
||||
|
||||
- lda #0
|
||||
sta mliparam+2
|
||||
@ -704,12 +703,14 @@ WriteRAMToDisk
|
||||
lda gRAMDiskRef
|
||||
jsr ReadFile
|
||||
jsr SwapProDOS
|
||||
jsr IncProgress
|
||||
jsr WriteTrackMLI
|
||||
inc gTrack
|
||||
lda gTrack
|
||||
cmp #$23
|
||||
bne -
|
||||
|
||||
jsr IncProgress
|
||||
lda #TRUE
|
||||
sta gUsingRAMDisk
|
||||
|
||||
|
@ -596,19 +596,7 @@ FatalNoSlot6
|
||||
jsr WaitForKey
|
||||
jmp CleanExit
|
||||
|
||||
ResetProgress
|
||||
lda #$82 ; reset progress indicator
|
||||
sta progressind+1
|
||||
lda #$05
|
||||
sta progressind+2
|
||||
rts
|
||||
|
||||
IncProgress
|
||||
lda #$20 ; display minimal progress indicator
|
||||
progressind
|
||||
sta $FFFF ; set at runtime
|
||||
inc progressind+1
|
||||
rts
|
||||
!source "progress.a"
|
||||
|
||||
;-------------------------------
|
||||
; WriteTrack
|
||||
|
@ -462,16 +462,7 @@
|
||||
lda #s_restart
|
||||
jsr PrintByID
|
||||
inc .foundsierra
|
||||
lda VPOS
|
||||
pha
|
||||
lda #1
|
||||
sta VPOS
|
||||
lda #s_progbar
|
||||
jsr PrintByID
|
||||
pla
|
||||
sta VPOS
|
||||
jsr $FC22
|
||||
jsr ResetProgress
|
||||
jsr RestartProgress
|
||||
jsr IncProgress
|
||||
ldx #$FF
|
||||
txs
|
||||
|
36
src/progress.a
Normal file
36
src/progress.a
Normal file
@ -0,0 +1,36 @@
|
||||
;-------------------------------
|
||||
; Progress bar functions
|
||||
;
|
||||
; ResetProgress - called once when verify/demuffin/crack process starts
|
||||
; IncProgress - called repeatedly during process (visibly increments progress bar)
|
||||
; RestartProgress - called from certain patchers (Sierra) or when writing from RAM disk
|
||||
; (visibly clears progress bar and exits via ResetProgress)
|
||||
;-------------------------------
|
||||
!zone {
|
||||
RestartProgress
|
||||
lda VPOS
|
||||
pha
|
||||
lda #1
|
||||
sta VPOS
|
||||
lda #s_progbar
|
||||
jsr PrintByID
|
||||
pla
|
||||
sta VPOS
|
||||
jsr $FC22
|
||||
|
||||
; note: execution falls through here
|
||||
|
||||
ResetProgress
|
||||
lda #$82 ; reset progress indicator
|
||||
sta progressind+1
|
||||
lda #$05
|
||||
sta progressind+2
|
||||
rts
|
||||
|
||||
IncProgress
|
||||
lda #$20 ; display minimal progress indicator
|
||||
progressind
|
||||
sta $FFFF ; set at runtime
|
||||
inc progressind+1
|
||||
rts
|
||||
}
|
@ -234,7 +234,7 @@ StringTable
|
||||
; can be set directly before calling PrintByID.
|
||||
;
|
||||
.header
|
||||
!text "Passport by 4am 2017-11-07",$00
|
||||
!text "Passport by 4am 2017-11-08",$00
|
||||
.mainmenu
|
||||
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D
|
||||
!text " "
|
||||
|
Loading…
Reference in New Issue
Block a user