2017-11-08 18:18:34 +00:00
|
|
|
;-------------------------------
|
|
|
|
; Progress bar functions
|
|
|
|
;
|
2021-04-18 04:49:26 +00:00
|
|
|
; ShowInitialProgressScreen - called once when a verify or crack process starts
|
|
|
|
; ResetProgress - called once when a verify or crack process starts
|
2017-11-08 18:18:34 +00:00
|
|
|
; 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)
|
|
|
|
;-------------------------------
|
2021-04-18 04:49:26 +00:00
|
|
|
ShowInitialProgressScreen
|
|
|
|
jsr ClearScreen
|
|
|
|
lda #s_header
|
|
|
|
jsr PrintByID
|
|
|
|
lda #s_progbar
|
|
|
|
jsr PrintByID
|
|
|
|
lda VPOS
|
|
|
|
sta TEXTTOP
|
|
|
|
bne ResetProgress ; always branches
|
|
|
|
|
2017-11-08 18:18:34 +00:00
|
|
|
RestartProgress
|
|
|
|
lda VPOS
|
|
|
|
pha
|
|
|
|
lda #1
|
|
|
|
sta VPOS
|
|
|
|
lda #s_progbar
|
|
|
|
jsr PrintByID
|
|
|
|
pla
|
|
|
|
sta VPOS
|
|
|
|
jsr $FC22
|
2021-04-18 04:12:05 +00:00
|
|
|
; /!\ execution falls through here
|
2017-11-08 18:18:34 +00:00
|
|
|
|
|
|
|
ResetProgress
|
2021-04-18 04:49:26 +00:00
|
|
|
lda #$82 ; reset progress indicator
|
2017-11-08 18:18:34 +00:00
|
|
|
sta progressind+1
|
|
|
|
lda #$05
|
|
|
|
sta progressind+2
|
|
|
|
rts
|
|
|
|
|
|
|
|
IncProgress
|
2021-04-18 04:49:26 +00:00
|
|
|
lda #$20 ; display minimal progress indicator
|
2017-11-08 18:18:34 +00:00
|
|
|
progressind
|
2021-04-18 04:49:26 +00:00
|
|
|
sta $FFFF ; SMC
|
2017-11-08 18:18:34 +00:00
|
|
|
inc progressind+1
|
|
|
|
rts
|