<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sl0pboy.git/src/main.c, branch master</title>
<subtitle>sl0pboy - a Game Boy Color emulator (companion to the gbos OS)</subtitle>
<id>https://git.sl0p.foo/sl0pboy.git/atom/src/main.c?h=master</id>
<link rel='self' href='https://git.sl0p.foo/sl0pboy.git/atom/src/main.c?h=master'/>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/'/>
<updated>2026-07-18T18:41:19Z</updated>
<entry>
<title>render: --shrink N - downscale the half-block live display (1-4)</title>
<updated>2026-07-18T18:41:19Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-07-18T18:41:19Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=fa1579cc9f209dbeb14ab277dc9c4ac741ace57c'/>
<id>urn:sha1:fa1579cc9f209dbeb14ab277dc9c4ac741ace57c</id>
<content type='text'>
Decimates the LCD N x N before the half-block encode so the monitor pane
takes 160/N cols x 72/N rows. Display-only: capture, recording and sixel
still read the full-res framebuffer.

Decimation is max-luma pick, not box-average: terminal fonts are 1px
bright strokes on dark background, and averaging dims them into grey
mush (the 'blurry font' regression). Keeping the brightest source pixel
of each block preserves stroke brightness and hue.
</content>
</entry>
<entry>
<title>main: allow --sock (control/debug socket) in headless mode</title>
<updated>2026-07-17T18:22:13Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-07-17T18:22:13Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=e8c1777a1761ebf55029589912198c83fb06aaec'/>
<id>urn:sha1:e8c1777a1761ebf55029589912198c83fb06aaec</id>
<content type='text'>
The control socket was only opened on the windowed path, so a --headless
GB couldn't be inspected. A scriptable, invisible GB is exactly the one
you most want to peek into - reading kernel WRAM over the debug socket is
how the TCP field-offset corruption got pinned down. Open it in the
headless loop too and poll it each frame; close it on exit.
</content>
</entry>
<entry>
<title>main: silence stderr while the live sixel display is up</title>
<updated>2026-07-17T17:45:03Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-07-17T17:45:03Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=a3dd7fa747d631831e920aa55ed03e7954ca6517'/>
<id>urn:sha1:a3dd7fa747d631831e920aa55ed03e7954ca6517</id>
<content type='text'>
Runtime chatter (link reconnect notices, input debug, cart warnings) was
landing mid-sixel-stream and corrupting the picture. Redirect fd 2 to
/dev/null for the duration of the display loop; restored on exit so the
final stats line still prints. Startup errors before the display begins
are unaffected.
</content>
</entry>
<entry>
<title>main: --serial-sock PATH - link port over a unix socket (net + live display)</title>
<updated>2026-07-17T11:22:00Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-07-17T11:22:00Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=346634bbd7376c0120c51e8ec5ba3d7d400fc567'/>
<id>urn:sha1:346634bbd7376c0120c51e8ec5ba3d7d400fc567</id>
<content type='text'>
The serial fds are serviced by cpu_step in every mode, so wiring them to a
connected unix socket lets networking run alongside a live display (--sixel /
terminal) - unlike --headless, which needs stdio for the serial. The emulator
connects to PATH (retrying ~1s so a launcher can listen first) and uses it
non-blocking with no EOF-exit; it overrides the headless stdio serial.

