Commit Graph
21 Commits
Author SHA1 Message Date
James Dansereau f2281ed661 D88.4: propDefs record format spec + N64->PC converter (d88_propdefs.py)
The propDefs stream is a flat s32[]; each record's serialized N64 word count
is fixed across all 21 levels (verified: the getools C sources tile every
propDefs region byte-for-byte against the ROM). Every pointer member is 0 in
the file, so records containing pointers grow 4->8B per pointer on PC.

d88_propdefs.py rewrites each record to its native PC struct layout: header
word (u16+u8+u8) and _mkword half-pairs swapped independently, scalars
bswap32'd, pointer slots widened to 8 zero bytes, runtime areas zero-filled.
d88_layoutprobe.c (expanded) is the compiler-verified sizeof/offsetof source
for PROPDEF_PC_BYTES. Converts + walk-verifies all 21 levels clean.
2026-08-28 09:16:05 -04:00
James Dansereau 0010270f1b Repo cleanup: reference footage to docs/reference/, ignore local artifacts
- Move the two N64 reference screenshots out of the repo root into
  docs/reference/ (n64-footage-2026-08-24.jpg, n64-footage-gun-barrel.png);
  HANDOFF.md now points there.
- Gitignore screenshots/ (session captures) and tools_pc/mupen64/ (local
  Mupen64 Plus checkout used for N64 reference footage; 8 MB of binaries).
- Commit tools_pc/mtxtest.c, the standalone fast3d matrix-convention
  harness that HANDOFF/D72.3 docs reference as kept-for-reference.
- Refresh PORTING.md: status was still 'scaffolding / building once
  implementation lands'; now reflects Phase 2 in progress and points at
  docs/HANDOFF.md for current session state.
2026-08-27 19:27:05 -04:00
James Dansereau 8ed411d3f1 D70-D72: PPM capture tool, C-array texture byte-order fix, tc[] UV restore
- D70: GE_PCDUMP env-gated PPM frame dump (video.c + gfx_opengl.cpp); ppm/ gitignored
- D71: per-source bswap of C-array texture sources in import_texture (the four
  rarewarelogo.c RGBA16 images are LE u32 arrays on PC -> pink/green logo)
- D72: removed PD-inherited normal/lookat UV override; lookat_enabled defaults
  false (GE always uses authored tc[] UVs; N64 boots with RSP mem zeroed)
- D72.3 OPEN: logo triangles still project off-screen; a flat dark-blue
  checkerboard triangle is rasterized instead - identity pending
  (GE_DBGUV/GE_DBGTALL env-gated traces added)
- Docs: PCPortResearch.md F/D70-D72, HANDOFF refreshed, D71 log gated
2026-08-24 19:12:40 -04:00
James Dansereau 8f631462f3 PC port: phase 2 — D59-D68 milestone: full intro renders; blocker is D69 (BG-file BE headers)
D59/D64: the 'external GL DLL' crash was an unbounded blood-RLE write
(sentinel die_blood_image_end lost its N64 section adjacency on PC)
clobbering the gun-barrel sub-DL at ptr_logo_and_walletbond_DL+0x200.
D60: osPiStartDma DMA-target validation (VirtualQuery-based) in libultra.c.
D61/D63: TEMP env-gated ROM-read / VTX-pool / menu probes (strip list in
HANDOFF Task 3). D62: OSMesgQueue/OSScMsg PC layout verification.
D65/D65b: enum HEADS/BODIES signed sentinels under PORT (PC GCC picks
unsigned underlying types; N64 semantics were signed).
D66: romCopyAligned + ramrom replay 64-bit pointer width (s32 truncation
of .bss targets > 4 GiB). D67: struct image_entry N64 layout
reconstruction (dataoffset:24 first, all-u32 bitfields, sizeof==8).
D68: Globalimagetable BE->LE fixup (port/src/gimgfixup.c): bswap the
IMAGESEG-marked Gfx w1 words in the 17 ROM-copied DLs + sImageTableEntry.
index in the 32 tables after texReset's romCopy; marker scan moved to
bytes 6..7 under PORT; compiled globalDL shadows synced post-texLoad for
explosion.c's g_ExplosionDisplayLists.

