Fixed loading screen showing garbage on real hardware

This commit is contained in:
blondie7575 2024-03-10 13:36:28 -07:00
parent 59a290a288
commit 6247b942e5
2 changed files with 27 additions and 2 deletions

View File

@ -9,12 +9,16 @@ loaderPalette:
showLoadingScreen: showLoadingScreen:
lda #$0000 lda #$0000
jsr slowColorFill jsr slowColorFill
SHRVIDEO SHRVIDEO
SHADOWMEMORY SHADOWMEMORY
jsr initSCBs
lda #loaderPalette lda #loaderPalette
sta PARAML0 sta PARAML0
lda #0 lda #0
jsr setPalette jsr setPalette
BORDER_COLOR #$7 BORDER_COLOR #$7
lda #$1111 lda #$1111
jsr slowColorFill jsr slowColorFill
@ -55,3 +59,24 @@ slowColorFillLoop:
slowColorFillLoopDone: slowColorFillLoopDone:
rts rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; initSCBs
; Initialize all scanline control bytes
;
; Trashes A,X
initSCBs:
BITS8
lda #0
ldx #200 ;set all 200 scbs to A
initSCBsLoop:
dex
sta $e19d00,x
cpx #0
bne initSCBsLoop
BITS16
rts

View File

@ -23,8 +23,8 @@ CAT1_VRAM = $5da0
; Shows the title screen and main game menu ; Shows the title screen and main game menu
; ;
titleScreen: titleScreen:
lda #%10000000 ; Set all SCBs to 320, no interrupts, palette 0 jsr setScanLineInterruptVector
jsr initSCBs ;jsr setVBLInterruptVector
stz leftScreenEdge stz leftScreenEdge
; Copy title screen art from where it was loaded in bank 6 ; Copy title screen art from where it was loaded in bank 6