aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruser <user@clank>2026-07-18 00:31:27 +0200
committeruser <user@clank>2026-07-18 00:31:27 +0200
commit391833f8c611a206ed8d3f8483356a42e9890aa9 (patch)
tree23ac1e5bc5937c48010062e2b0f9d51375881886
parentirc: keep the keyboard live during RX floods (poll input every pass) (diff)
downloadgbos-391833f8c611a206ed8d3f8483356a42e9890aa9.tar.gz
gbos-391833f8c611a206ed8d3f8483356a42e9890aa9.tar.xz
gbos-391833f8c611a206ed8d3f8483356a42e9890aa9.zip
term: dark mode - black background, white text (OSK highlight inverts to match)
Diffstat (limited to '')
-rw-r--r--src/osk.asm11
-rw-r--r--src/term.asm18
2 files changed, 17 insertions, 12 deletions
diff --git a/src/osk.asm b/src/osk.asm
index 609f6be..f5d99ac 100644
--- a/src/osk.asm
+++ b/src/osk.asm
@@ -68,16 +68,17 @@ osk_disp:
; starts disabled.
; -----------------------------------------------------------------------------
osk_init::
- ; CGB BG palette 1 = inverted: color0 black, color1 white
+ ; CGB BG palette 1 = inverse of the dark terminal palette 0: color0 white,
+ ; color1 black - the highlighted OSK key reads as light-on-dark's opposite
ld a, $88 ; BCPS index 8 (palette 1, color 0), auto-inc
ld [rBCPS], a
- xor a
- ld [rBCPD], a
- ld [rBCPD], a ; c0 = $0000 black
ld a, $FF
ld [rBCPD], a
ld a, $7F
- ld [rBCPD], a ; c1 = $7FFF white
+ ld [rBCPD], a ; c0 = $7FFF white
+ xor a
+ ld [rBCPD], a
+ ld [rBCPD], a ; c1 = $0000 black
; build the key tiles (no cursor underline)
xor a
diff --git a/src/term.asm b/src/term.asm
index 64e45aa..099ca0a 100644
--- a/src/term.asm
+++ b/src/term.asm
@@ -53,20 +53,24 @@ term_init::
ld [rSCX], a
ld [rSCY], a
- ; BG palette 0: color0 = white (bg), color1 = black (text)
+ ; BG palette 0: color0 = black (bg), color1 = white (text) - dark terminal
ld a, $80
ld [rBCPS], a
- ld a, $FF
- ld [rBCPD], a
- ld a, $7F
- ld [rBCPD], a
xor a
ld [rBCPD], a
+ ld [rBCPD], a ; c0 = $0000 black (background)
+ ld a, $FF
ld [rBCPD], a
+ ld a, $7F
+ ld [rBCPD], a ; c1 = $7FFF white (text)
+ ld a, $FF
ld [rBCPD], a
+ ld a, $7F
+ ld [rBCPD], a ; c2 = white
+ ld a, $FF
ld [rBCPD], a
- ld [rBCPD], a
- ld [rBCPD], a
+ ld a, $7F
+ ld [rBCPD], a ; c3 = white
; state: assign[sr]=sr, cursor at 0,0 (on)
ld hl, wAssign