2 ; Groepaz/Hitmen, 11.10.2015
4 ; high level implementation for the soft80 implementation
10 .import soft80_internal_cellcolor, soft80_internal_cursorxlsb
18 lda KEY_COUNT ; Get number of characters
19 bne @L3 ; Jump if there are already chars waiting
22 jsr invertcursor ; set cursor on or off accordingly
24 @L1: lda KEY_COUNT ; wait for key
28 jsr invertcursor ; set cursor on or off accordingly
30 @L3: jsr KBDREAD ; Read char and return in A
34 ; Switch the cursor on or off (invert)
43 lda $01 ; enable RAM under I/O
51 ldx soft80_internal_cursorxlsb
65 ; do not use soft80_putcolor here to make sure the cursor is always
66 ; shown using the current textcolor without disturbing the "color voodoo"
73 sta (CRAM_PTR),y ; vram
77 lda (CRAM_PTR),y ; vram
79 lda soft80_internal_cellcolor
80 sta (CRAM_PTR),y ; vram
84 nibble: .byte $f0, $0f
86 ;-------------------------------------------------------------------------------
87 ; force the init constructor to be imported
90 conio_init = soft80_init