67 Commits
Author SHA1 Message Date
Thomas MartinandClaude Opus 5.5 e596e3e056 Widescreen: stop culling models outside the 4:3 frame
CFrameVu1::DrawVu1 skips a model whose projected bounding box lies wholly
more than 320 px from the screen centre, the 4:3 half width. In 16:9 the
frame reaches 426.67 px each side, so models in the extra strips vanished
until they crossed into the 4:3 area.

Its two loads of 320.0 (0x129ab4, 0x129ae4) become guarded native sites
returning the drawn frame's half width: 426.67 in widescreen, 320 in 4:3
(the same constant as before, so 4:3 is unchanged).

Checked headless from a Wise Owl Forest save state while turning the camera:
the old and new bounds give identical centres in all 39 frames, and the
differences lie only in the side strips, where plants and rocks now show.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 01:26:17 +01:00
Thomas MartinandClaude Opus 5.5 ba2f632589 Widescreen with the HUD at the edges, and Travel: warps, georama, story chapters
Widescreen (the Video tab, the in-game Graphics page, video.ini, PS2X_WIDESCREEN; hidden runs read only the
environment): the native frame is 853.33 GS pixels wide about the game's centre. The game's projection is
unchanged (Hor+); MGClipVertex is native and culls against the frame's width. The game's 2D stays centred; a
draw over the whole frame (fades, fills, frame copies) spans the wider one, a fill touching an edge reaches it
(the dungeon fade's tiles), and the field HUD's side pieces move to the edges (the town clock, the dungeon's
status, floor and gauge, the minimap as one piece). Frame copies take each side on its own, so the game's
half-size work copies round-trip.

Travel (Options -> Travel, F2 -> Travel, --cheat-script): warps to the 52 town and area maps and to any floor
of the seven dungeons through the game's own fades and loads (MapJump, the town exit, the interior loop's map
jump, the dungeon's exit task and floor build, the entrance menu's preset), next to the floor's monsters,
every georama part (the Atla tables through AtraPartsGet/AtraChipGet), the whole world map and a story chapter
select. A dungeon's story floors need its chapter's allies; ahead of the story the warp says so.

The in-game Graphics page also sets widescreen, anti-aliasing and texture smoothing. BozoEngine moves to
master c27ce41 (the widescreen setting and picture shape).

Checked headless: 139/139 suites; the 4:3 routes keep identical cards; tours of every town map and every
dungeon floor (208) in widescreen.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-28 16:00:18 +01:00
Thomas MartinandClaude Opus 5.5 4d4e633ded Shadows under anti-aliasing: the marks moved toward the camera
With anti-aliasing the shadow work target's shared depth is resolved from one sample point off each
pixel's centre; on sloping ground that lies nearer than the mark's centre depth and every mark failed
the depth test, so the character shadows vanished (4x). Under anti-aliasing the marks now take
Material::depthOffset (slope 1, units 1); without it nothing changes.

