aboutsummaryrefslogtreecommitdiffstats
path: root/demo (follow)
Commit message (Collapse)AuthorAgeFilesLines
* demo: boot the SL0PBOY-forked BIOS in the README gifHEADmasteruser3 days2-1/+1
| | | | | | | gbdemo resolves a bare --bios to bios/sl0pboy_bios.bin when present (else stock gbc_bios.bin). Generate the fork with the emulator's tools/mk_sl0pboy_bios.py. The gif now opens on the SL0PBOY boot animation - logo drop, colorize, chime - before gbos comes up.
* term+libc: batched write rendering - one tile render per write(), 2.3x linesuser3 days1-0/+0
| | | | | | | | | | | | | | | | | sys_write sets wBatch; render_cursor_tile - the single choke point all of term_putc's visible mutations pass through - then marks a dirty span (per LINE-SLOT, so spans survive scroll rotation for free) instead of rendering. term_write_end renders every dirty tile exactly once, then the cursor. Scrolls stay immediate (blank rebuild is cheap and artifact-free); file-bound writes flush for free. The enabler is in libc: puts() was a SYS_PUTC trap PER CHARACTER, so almost no console output ever went through sys_write. It now issues one SYS_WRITE for the whole string - one trap, one batch, and every line-printer (echo, irc, the shell) gets the batched path. Measured: 37-char write = 128k cycles (3.5k/char) vs ~8k/char down the per-char trap path. Full demo passes; GIF regenerated.
* demo: boot through the CGB BIOS + double-speed ROM in the README gifuser3 days2-3/+4
| | | | | | | | | spawn --bios shows the real power-on show (logo drop + splash) before gbos boots; gbdemo resolves a bare --bios to the emulator's bundled boot ROM by absolute path (the tmux pane cwd is wherever the user is). The screen-synced waitfor absorbs the extra ~4s - only the first prompt timeout got a bump. Regenerated with the double-speed kernel: same demo, boots and scrolls visibly snappier.
* term: SCY ring-scroll - scroll writes ONE map row; OSK toggle is 212 cyclesuser3 days1-0/+0
| | | | | | | | | | | | | | | | | | | | | The BG map's 32 rows become a ring: logical row L always lives at map row (wMapTop + L) & 31, and SCY = (wMapTop + wViewTop)*8 places the view. Scrolling bumps wMapTop, rebuilds the one new bottom line and writes its single map row (map_row_one); the other 17 rows move for free. The whole OSK view dance - shift the cursor above the keys, restore the backlog on hide - is now term_view_update: one SCY write, no map rewrite at all. OSK safety: the keyboard lives on the WINDOW layer, which SCY never moves. Stale ring rows can only appear under it: wViewTop = max(0, wCurRow-14) <= 3 is nonzero only while the OSK is visible, and the window covers exactly those bottom 3 rows (WX=7, WY=120). Verified: scroll + view shift + scroll-while-OSK-up + backlog restore all pixel-correct via VRAM screenshots; full README demo passes. term_scroll: 78.5k -> 35.6k T-cycles (857k pre-optimization: 24x). OSK toggle: 45k tilemap rewrite -> 212 cycles. Regenerated demo/gbos-demo.gif on the new renderer.
* tools: gbdemo - scripted, screen-synced demo driver (+ the README demo)user3 days2-0/+44
Runs a step file: spawns a GB on the gbhub network, records the LCD to a .gbv over the emulator control socket, injects console text (hub ctl, like gbtype) and button events (gbctl) at the right moments, then renders a GIF (gbgif.py). Sync is waitfor/waitgone on the terminal's WRAM shadow (TERM_BUF $D600 + wAssign row map) read via the emulator's debug socket - steps key off real screen output, so boot/DHCP/IRC timing can vary without breaking the choreography. demo/readme.gbd is the README GIF: cold boot -> uname -> ping -> IRC session on 10.0.0.1.