<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sl0pboy.git/src/gb.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/gb.c?h=master</id>
<link rel='self' href='https://git.sl0p.foo/sl0pboy.git/atom/src/gb.c?h=master'/>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/'/>
<updated>2026-07-17T17:46:58Z</updated>
<entry>
<title>gb: auto-reconnect a dead --serial-sock link instead of going silent</title>
<updated>2026-07-17T17:46:58Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-07-17T17:46:58Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=130215c21ce4aa300abc9a276e2ffb35c8f43803'/>
<id>urn:sha1:130215c21ce4aa300abc9a276e2ffb35c8f43803</id>
<content type='text'>
Root-cause work for the 'idle link-socket drop' (see gbos
docs/link-drop-investigation.md): when the hub restarts or the bridge
dies, the link fd went dead forever - and before SIGPIPE was ignored,
the next console-echo write() would kill the whole emulator silently.

Now, in --serial-sock mode, EOF on read or EPIPE/ECONNRESET/ENOTCONN/
EBADF on either direction marks the link dead, closes the fd, and
retries connect() every 500ms from the serial poll path (the guest
polls constantly, so no extra plumbing). RX stays pending while down
(serial_no_eof semantics), so the guest just sees a quiet link that
comes back. Logs 'link socket lost / reconnected' either way.

Verified: SIGKILL the hub, restart it - every GB reconnects within ~1s
and keeps its lease.
</content>
</entry>
<entry>
<title>gb: boot ROM (BIOS) support</title>
<updated>2026-07-16T22:27:06Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-07-16T22:27:06Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=9a48db9bbc913171c62c86ff8649467474533e2d'/>
<id>urn:sha1:9a48db9bbc913171c62c86ff8649467474533e2d</id>
<content type='text'>
Add optional boot ROM emulation. When a boot ROM image is loaded, gb_reset
starts execution at PC=0 with power-on register state instead of the
documented post-boot state; the ROM overlays low memory (with the CGB
0x0100-0x01FF header hole showing the cartridge through) until the game
writes 0xFF50 to hand off. gb_load_bootrom() accepts 256-byte (DMG) or
2304-byte (CGB) images.
</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>serial: deliver EOF (0x04) on stdin end for headless console</title>
<updated>2026-07-16T05:21:40Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-07-16T05:21:40Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=1f90c9415b2960a349adfc82805b27e5290033e7'/>
<id>urn:sha1:1f90c9415b2960a349adfc82805b27e5290033e7</id>
<content type='text'>
read()==0 completes the external-clock transfer with SB=0x04 (EOT), so a gbos
program's readc() sees EOF instead of polling forever. Enables cat/wc-style
tools and lets the shell exit on Ctrl-D / pipe end.
</content>
</entry>
<entry>
<title>serial: clean RX path for headless console</title>
<updated>2026-07-15T22:31:28Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-07-15T22:31:28Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=9158def0bc2db746c6c18312d3b7832addc233f8'/>
<id>urn:sha1:9158def0bc2db746c6c18312d3b7832addc233f8</id>
<content type='text'>
- external-clock transfers (SC=$80) deliver a stdin byte into SB without
  echoing to stdout, and stay pending when no input is available -&gt; programs
  can poll for input cleanly. internal-clock (SC=$81) stays pure TX.
</content>
</entry>
<entry>
<title>serial: headless mode tying serial port to stdio for OS debugging</title>
<updated>2026-07-15T21:44:28Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-07-15T21:44:28Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=24a015ff047d4b7bb955ba4bc61d5793d7492878'/>
<id>urn:sha1:24a015ff047d4b7bb955ba4bc61d5793d7492878</id>
<content type='text'>
- --headless: no rendering/TUI; serial TX -&gt; stdout, RX &lt;- stdin (nonblocking)
- generalize serial: serial_out_fd/serial_in_fd on the GB; internal-clock
  transfer now shifts in a real RX byte (from stdin) instead of always 0xFF
- paced to native speed by default, --uncapped for turbo; pipes/scripts cleanly
- README: document headless serial console
</content>
</entry>
<entry>
<title>apu: register-level emulation of 0xFF10-0xFF3F (fixes music fades)</title>
<updated>2026-07-14T22:37:04Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-07-14T22:37:04Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=12e67588053160d2f9599a09ef932f9b37b1b873'/>
<id>urn:sha1:12e67588053160d2f9599a09ef932f9b37b1b873</id>
<content type='text'>
The APU was a black hole: reads returned 0xFF, writes were dropped. That hangs
any game that fades music out by decrementing the NR50/rAUDVOL volume register
until it reads 0 (Pokemon's StopMusic spin-wait) - the write never stuck, the
read never hit 0, infinite loop. Store the 48 sound registers and return them
with the standard hardware read-back OR-masks (NR50 mask 0x00 = exact readback).
No synthesis, just correct register behavior.
</content>
</entry>
<entry>
<title>core emulator: SM83 CPU, MMU, timer, PPU, CGB support</title>
<updated>2026-07-04T20:11:10Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-07-04T20:11:10Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=bc48df9f7162a4a816fdc0edaa6ed08304008c9c'/>
<id>urn:sha1:bc48df9f7162a4a816fdc0edaa6ed08304008c9c</id>
<content type='text'>
Passes blargg cpu_instrs (all 11), instr_timing, mem_timing.
</content>
</entry>
</feed>