Pairs with gbos tools/netboot, which listens on PATH, brings up a TUN+NAT, and
bridges the socket &lt;-&gt; TUN. In windowed mode the OSK is the console and the
link port is pure network - cleanly separated. Verified: host pings the GB 3/3
over the socket link.
</content>
</entry>
<entry>
<title>rebrand: gbc -&gt; sl0pboy (binary, README, tooling)</title>
<updated>2026-07-16T23:08:48Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-07-16T23:08:48Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=c714fc8927c454b5cf4735429b4cc9cde7aa5760'/>
<id>urn:sha1:c714fc8927c454b5cf4735429b4cc9cde7aa5760</id>
<content type='text'>
</content>
</entry>
<entry>
<title>main: options-first CLI with --help, and wire up display/boot flags</title>
<updated>2026-07-16T22:27:46Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-07-16T22:27:46Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=6c906a750675910323710b293f939a5f26dadd58'/>
<id>urn:sha1:6c906a750675910323710b293f939a5f26dadd58</id>
<content type='text'>
- Rewrite argument handling: the ROM is now the final argument and options
  precede it (parsed in argv[1..argc-2] so optional-value flags never swallow
  the ROM). Add grouped --help/-h, unknown-option errors, and clear 'missing
  value'/'no ROM' diagnostics.
- Add --chrome, --palette/--green, and --bios flags; set the display/capture
  options before the --shot and recording paths so screenshots and recordings
  honor them. Make --shot dump the composited capture frame.
- gbctl: pass the ROM last when spawning the emulator.
- gitignore the (copyrighted) bios/ directory; document all new flags.
</content>
</entry>
<entry>
<title>main/gb: --keys button-script harness + serial_no_eof for OSK testing</title>
<updated>2026-07-16T14:06:49Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-07-16T14:06:49Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=0b30297393430450486ce54ba5c3c47155a0dc68'/>
<id>urn:sha1:0b30297393430450486ce54ba5c3c47155a0dc68</id>
<content type='text'>
--keys "udlrabse." plays scripted joypad taps (each char = one button
held 10 frames then released 10, so the guest sees a clean edge); pairs
with --headless --shot to drive on-screen input and capture the result.
When --keys is active, serial-RX EOF stays pending instead of sending
$04, so a shell blocked on read waits for OSK input instead of exiting.
</content>
</entry>
<entry>
<title>main: --shot with --headless dumps final LCD on exit</title>
<updated>2026-07-16T13:44:57Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-07-16T13:44:57Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=cc86ccf4011dd470bd43a8bba8795e25136f1e6f'/>
<id>urn:sha1:cc86ccf4011dd470bd43a8bba8795e25136f1e6f</id>
<content type='text'>
Lets scripted runs feed stdin to the serial console AND capture the
resulting screen, e.g. printf 'ls\nexit\n' | gbc rom.gb --headless --shot 0 out.ppm
Previously --shot ran frames with no stdin, so anything waiting on input
(a shell) only showed its first prompt.
</content>
</entry>
<entry>
<title>headless: $ED opcode = clean power-off (exit + battery save)</title>
<updated>2026-07-16T10:49:02Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-07-16T10:49:02Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=ca6f9bb91893cf50c8e09bf7396085a7d69e80ab'/>
<id>urn:sha1:ca6f9bb91893cf50c8e09bf7396085a7d69e80ab</id>
<content type='text'>
The unused SM83 opcode $ED now sets gb-&gt;poweroff, which breaks the headless
loop so the normal cart_free()-&gt;cart_save() path runs. Lets a guest OS shut the
emulator down cleanly (and flush its .sav) instead of relying on an external
timeout/SIGTERM, which could SIGKILL before the save. run_frame() also stops on
poweroff so exit is immediate.
</content>
</entry>
<entry>
<title>headless: interactive TTY mode (raw stdin) for driving a guest OS live</title>
<updated>2026-07-16T09:25:43Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-07-16T09:25:43Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=283040a1a5356e774276ba8f6c7404483b81bc11'/>
<id>urn:sha1:283040a1a5356e774276ba8f6c7404483b81bc11</id>
<content type='text'>
When stdin is a terminal, --headless now disables canonical mode + local echo
so keystrokes reach the guest immediately and only the guest echoes (no doubled
chars). Piped/redirected stdin is untouched (scripted input still works). Keep
ISIG so Ctrl-C quits; restore termios on exit. VMIN=1 so a no-data non-blocking
read is EAGAIN, not a 0-byte read the serial layer would misread as EOF.
</content>
</entry>
</feed>