Result: game boots, plays intro music, and renders the entire ~3.5-minute
intro (logo -> gun barrel with Brosnan -> cast screen) at ~59 fps. New
blocker D69: load_bg_file faults on first stage load - BG-file headers are
N64 big-endian segment-0x0F offsets read LE on PC. Full analysis + strategy
in PCPortResearch.md §F/D69; HANDOFF rewritten for the D69 session.
2026-08-24 03:27:29 -04:00
James Dansereau bd56cff073 PC port: phase 1.5 — ROM dump verification groundwork
No-Intro 'GoldenEye 007 (U) [!].z64' placed in data/ and verified
byte-identical (MD5 70c52588...) to the dev ROM copies
(data/ge007.ntsc-final.z64, baserom.u.z64). Header magic/title/country
check out; embedded CRCs DCBC50D1/09FD1AA3 re-computed and matched via
tools/n64cksum.c's CIC-6102 routine.

Adds tools_pc/romverify.c: one-shot integrity check (size, GE header
magic at 0x00, title, country byte, CRC1/CRC2) so any future ROM swap
is detectable in seconds. Fingerprint + provenance recorded in
docs/HANDOFF.md; gitignore the built romverify.exe.
2026-08-21 20:29:03 -04:00
James Dansereau 13ca03a6db PC port: Phase 2 — real threads, dual-mapped DRAM, fast3d integration
- Replace setjmp/longjmp green threads with real pthreads (8MB stacks);
  PortQueue side table (mutex+condvar) for OSMesgQueue; dedicated tick
  thread posts VI retrace + services timers (D24).
- Dual-mapped N64 DRAM: one 8MB store at V1 0x70000000 (s32-safe, all game
  RAM symbols) and V2 0x80000000 (KSEG0 mirror for offset|0x80000000
  rebuilds). Windows: CreateFileMappingW + MapViewOfFileEx; POSIX: memfd
  + MAP_FIXED. dram_syms.s pins cfb_16/_bssSegmentEnd/tlb block (D25).
- Address-width shims: PHYS_TO_K0 identity, OS_K0_TO_PHYSICAL = offset from
  V1 base, OS_PHYSICAL_TO_K0 identity; fast3d seg_addr() remaps small
  offsets into V2 (D26).
- ASLR off (-Wl,--disable-dynamicbase): absolute symbols referenced through
  pointer-typed externs (.refptr + BASE reloc) must not rebase; startup
  sanity check on image base 0x140000000 (D27).
- osPiStartDma posts its completion message on every path (fixes
  romReceiveMesg deadlock) (D29).
- SEH-free crash handler: raw fault log first, validated manual EBP-chain
  walk second (-fno-omit-frame-pointer), TerminateProcess; crashDumpThreads
  via Toolhelp32 for heartbeat hang dumps (D30).
- PD fast3d integrated (port/fast3d/), replaces gfxstub.c; real src/sched.c
  compiled; mainproc runs as a real pthread, host thread pumps SDL events.
- Docs: findings D24-D31 + Phase 2 status (section F/G).

Current state: boots through bossInitMainthreadData to langInit(), then
SIGSEGVs on the first file load — stack frame clobbered by a table of
truncated s32 pointers (D31, open). Next: attribute the write with
'set scheduler-locking on' + hardware watchpoint.
2026-08-21 14:42:19 -04:00
James Dansereau cd6cc158b6 Add PC port scaffolding (CMake build + port layer)
Initial scaffolding for a PC port of GoldenEye 007, modeled on the
Perfect Dark PC port (same Rare "Indy" engine). The N64 build
(Makefile + IDA) is untouched; the PC build is a parallel CMake build.

