Skip to content

gr2: use only the low byte of a textport colour - #829

Merged
jamesbraid merged 1 commit into
techomancer:mainfrom
jamesbraid:pr/gr2-textport-colour
Nov 22, 2026
Merged

jamesbraid merged 1 commit into
techomancer:mainfrom
jamesbraid:pr/gr2-textport-colour

Conversation

@jamesbraid

Copy link
Copy Markdown
Collaborator

OpenBSD 6.9's boot messages on a GR2 came out as white rectangles. OpenBSD's console sends PUC_COLOR as rasops' 8-bit colour with the index repeated in all four bytes (0x07070707 for index 7). iris loaded the low 12 bits into the red channel, 0x707, which the default pixel format clamps to 255. The glyphs were white on a white cell.

A textport pixel is one byte, so PUC_COLOR now keeps the low byte. The PROM and NetBSD send small indices and are unaffected.

Tested:

  • A new unit test sends 0x07070707 and expects pixel 7. It fails without the change (255).
  • OpenBSD 6.9's installer boot log is readable on an indigo2_ip28 with a GR2 XZ, white on blue.
  • The GR2 PROM menu is byte-identical before and after.

What the real microcode does with the upper bytes is inferred from OpenBSD working on real boards, not known. OpenBSD's later lines also needed #824 (narrow DRAWCHAR rows), so #775 needs both.

Fixes #775

OpenBSD's GR2 console sends PUC_COLOR as rasops' 8-bit colour with the
index repeated in all four bytes (0x07070707 for index 7). PUC_COLOR
loaded the low 12 bits into the red channel, 0x707, which the default
pixel format clamps to 255. Every kernel message in OpenBSD 6.9's
installer drew white glyphs on a white cell: white rectangles (techomancer#775).

A textport pixel is one byte, so take the low byte. The PROM and NetBSD
send small indices and are unaffected.

Tested: a new unit test sends 0x07070707 and expects pixel 7, and fails
without the change (255). OpenBSD 6.9's boot log is readable on an
indigo2_ip28 with a GR2 XZ, white on blue. The GR2 PROM menu is
byte-identical before and after. What the real microcode does with the
upper bytes is inferred from OpenBSD working on real boards, not known.

Fixes: 5d07b4d ("added gr2 support")
@jamesbraid
jamesbraid marked this pull request as ready for review November 22, 2026 10:24
@jamesbraid
jamesbraid merged commit 82b083b into techomancer:main Nov 22, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenBSD 6.9 shows whit rectangles instead of kernel boot messages on Indigo2/XZ

1 participant