Renderer::setTextureUpscale draws a Texture marked asset (decoded from the game's
own data: packs::decodeRecord sets it) from a copy 2x or 4x as large, made by
worker threads and kept by content; until it is made the texture is drawn as it
is. Two filters written from the published method descriptions: edge-directed
(xBR family, exact coverage per output texel) and Catmull-Rom with no ringing,
both premultiplied by alpha. A repeating texture is scaled with the opposite
edge as its neighbour. The game's mip levels sit k levels down and a level
chosen from Q or fixed moves with them. Off: the same GL calls as before.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
TMB_Recomp's runtime builds on BozoEngine (its branch bozo/m0, cmake -DTMB_BOZO=ON): its overrides run natively, each
call checked against the reference's log (tmb-check), and with no log at all (tmb-headless).
- Port API (runtime/include/bozo/port.h, bozo_port): Registry::registerFunction, BOZO_PORT, the startup check that
every registered override is an external of the generated code (port::undeclared), and what overrides use: the
kernel (changePriority, rotateReadyQueue, transfer), the EE clock (now, accountCycles), vblankCount, the hardware
registers (ioRead32 / ioWrite32: a port's own access), frameEnd, callLibrary, scratchpad, libraries, deterministic,
realTime, setStorePatch. A port::Host is behind them.
- Overrides that run guest code (kernel.md section 3b): checkpoints charge, no event is taken in place; an event due,
a call that blocks, a jump through a register, an inner call's return and a recursive call's return make guest code
leave the override there, the stop deferred to its end (Dispatcher::beginOutcall / leave / takeDeferredStop); the
override's own code runs on, as the reference's did; no exception goes through it. Every rule settled on a record.
- Generated code: bozo::checkpoint and bozo::innerReturn return true when guest code leaves, the check after each
call tests ctx->leaving, a recursive call's return inside an override calls bozo_leave; ctx->outcall,
ctx->leaving; the externals table (<prefix>_external_table); "store 0xADDR" externals (the store sets ctx->pc first).
- bozo-externals (tools/externals): the --externals list from the ELF's symbols BozoEngine answers, a port's stub names
and its override list; --check compares the stubs with a call log's.
- bozo-run as a library (bozo_run, run_main.h): a port's checker links it with its generated code and overrides,
which run natively (--overrides native|log); LogHost checks each call (context words, memory runs, traced calls, the
operations and frame end inside, where it left) and pins where the reference's override left and whether a timed
call inside it waited. The renderer's draw lists fill the record's draws (reported).
- The free host (runtime/host/free_host.cpp, bozo_host): every out-call native, libraries bound by the ELF's symbols,
free timing, a watchdog when no frame ends.
- Moved from the team's fork code (phase4-inventory.md 2.1, MIT headers): the renderer's game side
(bozo/render/renderer.h, renderer.cpp: headless, recording the published lists and their hash), Texture,
the texture and mesh packs, mesh_draw, the movie picture hook, the FramePacer (unpaced off real time) and
determinism.h (settable by the host).
- Libraries, from what only ran inside overrides before: sceGsExecLoadImage (0, no upload), T8H/T4HL/T4HH image tags as
32-bit texels, the GS CSR's FIELD, sceSifSetDma raising SIF0's DMAC interrupt, CPCOND0 counting completions from
the last FlushCache, a port's own register accesses, RotateThreadReadyQueue returning 0, libmpeg calling the movie
picture hook, PadState::multitap.
- BOZO_BUILD_TOOLS (zlib-free configure for a port), the tests only when top level.
Results: TMB boot --pinned with every override native, 3000 of 3000 frames and 4,650,558 of 4,650,558 records (ram,
scratchpad, calls, threads); match1p: see docs/phase4-m0-notes.md. bozo-run without a port still matches.
Co-Authored-By: Claude Opus 5.5 <[email protected]>