mirror of
https://github.com/cc65/cc65.git
synced 2024-10-04 03:56:13 +00:00
Color RAM initialization was missing
git-svn-id: svn://svn.cc65.org/cc65/trunk@959 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
d694b9e88a
commit
edcc015a48
@ -16,28 +16,47 @@
|
|||||||
lda #0
|
lda #0
|
||||||
sta CURS_X
|
sta CURS_X
|
||||||
sta CURS_Y
|
sta CURS_Y
|
||||||
jsr plot ; Set cursor to top left corner
|
jsr plot ; Set cursor to top left corner
|
||||||
|
|
||||||
lda #$20 ; Screencode for blank
|
ldx #$00 ; Count
|
||||||
ldx #$00
|
|
||||||
ldy #$00
|
|
||||||
jsr clearpage
|
jsr clearpage
|
||||||
jsr clearpage
|
jsr clearpage
|
||||||
jsr clearpage
|
jsr clearpage
|
||||||
ldx #<(40*25)
|
ldx #<(40*25) ; Count
|
||||||
jsr clearpage ; Clear remainder of last page
|
jsr clearpage ; Clear remainder of last page
|
||||||
jmp plot ; Set screen pointer again
|
jmp plot ; Set screen pointer again
|
||||||
|
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
|
||||||
.proc clearpage
|
.proc clearpage
|
||||||
|
|
||||||
|
txa
|
||||||
|
pha ; Save count
|
||||||
|
|
||||||
|
lda #$20 ; Screencode for blank
|
||||||
|
ldy #$00
|
||||||
@L1: sta (SCREEN_PTR),y
|
@L1: sta (SCREEN_PTR),y
|
||||||
iny
|
iny
|
||||||
dex
|
dex
|
||||||
bne @L1
|
bne @L1
|
||||||
inc SCREEN_PTR+1
|
inc SCREEN_PTR+1
|
||||||
|
|
||||||
|
pla
|
||||||
|
tax ; Reload count
|
||||||
|
lda IndReg
|
||||||
|
pha
|
||||||
|
lda #$0F
|
||||||
|
sta IndReg ; Switch to the system bank
|
||||||
|
lda CHARCOLOR ; Load color
|
||||||
|
ldy #$00
|
||||||
|
@L2: sta (CRAM_PTR),y
|
||||||
|
iny
|
||||||
|
dex
|
||||||
|
bne @L2
|
||||||
|
inc CRAM_PTR+1
|
||||||
|
pla
|
||||||
|
sta IndReg ; Restore the old indirect bank
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.endproc
|
.endproc
|
||||||
|
Loading…
Reference in New Issue
Block a user