mirror of
https://github.com/jkdansereau/goldeneye-pc-port.git
synced 2026-10-24 00:02:45 +02:00
Prepare for public release
- README, LICENSE (MIT for the port layer), NOTICE, CONTRIBUTING. - Restructure docs: internals.md, porting-notes.md, dev-process.md + dev/agentic-development.md (the research write-up), dev/ (raw record). - Replace decomp status-badge CI with a PC-port validate workflow. - Remove session/agent scaffolding and stale planning docs from the tree. - Add .gitattributes (normalize line endings to LF); add screenshots. The pre-2026-08 history is the GoldenEye 007 decompilation by Larry Ficken (KholdFuzion) and contributors, preserved unchanged. The PC-port work from 2026-08-17 on is mine.
This commit is contained in:
1 parent
294e24cc26
commit
52539d10de
118 files changed
+3995
-8319
No files matched your search
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""One-shot D38 generator for port/include/pc_protos.h (see docs/PCPortResearch.md §F/D38).
|
||||
"""One-shot D38 generator for port/include/pc_protos.h (see docs/internals.md §F/D38).
|
||||
|
||||
Pipeline (all inputs were captured from a PC build of the decomp):
|
||||
1. Compile the game TUs and collect `implicit function declaration` warnings
|
||||
@@ -50,7 +50,7 @@ for n in sorted(names):
|
||||
hdr = '''/*
|
||||
* pc_protos.h - PC-port-only prototypes for implicitly declared functions.
|
||||
*
|
||||
* D38 (docs/PCPortResearch.md section F): the decomp has ~72 translation units
|
||||
* D38 (docs/internals.md section F): the decomp has ~72 translation units
|
||||
* that call ~400 functions without any visible prototype (missing #include of
|
||||
* the declaring header). Under C11 an implicit declaration assumes `int f()`,
|
||||
* which on N64 (MIPS, 32-bit pointers) is harmless, but on x86-64 it silently
|
||||
|
||||
@@ -362,7 +362,7 @@ def build_segments(region, csv, obseg_resolved, ramrom_files, music_tracks,
|
||||
off, size = csv1("animationtable_data.bin")
|
||||
seg["animation_data"] = (off, size, True)
|
||||
off, size = csv1("Globalimagetable.bin")
|
||||
# D39 (docs/PCPortResearch.md): the CSV asset is truncated to the 17 Gfx
|
||||
# D39 (docs/internals.md): the CSV asset is truncated to the 17 Gfx
|
||||
# display lists (0xAC8). The N64 linker segment (ge007.ld) places ALL of
|
||||
# oddtextures.o (.data) here — Gfx DLs + 32 sImageTableEntry tables =
|
||||
# 0x13F8 bytes. texReset() copies End-Start, so the marker must span the
|
||||
|
||||
+112
-112
@@ -1,112 +1,112 @@
|
||||
### test files readme ###
|
||||
|
||||
This is a tool suite to identify discrepancies between builds. It will extract relevant sections from ELF binary and compare against known good md5. The purpose is to help identify where the build is failing to match.
|
||||
|
||||
### Quick start ###
|
||||
|
||||
./test_files.sh -i ge007.u-test_basis.csv
|
||||
|
||||
### Overview ###
|
||||
|
||||
This consists of two bash scripts:
|
||||
|
||||
make/build_hashtable.sh
|
||||
test_files.sh
|
||||
|
||||
The first is used to generate a list of md5 checksums. This should only be used if a new build is added, or you want to generate checksums against a particular variant.
|
||||
|
||||
### Making test file ###
|
||||
|
||||
Output format is simple csv, one entry per line. Each line is a 32 character md5, the name of section extracted from ELF binary, and path to file relative from repo root (where this script is).
|
||||
|
||||
Escaped csv, quotes or commas in filenames are not supported.
|
||||
|
||||
The script iterates the following build directories, looking for `.o` files:
|
||||
|
||||
- src/
|
||||
- src/game
|
||||
- assets/obseg/bg
|
||||
- assets/obseg/brief
|
||||
- assets/obseg/setup
|
||||
- assets/obseg/stan
|
||||
- assets/obseg/text
|
||||
|
||||
For source files, the following ELF sections are extracted:
|
||||
|
||||
- .text
|
||||
- .code
|
||||
- .bss
|
||||
- .data
|
||||
- .rodata
|
||||
|
||||
For asset files, the following ELF sections are extracted:
|
||||
|
||||
- .bss
|
||||
- .data
|
||||
- .rodata
|
||||
|
||||
The supported versions have already had the md5 checksums extracted from known good builds. These files are:
|
||||
|
||||
- ge007.u-test_basis.csv
|
||||
- ge007.j-test_basis.csv
|
||||
- ge007.e-test_basis.csv
|
||||
|
||||
**build test file example**
|
||||
|
||||
./make/build_hashtable.sh -v u -o ge007.u-test_basis.csv
|
||||
./make/build_hashtable.sh -v j -o ge007.j-test_basis.csv
|
||||
./make/build_hashtable.sh -v e -o ge007.e-test_basis.csv
|
||||
|
||||
### Testing build ###
|
||||
|
||||
A build can be compared against a test file by running `./test_files.sh`. The input file is required. This will This lists the path to the build object files. Example
|
||||
|
||||
./test_files.sh -i ge007.u-test_basis.csv
|
||||
|
||||
This lists each section and file as it is tested. You should see output like
|
||||
|
||||
...
|
||||
pass: section'.bss' build/u/assets/obseg/text/LsiloJ.o
|
||||
pass: section'.data' build/u/assets/obseg/text/LsiloJ.o
|
||||
pass: section'.rodata' build/u/assets/obseg/text/LsiloJ.o
|
||||
pass: section'.bss' build/u/assets/obseg/text/LstatE.o
|
||||
pass: section'.data' build/u/assets/obseg/text/LstatE.o
|
||||
...
|
||||
|
||||
The output stops on the first failure. Use option `-c` to continue on mismatch.
|
||||
|
||||
### Examples ###
|
||||
|
||||
**Rename function**:
|
||||
|
||||
Modify `src/game/bg.c` method `bgRectIsInside` (an unreferenced method).
|
||||
|
||||
*result*: all files pass.
|
||||
|
||||
**Change function**:
|
||||
|
||||
Modify `src/game/bg.c` method `bgRectIsInside` (an unreferenced method) to return a different value. Rebuild the project and test.
|
||||
|
||||
*result*: Test script should stop with a message similar to the following:
|
||||
|
||||
checksums differ, section'.text', file: 'build/u/src/game/bg.o'. Actual=[6747949109773c07983a2584101ef214], expected=[0a3e9300d0406ae8036a97b5596f3f5c]
|
||||
|
||||
**change .rodata**
|
||||
|
||||
Modify `src/fr.c` method `indyGrabJpg16bit` and change one of the printf strings:
|
||||
|
||||
sprintf(buffer, "zzzgrab.%d.jpeg", *pgrabnum);
|
||||
|
||||
*result*: Test script should stop with a message similar to the following:
|
||||
|
||||
checksums differ, section'.rodata', file: 'build/u/src/fr.o'. Actual=[9e108ace3e0dab31c819d22ed1d063b9], expected=[94e2bec0d83b53385ba626feb3005cb4]
|
||||
|
||||
**Change setup file**
|
||||
|
||||
Modify `assets/obseg/setup/Ump_setupcaveZ.c` padlist and change one of the float variables. Here is modifying the first entry in the array:
|
||||
|
||||
{ {1.0f, -726.0f, -378.0f}, {0.0f, 1.0f, 0.0f}, {-2e-06, 0.0f, 1.0f}, "p1884a", 0 },
|
||||
|
||||
*result*: Test script should stop with a message similar to the following:
|
||||
|
||||
checksums differ, section'.data', file: 'build/u/assets/obseg/setup/Ump_setupcaveZ.o'. Actual=[1dd1b59ed38408ba67b6616f9194c6d9], expected=[9caabe90e7f9b62668b607b286e14738]
|
||||
### test files readme ###
|
||||
|
||||
This is a tool suite to identify discrepancies between builds. It will extract relevant sections from ELF binary and compare against known good md5. The purpose is to help identify where the build is failing to match.
|
||||
|
||||
### Quick start ###
|
||||
|
||||
./test_files.sh -i ge007.u-test_basis.csv
|
||||
|
||||
### Overview ###
|
||||
|
||||
This consists of two bash scripts:
|
||||
|
||||
make/build_hashtable.sh
|
||||
test_files.sh
|
||||
|
||||
The first is used to generate a list of md5 checksums. This should only be used if a new build is added, or you want to generate checksums against a particular variant.
|
||||
|
||||
### Making test file ###
|
||||
|
||||
Output format is simple csv, one entry per line. Each line is a 32 character md5, the name of section extracted from ELF binary, and path to file relative from repo root (where this script is).
|
||||
|
||||
Escaped csv, quotes or commas in filenames are not supported.
|
||||
|
||||
The script iterates the following build directories, looking for `.o` files:
|
||||
|
||||
- src/
|
||||
- src/game
|
||||
- assets/obseg/bg
|
||||
- assets/obseg/brief
|
||||
- assets/obseg/setup
|
||||
- assets/obseg/stan
|
||||
- assets/obseg/text
|
||||
|
||||
For source files, the following ELF sections are extracted:
|
||||
|
||||
- .text
|
||||
- .code
|
||||
- .bss
|
||||
- .data
|
||||
- .rodata
|
||||
|
||||
For asset files, the following ELF sections are extracted:
|
||||
|
||||
- .bss
|
||||
- .data
|
||||
- .rodata
|
||||
|
||||
The supported versions have already had the md5 checksums extracted from known good builds. These files are:
|
||||
|
||||
- ge007.u-test_basis.csv
|
||||
- ge007.j-test_basis.csv
|
||||
- ge007.e-test_basis.csv
|
||||
|
||||
**build test file example**
|
||||
|
||||
./make/build_hashtable.sh -v u -o ge007.u-test_basis.csv
|
||||
./make/build_hashtable.sh -v j -o ge007.j-test_basis.csv
|
||||
./make/build_hashtable.sh -v e -o ge007.e-test_basis.csv
|
||||
|
||||
### Testing build ###
|
||||
|
||||
A build can be compared against a test file by running `./test_files.sh`. The input file is required. This will This lists the path to the build object files. Example
|
||||
|
||||
./test_files.sh -i ge007.u-test_basis.csv
|
||||
|
||||
This lists each section and file as it is tested. You should see output like
|
||||
|
||||
...
|
||||
pass: section'.bss' build/u/assets/obseg/text/LsiloJ.o
|
||||
pass: section'.data' build/u/assets/obseg/text/LsiloJ.o
|
||||
pass: section'.rodata' build/u/assets/obseg/text/LsiloJ.o
|
||||
pass: section'.bss' build/u/assets/obseg/text/LstatE.o
|
||||
pass: section'.data' build/u/assets/obseg/text/LstatE.o
|
||||
...
|
||||
|
||||
The output stops on the first failure. Use option `-c` to continue on mismatch.
|
||||
|
||||
### Examples ###
|
||||
|
||||
**Rename function**:
|
||||
|
||||
Modify `src/game/bg.c` method `bgRectIsInside` (an unreferenced method).
|
||||
|
||||
*result*: all files pass.
|
||||
|
||||
**Change function**:
|
||||
|
||||
Modify `src/game/bg.c` method `bgRectIsInside` (an unreferenced method) to return a different value. Rebuild the project and test.
|
||||
|
||||
*result*: Test script should stop with a message similar to the following:
|
||||
|
||||
checksums differ, section'.text', file: 'build/u/src/game/bg.o'. Actual=[6747949109773c07983a2584101ef214], expected=[0a3e9300d0406ae8036a97b5596f3f5c]
|
||||
|
||||
**change .rodata**
|
||||
|
||||
Modify `src/fr.c` method `indyGrabJpg16bit` and change one of the printf strings:
|
||||
|
||||
sprintf(buffer, "zzzgrab.%d.jpeg", *pgrabnum);
|
||||
|
||||
*result*: Test script should stop with a message similar to the following:
|
||||
|
||||
checksums differ, section'.rodata', file: 'build/u/src/fr.o'. Actual=[9e108ace3e0dab31c819d22ed1d063b9], expected=[94e2bec0d83b53385ba626feb3005cb4]
|
||||
|
||||
**Change setup file**
|
||||
|
||||
Modify `assets/obseg/setup/Ump_setupcaveZ.c` padlist and change one of the float variables. Here is modifying the first entry in the array:
|
||||
|
||||
{ {1.0f, -726.0f, -378.0f}, {0.0f, 1.0f, 0.0f}, {-2e-06, 0.0f, 1.0f}, "p1884a", 0 },
|
||||
|
||||
*result*: Test script should stop with a message similar to the following:
|
||||
|
||||
checksums differ, section'.data', file: 'build/u/assets/obseg/setup/Ump_setupcaveZ.o'. Actual=[1dd1b59ed38408ba67b6616f9194c6d9], expected=[9caabe90e7f9b62668b607b286e14738]
|
||||
Reference in new issue
Block a user