Skip to content

refactor: migrate to the fast3d fallible memory API - #36

Merged
dcvz merged 2 commits into
mainfrom
fast3d-memory-api
Sep 7, 2026
Merged

dcvz merged 2 commits into
mainfrom
fast3d-memory-api

Conversation

@dcvz

@dcvz dcvz commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

fast3d makes guest memory reads fallible and stops implementing its reader trait for HostRam, because a safe method taking an arbitrary address over raw guest pointers cannot honour that signature. The obligation moves to the call that consumes the display list, which is where helix already blocks the guest, so the adapter disappears and the unsafe block sits next to the thing that makes it true. Presentation needs no hardware and uses present_last.

Draft until retrofoundry/fast3d-rs#56 lands; the rev bump is the remaining change. Verified against that branch through a local patch: cargo check, cargo fmt and the 90 unit tests pass. Strict clippy still reports nine lints, all pre-existing in files this does not touch.

@dcvz
dcvz marked this pull request as ready for review September 7, 2026 16:56
@dcvz

dcvz commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Pinned to fast3d 44d2d1b, which carries the fallible memory API along with the ordered workload, RDP state persistence and the TMEM load provenance fix. cargo check, cargo fmt and the 90 unit tests pass against it.

Worth knowing, since helix never resets: RDP registers and TMEM now persist across display lists rather than resetting each one, which is what the hardware does. sm64 re-initialises at the top of every frame so its behaviour is unchanged, but a port that sets its colour image once and submits several lists will now inherit it correctly instead of drawing to the wrong place.

@dcvz
dcvz merged commit 52e607a into main Sep 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant