2018-09-10 13:41:12 +00:00
|
|
|
processor 6502
|
|
|
|
|
|
|
|
multicolor SUBROUTINE
|
|
|
|
|
|
|
|
; Prepare data struct for MultiColor mode
|
|
|
|
; ----------------------------------------------------------------------
|
|
|
|
multicolorInit:
|
2018-09-10 19:39:53 +00:00
|
|
|
; Tell VIC-II to use:
|
|
|
|
; - screen text memory at $400 = $400 * 1
|
|
|
|
; - characters ROM at $2000 = $400 * 8
|
|
|
|
lda #$18
|
2018-09-10 13:41:12 +00:00
|
|
|
sta $d018
|
2020-04-01 19:11:08 +00:00
|
|
|
|
2018-09-10 13:41:12 +00:00
|
|
|
rts
|
|
|
|
|
|
|
|
; Activate multicolor mode
|
|
|
|
; ----------------------------------------------------------------------
|
|
|
|
multicolorOn:
|
|
|
|
; Set colors
|
2020-04-06 14:22:48 +00:00
|
|
|
lda #$0
|
|
|
|
sta $d021 ; 00 is black
|
|
|
|
lda #$a
|
|
|
|
sta $d022 ; 01 is gray
|
|
|
|
lda #$d
|
2018-09-10 13:41:12 +00:00
|
|
|
sta $d023 ; 10 is green
|
|
|
|
; and of course
|
|
|
|
; 11 is the colour specified in color RAM
|
|
|
|
|
|
|
|
lda $d016
|
|
|
|
ora #$10
|
|
|
|
sta $d016
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
; Deactivate multicolor mode
|
|
|
|
; ----------------------------------------------------------------------
|
|
|
|
multicolorOff:
|
|
|
|
lda $d016
|
|
|
|
and #$ef
|
|
|
|
sta $d016
|
|
|
|
rts
|