aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-03-14 02:32:09 -0400
committerB. Watson <urchlay@slackware.uk>2026-03-14 02:32:09 -0400
commit7dd075509dbbf4883388240af2cf4c6dd925cc87 (patch)
tree798ff60b9570fdca60b4c11a1f6a7a5478e63a5a
parent52940550fae5f5002d58653d146c862d8a637aa8 (diff)
downloadfujinet-chat-7dd075509dbbf4883388240af2cf4c6dd925cc87.tar.gz
use GR.1 for screen status line. also revert to using only one status_box.
-rw-r--r--font_dl.asm2
-rw-r--r--src/addrs.c17
-rw-r--r--src/addrs.h10
-rw-r--r--src/edbox.c1
-rw-r--r--src/main.c2
-rw-r--r--src/screen.c19
6 files changed, 30 insertions, 21 deletions
diff --git a/font_dl.asm b/font_dl.asm
index c49d53d..70222e3 100644
--- a/font_dl.asm
+++ b/font_dl.asm
@@ -73,7 +73,7 @@ dl_bot_lms
.byte $42 ; LMS GR.0
dl_status_lms
.word scr0_bot+920 ; line 23
- .byte $02
+ .byte $06 ; one GR.1 line
.byte $41 ; JVB
.word dlist_bot
diff --git a/src/addrs.c b/src/addrs.c
index c130cb1..8989962 100644
--- a/src/addrs.c
+++ b/src/addrs.c
@@ -6,6 +6,7 @@ u8 *dlist_bot = u8p(DLIST_BOT_ADDR);
u16 *dlist_top_lms = u16p(0xbfa4);
u16 *dlist_bot_lms = u16p(0xbfd4);
u16 *dlist_status_lms = u16p(0xbfee);
+u8 *dlist_last_line = u8p(0xbff0);
u8 *edit_box = u8p(0x0600); /* up to 256 bytes (page 6) */
u8 *rx_buf = u8p(0xa000); /* 512 bytes */
@@ -44,13 +45,9 @@ u8 *screen_lastlines[7] = {
u8p(0xbf28)
};
-/* 80 bytes (2 lines), bottom 2 of each _bot_addr */
-u8 *status_boxes[7] = {
- u8p(0xa798),
- u8p(0xab80),
- u8p(0xaf68),
- u8p(0xb398),
- u8p(0xb780),
- u8p(0xbb68),
- u8p(0xbf50)
-};
+/* 60 bytes, 1 GR.0 line and 1 GR.1 line. also 20 more bytes filler.
+ this is the bottom 2 lines of screen 0.
+ screens 1-6 actually have 80 bytes of free RAM
+ at the bottom (2 unused lines), for now at least. addresses:
+ 0xab80 0xaf68 0xb398 0xb780 0xbb68 0xbf50 */
+u8 *status_box = 0xa798;
diff --git a/src/addrs.h b/src/addrs.h
index dd9f23d..1aca8be 100644
--- a/src/addrs.h
+++ b/src/addrs.h
@@ -14,9 +14,13 @@ extern u8 *dlist_top, *dlist_bot;
extern u16 *dlist_top_lms;
extern u16 *dlist_bot_lms;
-/* points to either edit_box or one of the status_boxes[] */
+/* points to either edit_box or status_box */
extern u16 *dlist_status_lms;
+/* ANTIC mode of last line, either 2 for GR.0 (edit box showing)
+ or 6 for GR.1 (status box showing) */
+extern u8 *dlist_last_line;
+
/* only one of these (not one per screen) */
extern u8 *edit_box;
@@ -29,5 +33,5 @@ extern u8 *screen_bot_addrs[7];
/* address of last line of _bot, where printing actually happens */
extern u8 *screen_lastlines[7];
-/* bottom 2 lines of the _bot display list for each screen */
-extern u8 *status_boxes[7];
+/* bottom 2 lines, shared by all screens */
+extern u8 *status_box;
diff --git a/src/edbox.c b/src/edbox.c
index 1b56e5c..4847713 100644
--- a/src/edbox.c
+++ b/src/edbox.c
@@ -39,6 +39,7 @@ void edbox_show(void) {
scr_waitvcount(116);
*dlist_status_lms = addr;
+ *dlist_last_line = 0x02; /* ANTIC GR.0 */
edbox_visible = 1;
show_cursor();
}
diff --git a/src/main.c b/src/main.c
index ed310b6..135ce89 100644
--- a/src/main.c
+++ b/src/main.c
@@ -163,6 +163,8 @@ void main(void) {
OS.soundr = 0; // Turn off SIO beeping sound
OS.color2 = conf->colors[0];
OS.color1 = conf->colors[1];
+ OS.color0 = 0xca; /* green for active */
+ OS.color3 = 0x48; /* red for highlight (not used yet) */
OS.noclik = conf->disable_keyclick;
hz = (GTIA_READ.pal & 0x0e) ? 60 : 50;
diff --git a/src/screen.c b/src/screen.c
index 5fa7ce6..6b12302 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -131,28 +131,33 @@ void scr_show_status(char s) {
int i;
char *p, sc;
- /* this part should be moved to _create() */
- p = status_boxes[s];
+ p = status_box;
p[0] = s + 177; /* inverse number */
p[1] = ':';
strncpy(p + 2, scr_names[s], 32);
- p += 33;
+ p += 45;
+ *p++ = '<';
for(i = 0; i < MAX_SCREENS; i++) {
+ sc = i + '1';
switch(scr_status[i]) {
case SCR_ACTIVE:
- sc = 128 | ('1' + i); break;
+ break;
case SCR_INACTIVE:
- sc = '1' + i; break;
+ sc |= 0x40;
+ break;
+ /* TODO: case SCR_HILITE: sc |= 0c0; break; */
default:
- sc = ' ';
+ sc = '.';
}
*p++ = sc;
}
+ *p++ = '>';
if(!edbox_visible) {
scr_waitvcount(112);
- *dlist_status_lms = (u16)status_boxes[s];
+ *dlist_status_lms = (u16)status_box;
+ *dlist_last_line = 0x06; /* ANTIC GR.1 */
}
}