| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
The unused SM83 opcode $ED now sets gb->poweroff, which breaks the headless
loop so the normal cart_free()->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.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
- external-clock transfers (SC=$80) deliver a stdin byte into SB without
echoing to stdout, and stay pending when no input is available -> programs
can poll for input cleanly. internal-clock (SC=$81) stays pure TX.
|
| |
|
|
|
|
|
|
| |
- --headless: no rendering/TUI; serial TX -> stdout, RX <- 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two socket features for building reproducible showcase clips:
- record start <path> [everyN] / record stop: append the RGB888 framebuffer of
each produced frame to a flat 'GBCV' capture file (downsample with everyN).
tools/gbgif.py turns it into a GIF (or PNG frames). Capture is decoupled from
wall-clock/turbo/frameskip, so timing is always correct.
- input play <path> [reset] / input stop: drive the joypad from a synthesized
TAS-style movie (text: '<frames> [buttons...]' per line), frame-locked so
replay is deterministic. 'reset' does an exact power-on (preserve cart
ROM+SRAM, zero all other state) so a movie replays byte-identically -- verified
by hashing two runs. tools/gbmovie.py is a Python builder for movies.
|
| |
|
|
|
| |
In --sixel mode the emulator drew a status line (title/skip/[f]ast/q:quit) under
the image; drop it so sixel output is nothing but the game graphics.
|
| |
|
|
|
|
|
|
|
| |
A client that connects and closes before reading (e.g. the HUD's liveness
probe) made the greeting write() raise SIGPIPE, terminating the whole emulator
- this was behind much of the 'it keeps dying' this session. Also: gbhud now
re-resolves the live instance from the registry on every reconnect (skipping
stale sockets by test-connecting), so the HUD follows respawns, and its box
rendering is ANSI-width-correct.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the input-only FIFO's limitations with a Unix-domain socket control
channel (--sock) that is a superset of the button vocabulary plus emulator
introspection: read/write bus memory, get/set CPU context, single-step, PC
breakpoints, value-change watchpoints, run/pause. Being a socket it replies to
each command and broadcasts async 'event stop ...' lines; a stored last-stop
record (stopinfo) lets per-request clients recover a missed event.
Add gbctl: a stdlib-python CLI that spawns a tmux pane running the emulator on
a ROM, auto-resolves the socket, and drives it with terse verbs (cpu/read/write/
reg/step/break/watch/continue/pause/press/hold/screen/stop). The FIFO stays as
legacy input-only.
|
| |
|
|
|
|
|
| |
Emulation always runs at native rate (correct game speed); --frameskip N draws
only 1 of every N+1 frames so a slow terminal no longer bottlenecks the loop.
Adds --fps cap, --uncapped/--turbo, live [ ] and f keys, HUD readout, and an
exit summary of emulated-vs-drawn fps. Replaces the confusing --render-fps.
|
| |
|
|
|
|
|
| |
Adds --fifo [path] opening a named pipe that accepts button commands from any
process. Supports momentary taps (a, start, name:N), deterministic hold/release
(+name / -name), and 'release'. Merges with keyboard input; held state carries
true key-up semantics the terminal can't provide. GBC_INPUT_DEBUG traces state.
|
| |
|
|
|
|
|
| |
Only cells that changed since the previous frame are redrawn, using cursor
positioning to skip unchanged runs. Static screens write nothing after the
first frame (~108x reduction on acid2). SIGWINCH forces a full repaint.
Verified pixel-exact against the framebuffer (11520/11520 cells, 0 mismatch).
|
| | |
|
| | |
|
| |
|
|
| |
Passes blargg cpu_instrs (all 11), instr_timing, mem_timing.
|
| |
|