18515e6797
Movies: VP9 decoding with libvpx
seedds2026-10-14 23:15:44 +08:00
53a1273cd1
Host movie decoder: Fire Emblem Engage reaches its title screen - hle_movie.c implements movie::Decoder (the SDK's MediaCodec wrapper) through hooks on every vtable method: DecoderEvents signalled with the SDK's SignalEvent, input / output index queues, Buffer and MediaData filled with the SDK's own setters, one NV12 frame per packet into the buffer Unity allocates (w x h x 1.5); packets wait while every output slot is taken. Frames are black for now (no VP9 decoding yet); the size comes from Configure or the VP9 header. - Engage on the Mac: loading screen, the 94 s opening movie, then the title screen and, left idle, the 3D attract demo. Not yet: input, a crash about 221 s into the demo, an unmapped texture format, iOS. - Docs: catalogue entries (movie protocol, shader keys, CPU-written textures, NVNprogram size), Engage graphics notes, README row.
seedds2026-10-14 20:29:27 +08:00
830404a25e
NVN: shader keys at SetShaders, CPU-written textures, sampler table - Shader keys are computed inside nvnProgramSetShaders: NVN lets the caller free the control section once it returns, and Unity does (about 100 programs were reported missing with garbage control sections). A stage whose code is not yet in a memory pool (Mario sets some programs with an unmapped address first) is hashed at its first draw. Keys live in a side table: Mario's NVNprogram is smaller than the header's 0xC0, and growing prog_t corrupted the next object. - Textures written with nvnTextureWriteTexels resolve like packaged textures: uploaded from guest memory and re-uploaded on dirty pages. Unity's video frames and the engines' 4x4 default textures (black, white, transparent, red) used to stay zero. Mario's course frames get slightly brighter where materials sample the default white. - The c2 driver bank also gets the separate-sampler table (0x568 + 8 r), which Engage's shaders read at run time. - Mario 1.2.1 regression (120 s scripted) clean: only the known SetRenderEnableConditional red line.
seedds2026-10-14 20:29:26 +08:00
41ac235637
Unity shaders: UnityFS reader, Engage shader tables and NVN layout - New dm/gfx/tools/unityfs.py: UnityFS bundles (LZ4 / LZMA blocks), serialized files (formats 19..22), objects read by their type trees (Unity's common string table comes from the game's own main), and a Shader object's per-platform compressed subprograms. The player's own files have no type trees and borrow the bundles' Shader tree of the same type hash. - shader_split.py reads Unity Shader objects in a second pass: each Switch subprogram is one NVN program (0x60-byte header of per-stage offset / control size / code size, then control + code per stage); a program's vertex / pixel stages form a pair. Engage: 9,269 shaders, 4,634 pairs. Mario's tables and package are byte-identical. - Engage profile: shader groups engine / assets, measured NVN layout (texture handles 0x168 + 8 r, 128 slots; separate samplers 0x568), regenerated tables, chain a295a8035b7b. 9,268 of 9,269 compile (one geometry shader; Metal has none). - dmsh_build.py: the translator's built-in bases only matter with per-slot facts, so the guard checks that; c2 reads count the sampler table and 16-byte rows overlapping a table as fillable. - game.py: DM_GAME_NVN_SAMP_BASE. NSP script survey note updated. - Mario chain is now 271056163ea2 (Mac and iOS libraries rebuilt, 16,266 of 16,268 as before; c1_full regenerated).
seedds2026-10-14 20:29:26 +08:00
62516cb750
Fire Emblem Engage profile (bring-up started)
seedds2026-10-14 18:09:30 +08:00
779e5097f3
Host and rewriter: fixes for Unity / SDK 12 titles (Engage bring-up)
seedds2026-10-14 18:09:30 +08:00