Build:
- CMakeLists.txt: SDL2 + zlib + OpenGL. Compiles src/game/*.c + curated
  engine files + libultra audio/gu + port/. Per-region macro sets
  (ROMID US/EU/JP) mirror the N64 Makefile's LCDEFS exactly.
- build-pc.sh, cmake/: configure+build helper and target/SDL2 modules.

Port layer (port/):
- video/audio/input/fs/romdata/config/system/mixer: stubs with
  TODO(Phase N) markers and correct interfaces.
- libultra.c: libultra OS shims (message queues, VI, PI, AI, EEPROM,
  controller, PFS/motor no-ops, region-gated osTvType).
- gesched.c: software-RSP scheduler replacing src/sched.c task submission.
- n64stubs.c: inert stubs for N64-boot + rmon symbols.
- random.c: PRNG ported verbatim from src/random.s (bit-exact).
- ucode.c: RSP/ASP/GSP microcode segment markers (dummies; Phase 3 TODO).

Docs:
- docs/PCPortResearch.md: architecture, GE-specific deltas, phased plan,
  and the scaffolding review (findings A1-A4/B1-B4/C1-C2 + resolutions).
- PORTING.md: top-level entry point.

See docs/PCPortResearch.md for the full plan.
2026-08-17 19:17:06 -04:00
KholdFuzion 9fbe1fd5a8 sync. run make forceextractassets to re extract everythig to c files properly 2026-04-13 09:11:43 -04:00
KholdFuzion dae8a90ff6 Everybody loves a good yearly or so update 2025-04-25 10:11:31 -04:00
KholdFuzion 5aac04b64c update 2023-09-28 11:49:33 -04:00
KholdFuzion 3c9651a097 Figure its time to update this again 2022-10-29 10:41:01 -04:00
KholdFuzion 76f3582e08 update to current private 2022-06-06 15:07:33 -05:00
Larry Ficken ac52aae51e update public from private 2021-03-08 12:58:16 -06:00
kholdfuzion 8f2c5c73bb Add status page and merge private 2020-12-30 11:42:28 -06:00
KholdFuzion 2cddf53cb7 refresh priv to pub 2020-02-19 21:28:20 -06:00
KholdFuzion c09009d3f4 Update to support shifting, JP, ai macro work and more. 2019-11-13 07:46:56 -06:00
kholdfuzion 3516197a71 oops forgot that
Former-commit-id: 51b7d68a6dc95736271f84b0fc77ebf6d47e52cd [formerly 2c85d1c72fdc9bb1fbf167e646bdeb09ef3ab61e] [formerly a13e518d540596eb3f572666e7dc1f0e9fc23735 [formerly 5a1125980db68c93b676d756a1735174827465c8]]
Former-commit-id: 32929e424314258696aadd1fa822cc97697c1f87 [formerly 40f3f2bb14e103445d97e3a8956926eda59e5f73]
Former-commit-id: 6124ae5e2340b83c14e40668868ecacb9f4d1fa3
2019-08-03 18:01:45 +00:00
Larry 3812f3b8da use bass to assemble data sections for now
all LnameE text is added


Former-commit-id: ff90f89bd019d5d0f6f25b4f0fdd8bc76ed9c617 [formerly 0beac7d6def51c5376cb603d3f46495973761ef5] [formerly 37dbae7ea9f5723857742917092eb38fe746b318 [formerly 58fbc0dfb26a9e87d2cc8645dedd0de19d1ab65d]]
Former-commit-id: 50f8ef7cbcbd3c7cdafca6a0293d05187686f2ed [formerly ab3abd4cfea63f38f53943b660234df45db1ff58]
Former-commit-id: ad20ec5d86ca3a2dc746df6cc500d5b07dbb9ca4
2017-08-15 16:39:51 -05:00
Larry f3e6efc1c6 update .gitignore
Former-commit-id: 18481b51d7f97affad1ab63a8909d5242e315148 [formerly 4c12462f538f2b90833ad0193e614a2c2a177ac7] [formerly 8c263eb568eb9ec57eb3167fe0730269bee06057 [formerly 9bf1364495d42faf50ce0ef460be4d59bdf94803]]
Former-commit-id: e0892b4f3413ba22cc40832e340dd0a9f296fbec [formerly ab938464f86d090596cf6a1a8ac69975422de364]
Former-commit-id: b513e6a2aaeb1ba87be2fcc8523e1cb73a8e9878
2017-08-15 09:10:05 -05:00
Larry e334c89e7a promote rewrite to main
Former-commit-id: d36c33017e2f3d4cc22f044e3bb991e91e3261b2 [formerly 06181282db1eaef6c65ccc5c4ad79d0d4de2851f] [formerly 768205206a357b9428abcdb05368c0b8fd725580 [formerly 81c7801c2397e9054d5d0642a19d3b216bd2352a]]
Former-commit-id: ef79bc4ca5d52a49a24441756a35e2e6da88e4f3 [formerly c876a0c90ca85c67f2fe651172df69b3ec4dd0b6]
Former-commit-id: 27b347c7fcd44a1d55d42391a4f722a4b67b9bea
2017-08-14 14:20:01 -05:00
Larry 7d23902646 more restructuring and cleanup
Former-commit-id: ab9264923d293ab9446524bf34d7c1c3b78e34db [formerly cef4ee5d904ba9218508bf663b695b5a5ffe2d50]
Former-commit-id: 6dc760aa6a557ffed3ddd6c41fd543f2e844b33d
2017-05-06 10:31:25 -05:00