diff options
| author | user <user@clank> | 2026-07-18 20:41:27 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-07-18 20:41:27 +0200 |
| commit | 9e7d5f6e5e01b7473b84bc3449d7f8e0f78e7045 (patch) | |
| tree | 5dcde624f3b366cc9244e08b0d2ca4ab35b338e2 /src/programs.asm | |
| parent | kernel: a real timer source (64 Hz tick IRQ) + uptime(1) (diff) | |
| download | gbos-9e7d5f6e5e01b7473b84bc3449d7f8e0f78e7045.tar.gz gbos-9e7d5f6e5e01b7473b84bc3449d7f8e0f78e7045.tar.xz gbos-9e7d5f6e5e01b7473b84bc3449d7f8e0f78e7045.zip | |
term: 7-color terminal (per-glyph fg+bg) + ANSI escapes; colorize irc
Fano-plane palette scheme: the 7 colors map onto 7 CGB BG palettes so
any color pair shares one palette; a tile's palette is picked from the
set of colors its two cells need (tables generated by tools/gencolor.py).
Per cell a packed (bg<<4)|fg byte lives alongside the char shadow, and
the glyph blitter steers glyph/empty pixels to each cell's fg/bg color
slots via plane masks.
An ANSI-ish CSI parser (ESC [ .. m) drives it; usr/ansi.c demos it and
the irc client now renders hashed nick colors, status dimming and a
channel-activity bar.
Diffstat (limited to 'src/programs.asm')
| -rw-r--r-- | src/programs.asm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/programs.asm b/src/programs.asm index 7c17fb5..c6228f3 100644 --- a/src/programs.asm +++ b/src/programs.asm @@ -136,6 +136,9 @@ ProgIrc: SECTION "prog_uptime", ROMX[$4000], BANK[33] ProgUptime: INCBIN "build/usr/uptime.bin" +SECTION "prog_ansi", ROMX[$4000], BANK[34] +ProgAnsi: + INCBIN "build/usr/ansi.bin" ; ----------------------------------------------------------------------------- ; PROG_SH (bank 3) - the shell, now written in C (usr/sh.c): parses >/</| and @@ -242,6 +245,8 @@ ProgramTable:: dw ProgIrc db LOW(BANK(ProgUptime)), HIGH(BANK(ProgUptime)) dw ProgUptime + db LOW(BANK(ProgAnsi)), HIGH(BANK(ProgAnsi)) + dw ProgAnsi ProgramTableEnd:: ; ----------------------------------------------------------------------------- @@ -313,4 +318,6 @@ NameTable:: db PROG_IRC db "uptime", 0 db PROG_UPTIME + db "ansi", 0 + db PROG_ANSI db 0 |
