diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-03-14 02:32:09 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-03-14 02:32:09 -0400 |
| commit | 7dd075509dbbf4883388240af2cf4c6dd925cc87 (patch) | |
| tree | 798ff60b9570fdca60b4c11a1f6a7a5478e63a5a /src | |
| parent | 52940550fae5f5002d58653d146c862d8a637aa8 (diff) | |
| download | fujinet-chat-7dd075509dbbf4883388240af2cf4c6dd925cc87.tar.gz | |
use GR.1 for screen status line. also revert to using only one status_box.
Diffstat (limited to 'src')
| -rw-r--r-- | src/addrs.c | 17 | ||||
| -rw-r--r-- | src/addrs.h | 10 | ||||
| -rw-r--r-- | src/edbox.c | 1 | ||||
| -rw-r--r-- | src/main.c | 2 | ||||
| -rw-r--r-- | src/screen.c | 19 |
5 files changed, 29 insertions, 20 deletions
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(); } @@ -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 */ } } |
