+;
+; Groepaz/Hitmen, 12.10.2015
+;
+; import/overload stubs for the soft80 implementation
; soft80_cgetc.s
+;
+; Groepaz/Hitmen, 12.10.2015
+;
+; internal constants for the soft80 implementation
soft80_lo_charset = $d000
soft80_hi_charset = $d400
charsperline = 80
screenrows = 25
+; FIXME: these should match petscii and perhaps come from a common cbm.inc?
CH_ESC = 95
CH_HLINE = 96
CH_CROSS = 123
;
-; Groepaz/Hitmen, 10.10.2015
+; Groepaz/Hitmen, 12.10.2015
;
; character set for use with the soft80 implementation
;
; - $60 - $7f screencodes $40 - $5f (petscii codes $60 - $7f)
; - only 128 characters are defined here, the soft80 implementation will invert
; the graphics data for inverted display on the fly.
+; - since the charset is 4 by 8 pixels, only the lower 4bit of each byte is
+; used. the upper bits have to be 0.
; - finally the lower 4bits are "inverted", ie a space character is represented
; as $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f
;
; +280 ....xxxx ......xx ........ ....xxxx
; +300 ....xxxx ......xx ........ ....xxxx
; +380 ....xxxx ......xx ........ ....xxxx
+; [...]
+; +040 ....x.xx ....xxxx ....xxxx ....xxxx
+; +0c0 .....x.x ....xxxx .....xxx ....xxxx
+; +140 .......x ....x.xx .....xxx ....x..x
+; +1c0 .......x ....xx.x ......xx .....xxx
+; +240 .....xxx ....x..x .....x.x .....xxx
+; +2c0 .....x.x .....x.x .....x.x .....xxx
+; +340 ....x.xx ....x..x ......xx ....x..x
+; +3c0 ....xxxx ....xxxx ....xxxx ....xxxx
.export soft80_charset
;
+; Groepaz/Hitmen, 12.10.2015
+;
; void chlinexy (unsigned char x, unsigned char y, unsigned char length);
; void chline (unsigned char length);
;
;
+; Groepaz/Hitmen, 12.10.2015
+;
; unsigned char __fastcall__ textcolor (unsigned char color);
; unsigned char __fastcall__ bgcolor (unsigned char color);
; unsigned char __fastcall__ bordercolor (unsigned char color);
lda #$c8
sta VIC_CTRL2
-; copy charset to RAM under I/O -> FIXME: generate at runtime
+ ; copy charset to RAM under I/O
+ ; FIXME: move charset and this constructor into init segment
sei
lda $01
pha
;
+; Groepaz/Hitmen, 12.10.2015
+;
; void cvlinexy (unsigned char x, unsigned char y, unsigned char length);
; void cvline (unsigned char length);
;
+;
+; Groepaz/Hitmen, 12.10.2015
+;
+; lowlevel kclrscr for soft80 implementation
+;
.export soft80_kclrscr
.import soft80_kplot
+;
+; Groepaz/Hitmen, 12.10.2015
+;
+; lowlevel kplot function for the soft80 implementation
+;
+
.export soft80_kplot
.include "c64.inc"
ldy CURS_X
rts
+ ; FIXME: the following tables take up 260 bytes, perhaps move them
+ ; to 0xdc00... area in ram under i/o
+
.rodata
_bitmapxlo:
.repeat 80,col
+;
+; Groepaz/Hitmen, 12.10.2015
+;
+; lowlevel screensize function for the soft80 implementation
+;
.export soft80_screensize