<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gbos.git/tools/gbtype, branch master</title>
<subtitle>gbos - a tiny Unix-flavored OS for the Game Boy Color (kernel, shell, coreutils in C, RAM filesystem)</subtitle>
<id>https://git.sl0p.foo/gbos.git/atom/tools/gbtype?h=master</id>
<link rel='self' href='https://git.sl0p.foo/gbos.git/atom/tools/gbtype?h=master'/>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/gbos.git/'/>
<updated>2026-07-17T22:31:27Z</updated>
<entry>
<title>tools: gbtype prints hub errors to stderr and exits 1</title>
<updated>2026-07-17T22:31:27Z</updated>
<author>
<name>user</name>
<email>user@clank</email>
</author>
<published>2026-07-17T22:31:27Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/gbos.git/commit/?id=e30b5cd3029b54296ddc9af9b02588d7cc06fd86'/>
<id>urn:sha1:e30b5cd3029b54296ddc9af9b02588d7cc06fd86</id>
<content type='text'>
</content>
</entry>
<entry>
<title>gbhub: control socket + gbtype to inject shell input without the OSK</title>
<updated>2026-07-17T18:31:00Z</updated>
<author>
<name>user</name>
<email>user@clank</email>
</author>
<published>2026-07-17T18:31:00Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/gbos.git/commit/?id=138e0ad2eb25ee078464c7e2ff7d6a919a188634'/>
<id>urn:sha1:138e0ad2eb25ee078464c7e2ff7d6a919a188634</id>
<content type='text'>
Typing into a Game Boy meant driving the on-screen keyboard by hand. But
the link port already *is* the shell's console: bytes the hub sends
un-SLIP-framed land straight on stdin (that's what GB.type() has always
done for spawn-mode command scripting). This just exposes it.

gbhub now serves a control socket (/tmp/gbhub.ctl, world-connectable like
the join socket) accepting two commands: 'list' and 'type [idx]' followed
by a payload (delimited by the client's half-close). Injection is chunked
and paced to respect the 64-byte kernel console ring, so arbitrarily long
input - even multi-line scripts - reaches the shell without overflow. The
server runs in both daemon and spawn modes.

tools/gbtype is the client:
  tools/gbtype 'ls -l'        run a command on GB0 (Enter appended)
  tools/gbtype -g 1 ps        target the Nth joined Game Boy
  tools/gbtype -n abc         no trailing Enter
  tools/gbtype -r             just press Enter
  tools/gbtype -l             list connected Game Boys
  printf 'ls\nuname\n' | tools/gbtype    pipe a script via stdin

Options precede the command; the first non-option word starts literal
text, so 'gbtype ls -l' needs no quoting. No root required.

Verified end to end: injected list/uname/echo through the real CTL
protocol and saw the shell execute each and echo output back.
</content>
</entry>
</feed>
