2015-08-29 13:58:57 +00:00
|
|
|
.export vce_init
|
2014-11-29 13:18:48 +00:00
|
|
|
|
2015-10-02 14:50:22 +00:00
|
|
|
.include "pce.inc"
|
|
|
|
|
2016-03-06 20:26:22 +00:00
|
|
|
.segment "ONCE"
|
2014-11-29 13:18:48 +00:00
|
|
|
vce_init:
|
2015-08-29 13:58:57 +00:00
|
|
|
; Set CTA to zero
|
|
|
|
stz VCE_ADDR_LO
|
|
|
|
stz VCE_ADDR_HI
|
2015-11-26 20:06:20 +00:00
|
|
|
|
|
|
|
ldy #$01 ; Only background palettes
|
2015-08-29 13:58:57 +00:00
|
|
|
vce_clear_bank:
|
2015-11-26 20:06:20 +00:00
|
|
|
clx ; ldx #<$0100 ; <(16 * 16)
|
2015-08-29 13:58:57 +00:00
|
|
|
vce_clear_color:
|
|
|
|
stz VCE_DATA_LO ; Clear color (LSB)
|
|
|
|
stz VCE_DATA_HI ; Clear color (MSB)
|
|
|
|
dex
|
|
|
|
bne vce_clear_color
|
|
|
|
dey
|
|
|
|
bne vce_clear_bank
|
|
|
|
rts
|