mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-21 12:55:57 +00:00
Read the scene module of 1.1.1 from its own slot
frame_rate.c finds the player through a global pointer in main's data segment: 1.4.3 keeps it at main+0x3add238, 1.2.1 at main+0x4728538, and 1.1.1 was borrowing 1.2.1's address, which points at something else in that build. The 1.1.1 slot is main+0x4630a68. It was measured from the build itself: one function there walks the whole chain this code walks (module+0x1e8 scene, the 14-component check at +0x50, component 13 at +0x58, the 0x70 link stride, the name compare) and 181 scene accesses read the same slot, which makes it the scene module and not one of the single-instance pointers next to it. Co-authored-by: deepseek-v4.1-flash-1017 <noreply@deepseek.com>
This commit is contained in:
1 parent
6b10489e59
commit
1ea8813bed
3 files changed
+8
-4
No files matched your search
@@ -25,7 +25,6 @@
|
||||
#define SYM_INIT_START "_ZN2nn4init5StartEmmPFvvES2_S2_"
|
||||
// main: return addresses of nnMain's SetFocusHandlingMode call (1.1.1 and 1.2.1 from this port's analysis of main;
|
||||
// 1.4.3 from MacNativeGames' scripts/verify_boot.py) and of the first nvnBootstrapLoader call, per game version.
|
||||
#define RT_V111 (rt_game_version == 111)
|
||||
#define CHECKPOINT_RET (RT_V143 ? 0xbdb48cull : RT_V111 ? 0xeb8c14ull : 0xe7a954ull)
|
||||
#define NVN_RET (RT_V143 ? 0xbe0360ull : RT_V111 ? 0xebcdecull : 0xe7eb2cull)
|
||||
#define CTOR_DONE 2 // a module's constructor flag after its DT_INIT ran the init_array
|
||||
|
||||
Reference in new issue
Block a user