mirror of
https://github.com/irmen/prog8.git
synced 2025-01-11 13:29:45 +00:00
workaround for black square issue at start
This commit is contained in:
parent
578969c34c
commit
832601b36b
@ -638,6 +638,9 @@ asmsub init_system() {
|
||||
and #%11111000
|
||||
ora P8ZP_SCRATCH_REG
|
||||
sta VERA_DC_VIDEO ; keep old output mode
|
||||
ldy #0
|
||||
clc
|
||||
jsr c64.PLOT ; force a call to PLOT to avoid autostart black square issue, also see textio.fix_autostart_square()
|
||||
lda #$90 ; black
|
||||
jsr c64.CHROUT
|
||||
lda #1 ; swap fg/bg
|
||||
|
@ -21,6 +21,23 @@ sub home() {
|
||||
txt.chrout(19)
|
||||
}
|
||||
|
||||
sub fix_autostart_square() {
|
||||
; Here's a possible work around for weird issue that prints a black character after first call to c64.PLOT()
|
||||
; if you're also using c64.CINT() yourself. The default prog8 program initialization (which calls CINT) already performs this workaround.
|
||||
; The problem occurs when a program is autostarded in the emulator with -run -prg test.prg,
|
||||
; or when the program is saved as AUTOBOOT.X16 and loaded on boot like that.
|
||||
%asm {{
|
||||
sec
|
||||
jsr c64.PLOT
|
||||
clc
|
||||
jsr c64.PLOT
|
||||
lda #' '
|
||||
jsr c64.CHROUT ; overwrite the black square
|
||||
clc
|
||||
jmp c64.PLOT ; cursor back to original position
|
||||
}}
|
||||
}
|
||||
|
||||
sub nl() {
|
||||
txt.chrout('\n')
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user