I've got a simple program that prints out TEST on the upper left. This runs from a cartridge at A000 and I've been testing it using VICE. The weird thing is it loads fine in VICE, all the text is in black, on a real VIC20 with a cartridge I get strange colours.
On the picture attached the TEST is printed out with red, green, white , red. So this seems to be related to the values I put in 1E00 to 1E03.
Hopefully something simple I'm missing but I can't figure out why its working on VICE but not the real hardware.
Any assembly gurus out there?
Code: Select all
* = $A000 ; set for cartridge
.WORD START
.WORD $0000
.BYT "A0",'C'+$80,'B'+$80,'M'+$80 ; Vic-20 looks for A0CBM on startup
START:
LDA #$0C ; 12 for PAL
STA $9000
LDA #$26 ; 38 for PAL
STA $9001
LDA #$96 ; %1001 0110 ; color map=$9600, 22 cols,
STA $9002
LDA #$2E ; 46 for PAL
STA $9003
LDA #$00
STA $9004
LDA #$F0 ; %1111 0000; screen map $1E00; char map
STA $9005
LDA #$1B ; %0001 1011; white/light cyan
STA $900F
LDA #0
TAY
LDY #0
LDA #$20
SPACES ; clear screen with spaces
STA $1E00,Y
STA $1F00,Y
INY
BNE SPACES
LDA#20 ;T
STA $1E00
LDA#5 ;E
STA $1E01
LDA#19 ;S
STA $1E02
LDA#20 ;T
STA $1E03