mirror of
https://github.com/a2-4am/passport.git
synced 2024-12-22 19:30:50 +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 SetMark
|
||||||
jsr SwapProDOS
|
jsr SwapProDOS
|
||||||
|
|
||||||
;prevent track write from calling RAM again
|
jsr RestartProgress ; restart progress bar
|
||||||
|
|
||||||
lda #FALSE
|
lda #FALSE
|
||||||
sta gUsingRAMDisk
|
sta gUsingRAMDisk ; prevent track write from calling RAM again
|
||||||
|
|
||||||
- lda #0
|
- lda #0
|
||||||
sta mliparam+2
|
sta mliparam+2
|
||||||
@ -704,12 +703,14 @@ WriteRAMToDisk
|
|||||||
lda gRAMDiskRef
|
lda gRAMDiskRef
|
||||||
jsr ReadFile
|
jsr ReadFile
|
||||||
jsr SwapProDOS
|
jsr SwapProDOS
|
||||||
|
jsr IncProgress
|
||||||
jsr WriteTrackMLI
|
jsr WriteTrackMLI
|
||||||
inc gTrack
|
inc gTrack
|
||||||
lda gTrack
|
lda gTrack
|
||||||
cmp #$23
|
cmp #$23
|
||||||
bne -
|
bne -
|
||||||
|
|
||||||
|
jsr IncProgress
|
||||||
lda #TRUE
|
lda #TRUE
|
||||||
sta gUsingRAMDisk
|
sta gUsingRAMDisk
|
||||||
|
|
||||||
|
@ -596,19 +596,7 @@ FatalNoSlot6
|
|||||||
jsr WaitForKey
|
jsr WaitForKey
|
||||||
jmp CleanExit
|
jmp CleanExit
|
||||||
|
|
||||||
ResetProgress
|
!source "progress.a"
|
||||||
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
|
|
||||||
|
|
||||||
;-------------------------------
|
;-------------------------------
|
||||||
; WriteTrack
|
; WriteTrack
|
||||||
|
@ -462,16 +462,7 @@
|
|||||||
lda #s_restart
|
lda #s_restart
|
||||||
jsr PrintByID
|
jsr PrintByID
|
||||||
inc .foundsierra
|
inc .foundsierra
|
||||||
lda VPOS
|
jsr RestartProgress
|
||||||
pha
|
|
||||||
lda #1
|
|
||||||
sta VPOS
|
|
||||||
lda #s_progbar
|
|
||||||
jsr PrintByID
|
|
||||||
pla
|
|
||||||
sta VPOS
|
|
||||||
jsr $FC22
|
|
||||||
jsr ResetProgress
|
|
||||||
jsr IncProgress
|
jsr IncProgress
|
||||||
ldx #$FF
|
ldx #$FF
|
||||||
txs
|
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.
|
; can be set directly before calling PrintByID.
|
||||||
;
|
;
|
||||||
.header
|
.header
|
||||||
!text "Passport by 4am 2017-11-07",$00
|
!text "Passport by 4am 2017-11-08",$00
|
||||||
.mainmenu
|
.mainmenu
|
||||||
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D
|
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D
|
||||||
!text " "
|
!text " "
|
||||||
|
Loading…
Reference in New Issue
Block a user