fix(sim): white-on-black display palette instead of amber

Real SSD1306/SH1106 OLEDs this sim mirrors are monochrome white-on-black,
not amber -- swap the canvas fillStyle/strokeStyle from #ffb000 to #fff
everywhere the sim display driver blits lit pixels.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018iubftDmKNWmkNnhJRz8UH
This commit is contained in:
Jakub
2026-09-03 23:05:04 +02:00
co-authored by Claude Sonnet 5
parent 1eb088a0db
commit f8ab4c3a98
2 changed files with 11 additions and 10 deletions
+2 -2
View File
@@ -123,7 +123,7 @@ void SimDisplayDriverCanvas::print(const char* str) {
gfx.resetDirty();
gfx.setCursor(_cursor_x, _cursor_y);
// color arg is just our own internal "lit" marker (1) -- the real on-screen
// amber/black choice is applied once at blit time below, from _color, same
// white/black choice is applied once at blit time below, from _color, same
// as every other primitive in this class. sz is the real current text
// size (set via setTextSize(), e.g. the Clock screen's big digits) --
// miscFixedPrint()/miscFixedDrawGlyph() scale both the glyph pixels and
@@ -141,7 +141,7 @@ void SimDisplayDriverCanvas::print(const char* str) {
if (!Module.__simCtx) return;
var ctx = Module.__simCtx;
var buf = $0;
ctx.fillStyle = UTF8ToString($5) === 'L' ? '#ffb000' : '#000';
ctx.fillStyle = UTF8ToString($5) === 'L' ? '#fff' : '#000';
for (var y = $2; y <= $4; y++) {
for (var x = $1; x <= $3; x++) {
if (HEAPU8[buf + y * 128 + x]) ctx.fillRect(x, y, 1, 1);