From 07f1879f85f7cbb1f61f483c14e2ced159062e1f Mon Sep 17 00:00:00 2001 From: mrdudz Date: Mon, 12 Oct 2015 14:40:12 +0200 Subject: [PATCH] added some more comments and -headers --- libsrc/c64/extra/soft80.s | 4 ++++ libsrc/c64/soft80.inc | 5 +++++ libsrc/c64/soft80_charset.s | 13 ++++++++++++- libsrc/c64/soft80_chline.s | 2 ++ libsrc/c64/soft80_color.s | 2 ++ libsrc/c64/soft80_conio.s | 3 ++- libsrc/c64/soft80_cvline.s | 2 ++ libsrc/c64/soft80_kclrscr.s | 5 +++++ libsrc/c64/soft80_kplot.s | 9 +++++++++ libsrc/c64/soft80_scrsize.s | 5 +++++ 10 files changed, 48 insertions(+), 2 deletions(-) diff --git a/libsrc/c64/extra/soft80.s b/libsrc/c64/extra/soft80.s index 80ef338b6..d43443fc8 100644 --- a/libsrc/c64/extra/soft80.s +++ b/libsrc/c64/extra/soft80.s @@ -1,3 +1,7 @@ +; +; Groepaz/Hitmen, 12.10.2015 +; +; import/overload stubs for the soft80 implementation ; soft80_cgetc.s diff --git a/libsrc/c64/soft80.inc b/libsrc/c64/soft80.inc index f2058f91d..a4bee337a 100644 --- a/libsrc/c64/soft80.inc +++ b/libsrc/c64/soft80.inc @@ -1,3 +1,7 @@ +; +; Groepaz/Hitmen, 12.10.2015 +; +; internal constants for the soft80 implementation soft80_lo_charset = $d000 soft80_hi_charset = $d400 @@ -8,6 +12,7 @@ soft80_bitmap = $e000 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 diff --git a/libsrc/c64/soft80_charset.s b/libsrc/c64/soft80_charset.s index f44fdaf77..7a4e10968 100644 --- a/libsrc/c64/soft80_charset.s +++ b/libsrc/c64/soft80_charset.s @@ -1,5 +1,5 @@ ; -; Groepaz/Hitmen, 10.10.2015 +; Groepaz/Hitmen, 12.10.2015 ; ; character set for use with the soft80 implementation ; @@ -14,6 +14,8 @@ ; - $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 ; @@ -29,6 +31,15 @@ ; +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 diff --git a/libsrc/c64/soft80_chline.s b/libsrc/c64/soft80_chline.s index e15d0c483..73c8c1e26 100644 --- a/libsrc/c64/soft80_chline.s +++ b/libsrc/c64/soft80_chline.s @@ -1,4 +1,6 @@ ; +; Groepaz/Hitmen, 12.10.2015 +; ; void chlinexy (unsigned char x, unsigned char y, unsigned char length); ; void chline (unsigned char length); ; diff --git a/libsrc/c64/soft80_color.s b/libsrc/c64/soft80_color.s index 3d9cca56c..925b161ed 100644 --- a/libsrc/c64/soft80_color.s +++ b/libsrc/c64/soft80_color.s @@ -1,4 +1,6 @@ ; +; 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); diff --git a/libsrc/c64/soft80_conio.s b/libsrc/c64/soft80_conio.s index 333251854..6691158d7 100644 --- a/libsrc/c64/soft80_conio.s +++ b/libsrc/c64/soft80_conio.s @@ -25,7 +25,8 @@ soft80_init: 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 diff --git a/libsrc/c64/soft80_cvline.s b/libsrc/c64/soft80_cvline.s index eaa850118..e2c6e947c 100644 --- a/libsrc/c64/soft80_cvline.s +++ b/libsrc/c64/soft80_cvline.s @@ -1,4 +1,6 @@ ; +; Groepaz/Hitmen, 12.10.2015 +; ; void cvlinexy (unsigned char x, unsigned char y, unsigned char length); ; void cvline (unsigned char length); ; diff --git a/libsrc/c64/soft80_kclrscr.s b/libsrc/c64/soft80_kclrscr.s index 790aa2749..95633de79 100644 --- a/libsrc/c64/soft80_kclrscr.s +++ b/libsrc/c64/soft80_kclrscr.s @@ -1,3 +1,8 @@ +; +; Groepaz/Hitmen, 12.10.2015 +; +; lowlevel kclrscr for soft80 implementation +; .export soft80_kclrscr .import soft80_kplot diff --git a/libsrc/c64/soft80_kplot.s b/libsrc/c64/soft80_kplot.s index 6df33c008..e359e9f58 100644 --- a/libsrc/c64/soft80_kplot.s +++ b/libsrc/c64/soft80_kplot.s @@ -1,4 +1,10 @@ +; +; Groepaz/Hitmen, 12.10.2015 +; +; lowlevel kplot function for the soft80 implementation +; + .export soft80_kplot .include "c64.inc" @@ -35,6 +41,9 @@ soft80_kplot: 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 diff --git a/libsrc/c64/soft80_scrsize.s b/libsrc/c64/soft80_scrsize.s index 1873f7327..b0f4f71e7 100644 --- a/libsrc/c64/soft80_scrsize.s +++ b/libsrc/c64/soft80_scrsize.s @@ -1,3 +1,8 @@ +; +; Groepaz/Hitmen, 12.10.2015 +; +; lowlevel screensize function for the soft80 implementation +; .export soft80_screensize -- 2.39.5