passport/src/progress.a

45 lines
1.3 KiB
Plaintext

;-------------------------------
; Progress bar functions
;
; ShowInitialProgressScreen - called once when a verify or crack process starts
; ResetProgress - called once when a verify or 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)
;-------------------------------
ShowInitialProgressScreen
jsr ClearScreen
lda #s_header
jsr PrintByID
lda #s_progbar
jsr PrintByID
lda VPOS
sta TEXTTOP
bne ResetProgress ; always branches
RestartProgress
lda VPOS
pha
lda #1
sta VPOS
lda #s_progbar
jsr PrintByID
pla
sta VPOS
jsr $FC22
; /!\ 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 ; SMC
inc progressind+1
rts