BozoEngine: local branch dc/msaa-decal-offset (8ee365b), not pushed yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 10:51:44 +01:00
Thomas MartinandClaude Opus 5.5 dfc80d2af0 Save states: DC's section, command-line options and window slots
BozoEngine saves the runtime; DC's "dc" section (runtime/dc_state.cpp) adds
what that does not hold: the compiled sound modules' IOP host, the MDT copies
(the only model left once the game reuses a static piece's MDT memory) and
their bindings, pinned and patched pictures, GS place ownership, water
objects, frame identities, the haze seeds, the fishing strip and the native
Options pages. Images are written once in a table. On load the caches of the
old guest memory are dropped (decoded textures, render places, CLUT
overrides, shadow queues, the partial frame) and so are the cheats' mirrors
and queued edits. Unsaveable mid debug-font composition.

--save-state FILE --save-state-at N, --load-state FILE [--load-state-at N],
--dump-ram FILE; F5 / F7 / F6 slots and F2's Save states tab in the window.
Engine pinned to c853ec0 (BozoEngine #101) until the save-state commit is on
master.

Checked: headless Matataki (saved 6500) and dungeon (5000) states loaded in a
new process and mid-run give EE RAM identical to the uninterrupted runs;
windowed save + load gives identical captures at seven frames and identical
RAM. 135/135 suites, CI build 66/66, seven routes unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 20:42:32 +01:00
Thomas MartinandClaude Opus 5.5 31b442693e Town water: a place's rows follow every copy, not just the menu capture
MGMoveFrameBuffImage (the menu's capture of both fields) marked its place 448
rows and nothing reset it; the town's water refracts that same place, which
its frame copies refill each frame at 224 rows. After the first menu, the
water sampled them at half height and showed the cliffs above it. The
stretch copy now marks its place 224 rows and the plain copy the source's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-09 19:37:08 +01:00
Thomas MartinandClaude Opus 5.5 a08c3283cd MGInit's draw environment native: no GS register images read
MGGetFBuffTex / MGGetFBuffBackTex hooks build the frame TEX0 words themselves
(640 wide, PSMCT32, FBP 0x46 / 0 by DBuffID: the values the record held),
and MGInit's loads of draw 0 TEST / ZBUF are native sites giving the same
values. MGInit's sceGsSetDefDBuff call is retired, so sceGsSetDefDrawEnv no
longer runs. GS library calls left: sceGsSyncV and sceGsResetGraph.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-09 17:17:01 +01:00
Thomas MartinandClaude Opus 5.5 42920f3a57 Cloth builds reserve one qword instead of the VIF size
CCloth::Initialize keeps two distinct buffer addresses (Alloc, then Alloc64)
and its per-frame DrawVu1 is native and reads the simulation grid, never the
size or either buffer. textureAllocationQwords and its formula are gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-09 11:58:50 +01:00
Thomas MartinandClaude Opus 5.5 9710186230 Model, remake and shadow builds reserve one qword instead of the VIF size
CreateVisual builds at the allocator cursor, reserves the returned extent and
aligns to 64 bytes, so every build keeps a distinct aligned data address (the
retained-MDT key). DC_PROBE_EXTENTS found nothing writing into live buffers.
modelAllocationQwords and its VIF packet formula are removed; cloth keeps its
formula until its per-frame draw is audited.

Builder fixture: 1,064 cases, original VIF size vs native one qword. 126/126
suites. Seven routes: same ends, identical cards, attract demo frame-exact;
a dungeon floor walk-in renders normally.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-09 11:39:47 +01:00
Thomas MartinandClaude Opus 5.5 4207130f78 DC_PROBE_EXTENTS: watch the legacy model buffers for outside writes
Opt-in diagnosis for the extent migration: model/remake/shadow buffers are
filled with a pattern at build and checked every 60 frames; a change is
classified live when the building visual still owns the buffer, with the
new bytes printed. Seven routes: no write into a live buffer; the attract
demo's 8 live-looking cases are model data loaded at its scene switches.
Normal play is unchanged (the probe is off by default).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-09 11:28:53 +01:00
Thomas MartinandClaude Opus 5.5 a8aa68dac3 Check a record texture once per model draw
drawModel looked a record up once per primitive, and every lookup hashes the
record's whole picture to see live texel and palette writes. No game code
runs between one native draw's primitives, so each record is now looked up
once per draw and reused; lookups across draws still check every time.
DC_NATIVE_STATS=1 reports record-texture lookups and hashed bytes per frame.

At the run's Matataki save spot: 480 lookups / 4.71 MiB hashed per frame
before, 208 / 2.00 after. 125/125 suites; scripted routes unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 23:49:55 +01:00
Thomas MartinandClaude Opus 5.5 4759b4e787 Move BozoEngine to main 296ac6d; keep the game's own sceGsSyncVCallback
Engine main answers sceGsSyncVCallback natively and runs the callback only
where a game frame ends (Dispatcher::frameCompleted). DC's loading installs
VSyncCallBack_Load and spins in wait_now_loading_vsync on the flag only that
vblank callback sets, without ending a frame, so the boot stopped at frame 76.
DC now registers its compiled sceGsSyncVCallback (0x113DE8) in the port
registry: AddIntcHandler(2) + EnableIntc(2), fired by the kernel's field clock
as on the previous pin. No engine change.

The CD-cancel test asserts main's sceCdBreak contract: an active read ends at
the current native time, an idle drive's error is left unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 20:19:27 +01:00
Thomas Martin 094f497568 Add TMB-style launcher and offline v0.1.0 distribution 2026-11-08 18:23:52 +01:00
Thomas Martin bbf0f5de3a Add in-game cheats and qualify native rendering fixes
Add controller-operated Cheats and confirmed Quit Game pages within the original Options lifecycle. Extend shared cheats with combo stamina, equipped ATK, ABS multiplier, Gilda, consumable quantities, movement speed, lighting freeze and safe inventory resizing.

Preserve texture ownership across menu loads, correct model sampling and sky colours, restore water refraction, close sprite seams, adjust choice cursors and reduce model hashing cost. Cover native CD cancellation for companion-menu loading and pin the published BozoEngine fixes.

Refresh the README, cheat reference and rendering follow-up with current gameplay coverage, controls, saves, build steps and remaining limits. Validation: 86/86 suites, seven GPU checks, bounded native captures, graceful in-game quit and positive player feedback. No game assets, saves or generated code included.
2026-11-08 17:11:31 +01:00
Thomas Martin c4856b93bf Clear native shadow mask coverage before marking silhouettes 2026-11-07 23:54:38 +01:00
Thomas Martin 1fe20dc128 Close scaled sprite seams in minimap and dialog rectangles 2026-11-07 22:55:26 +01:00
Thomas Martin dfec8ee962 Fix sky feedback, generated flame alpha and diagnostic frame stalls 2026-11-07 22:26:14 +01:00
Thomas Martin b85856d8a7 Retire packet-handle loads and qualify DUN dialogue and save paths 2026-11-07 17:54:38 +01:00
Thomas Martin e08217bb4a Retire packet reservations and handles; audit indirect dispatch 2026-11-07 16:39:50 +01:00
Thomas Martin 84adbc5b3f Retire resident packet state and audit global reset consumers 2026-11-07 15:28:21 +01:00
Thomas Martin 92c79ffc39 Compose debug-font pictures natively without transfer packets 2026-11-07 04:06:36 +01:00
Thomas Martin f9b7d21eb2 Draw fishing line geometry natively without packet output 2026-11-07 03:21:12 +01:00
Thomas Martin 561a578db0 Keep static model geometry after source buffers are reused 2026-11-06 18:04:20 +01:00
Thomas Martin 3ca4dcde3d Retire fire sprite state packet envelopes 2026-11-06 16:10:31 +01:00
Thomas Martin fe579b671f Retire frame packet wrappers and unused MDT buffer copies 2026-11-06 15:17:41 +01:00
Thomas Martin e52af031ae Retire unused console graphics builders and device reads 2026-11-06 14:32:19 +01:00
Thomas Martin 098ecf5340 Migrate Dark Cloud to BozoEngine's native runtime 2026-11-06 02:49:24 +01:00
Thomas MartinandClaude Opus 5.5 7ac7b8855f README rechecked: Windows only for now (Linux planned), the open defects listed (sky band, Norune's green wedge,
Georama's stayframe), no duplicate rows between the milestone and layer tables, "How it works" without the removed
VIF1 observer (3D from the MDT, 2D from the game's routines, the offline texture store), the screenshots marked as
the old GS renderer's still to replace, the layout with runtime/app, docs/branding and the unlisted tools and
scripts. dc_native.cpp: the VU1 gate's comment without the observer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 00:26:18 +01:00
Thomas MartinandClaude Opus 5.5 8caf62d78d Message balloons: the parchment fill, masked to the shape by depth in place of the GS destination alpha test
MakeFukidashi tiles "fuki256" over the balloon picture under DATE; the native hook drew only the grey shape. The clear
now writes the near depth, the shape the far one, and the parchment is depth-tested onto the shape.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 19:12:17 +01:00
Thomas MartinandClaude Opus 5.5 12d6b6f2b4 Textures read at their own row width (the more-text triangle kept every fourth row)
ReloadTexture sends level 0 as a w x h rectangle (LoadImage), so rows are packed at the record's width in main memory,
not TBW x 64 apart. Every texture narrower than its buffer lost rows; the message windows' 16 x 16 triangle showed as
a flat sliver on the last line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 19:02:44 +01:00
Thomas MartinandClaude Opus 5.5 6e1a414069 Toan's expression: the texture store keys pictures by a CRC of all their texels (14 sheets were one)
The disc has 14 different 256 x 128 sheets with Toan's palette, alike in their first rows; the converter kept one
and the 4096-byte hash could not tell them apart, so the face's expression copy read the wrong sheet. Store v3: CRC-32
of all texels in GS order (offline forward Conv8to32, gs_layout.twiddled8); the adapter matches the record's.
DC_PROBE_COPIES logs copies, TexAnime keyframes, slot switches and action-sequence texture-anime queues.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 18:49:53 +01:00
Thomas MartinandClaude Opus 5.5 19453ad8db Toan's jaw: the store picks the expression sheet whose texels the game loaded; face copies move palette indices
The disc has 20+ "c01d01an" sheets with one palette; matching by name, palette and texel count gave the 256 x 128
sheet the 128 x 256 one, whose empty right half was copied over the jaw. Store v2 keys pictures by a hash of their
first 4096 GS-order texel bytes (offline forward Conv8to32). The heat haze patch gets its own window-resolution
target. Toggles nocopies / opaquemodels; copy dumps as PAM.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 18:17:19 +01:00
Thomas MartinandClaude Opus 5.5 ab3a879e9c Dungeon torches: flames drawn from blendTextuer's picture (3D sprites sample made pictures), heat haze (blendTextuerTest) taken over natively
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 17:39:38 +01:00
Thomas MartinandClaude Opus 5.5 6d1b3aa741 Dungeon torches: blendTextuer's picture kept apart from work's frame copy (no dark squares); halo build in the frame dump
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 17:27:06 +01:00
Thomas MartinandClaude Opus 5.5 f7df83e14c Texture alpha as the GS has it (was doubled: the torches' glows were squares); live toggles; test runs never take the focus or the pad
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 17:07:35 +01:00
Thomas MartinandClaude Opus 5.5 94313a7b53 Norune's sky pale as on the PS2: work (0x1A40) read as the previous frame by the sky gradient; dump shows lighting
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 16:29:58 +01:00
Thomas MartinandClaude Opus 5.5 300bf48ffa IOP: no instruction left to the interpreter (iop_recomp.py through switches and frameless leaves); DC_SKIP_MDT and dump alpha probes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 16:04:10 +01:00
Thomas MartinandClaude Opus 5.5 c89a994c9a Face animation copies go to the texture resident in GS memory (ReloadTexture followed); no more face on the house's wall
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 15:35:41 +01:00
Thomas MartinandClaude Opus 5.5 95c18c5940 Buildings' shades under them: shadow mode 8 (MGDrawShade) keeps its plane at its origin
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 15:26:45 +01:00
Thomas MartinandClaude Opus 5.5 0801a1e3b6 Map title card drawn: kind-0 TM2 records decode by their TEX0 (4-bit with palette); load-card and EnterFixTextureZ probes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 15:03:54 +01:00
Thomas MartinandClaude Opus 5.5 2d0bac547a Speech balloons back: only the shadow pass's target shares the frame's depth; frame dump shows each draw's colours, fog and blend; balloon probe
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 13:47:10 +01:00
Thomas MartinandClaude Opus 5.5 778c6a02a4 Toan's poncho: the cloth no longer flies apart (libvu0 stubs fixed); cloth probe
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 12:53:10 +01:00
Thomas MartinandClaude Opus 5.5 8cd83d5ae5 DC: DC_NO_MADE_MODELS=1 (diagnosis) turns off models sampling the game's own pictures
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 05:58:54 +01:00
Thomas MartinandClaude Opus 5.5 a353c03ba5 DC models: a primitive whose record is a picture the game makes (the towns' "work" frame copy) samples it
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 03:02:15 +01:00
Thomas MartinandClaude Opus 5.5 3ce8340de4 DC shadows: laid after the frame's 3D and depth-tested (not over characters), the light projection's plane at the feet (PCSX2); menu sheet texel inset; shadow and order probes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 02:57:50 +01:00
Thomas MartinandClaude Opus 5.5 e2bc6431a1 DC native 2D: fixed textures decoded when sent (EnterFixTexture, EnterFixTextureZ's PSMT8H menu sheet): the Georama menu; on-demand 2D frame dump
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 01:41:21 +01:00
Thomas MartinandClaude Opus 5.5 1d616fa073 DC: Georama clock and cursor (MGDrawShade keeps the 2D blend), menu backdrop (MGMoveFrameBuffImage), frame copies; input focus (fork)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 01:13:28 +01:00
Thomas MartinandClaude Opus 5.5 d099f879f4 DC native 2D: blendTextuer translated; records with their own pixels never sample a made picture (demo PUSH START plate)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 01:01:37 +01:00
Thomas MartinandClaude Opus 5.5 f8ca32d4bd DC title: the cloud blur (frame copy fixed in the fork, work texture at 640 x 224), draw-order probe
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 00:32:55 +01:00
Thomas MartinandClaude Opus 5.5 22e16b06d4 DC native 2D: sprites follow the game's TEX1 filter (linear, gp - 0x7908): no magenta outlines in the menus
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 00:04:40 +01:00
Thomas MartinandClaude Opus 5.5 64281be620 DC: no GS path left, shadow pass marks then darkens once, window stutter fix (fork)
- DC turns the GS off itself whatever PS2X_GS_RENDERER says; the native drawing is always on (no DC_NATIVE3D);
  run.sh forces no GS; boot_test.sh and iop_recomp.sh capture the native frame (the IOP dump ran the old GS renderer).
- Shadow pass: the triangles mark a work target cleared to black and the pass's end lays it over the frame once
  (Cd x (1 - As)), as the game does; drawn straight over the frame, overlaps darkened again and showed the model's insides.
- PS2Recomp: the window shows each game frame once (the stutter every few seconds).
- README status and notes for the no-GS port.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-31 23:57:48 +01:00