2 ; Groepaz/Hitmen, 11.10.2015
4 ; Low level init code for soft80 screen output/console input
7 .constructor soft80_init
8 .destructor soft80_shutdown
10 .import soft80_kclrscr, soft80_charset
11 .export soft80_internal_textcolor, soft80_internal_bgcolor
12 .export soft80_internal_cursorxlsb
14 .importzp ptr1, ptr2, ptr3
29 ; copy charset to RAM under I/O
30 ; FIXME: move charset and this constructor into init segment
41 lda #>soft80_lo_charset
43 lda #<soft80_lo_charset
45 lda #>soft80_hi_charset
47 lda #<soft80_hi_charset
73 ; the "color voodoo" in other parts of the code relies on the vram and
74 ; colorram being set up as expected, which is why we cant use the
75 ; _bgcolor and _textcolor functions here.
77 lda 646 ; use current textcolor
79 sta soft80_internal_textcolor
81 lda VIC_BG_COLOR0 ; use current bgcolor
83 sta soft80_internal_bgcolor
88 ora soft80_internal_textcolor
102 ;-------------------------------------------------------------------------------
103 ; FIXME: when the code is fixed to use the "init" segment, these variables must
104 ; be moved into a section other than .bss so they survive after the init
108 soft80_internal_textcolor:
110 soft80_internal_bgcolor:
112 soft80_internal_cursorxlsb: