Describe what the code does in comments and docs.

Comments say what the code does and why, docs/maxwell.md keeps the Maxwell facts, and fetch_refs.sh clones only the checkout the build reads. Code is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-07 03:20:42 -05:00
parent a1871280a3
commit 1b39aabd37
128 changed files with 481 additions and 577 deletions

View File

@@ -139,7 +139,7 @@ const pool_t *nvn_pool_find(uint64_t addr, uint64_t len) {
return p;
}
// Physical and virtual pools (MacNativeGames nx2navi_vpool.c checks). A CPU-invisible one gets a GPU window range.
// Physical and virtual pools. A CPU-invisible one gets a GPU window range.
// A CPU-visible physical pool (1.4.3: flags 0x18c, GPU_NO_ACCESS) keeps the game's storage for the CPU; the back end
// gives it device memory as any physical pool (vk_memory.c vk_pool_init), which the GPU reaches through virtual pools.
static int pool_place(pool_t *o) {
@@ -372,7 +372,7 @@ NVN_API(nvnMemoryPoolMap) {
if (o->magic != NVN_POOL_MAGIC || (o->flags & NVN_MEMORY_POOL_FLAGS_CPU_NO_ACCESS)) { ret_x(c, 0); return; }
ret_x(c, (uintptr_t)o->mem);
}
// MacNativeGames nx2navi_vpool.c: every request is checked before any mapping changes.
// Every request is checked before any mapping changes.
static int check_request(const pool_t *v, const nvn_mapping_t *r, int i) {
uint64_t end = (uint64_t)r->virtual_offset + r->size;
if (r->virtual_offset < 0 || r->physical_offset < 0 || !r->size) {