Commit Graph
32 Commits
Author SHA1 Message Date
shweetandClaude Opus 5.5 b1b64761d0 Full redump with round 11: 1335 more locals named in the next 64 largest game functions (all applied)
UsePill, Game::Render, Entity_Laser::update_laser, Room::render_water, the Beast, CreateGlitchedCollectible, the NPC
dispatcher, ... Entity_Player::UseCard still fails in ApplyLocals ('Bad instruction count exceeded', not the instruction
limit: raising it did not help), so its 56 rows wait.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 04:14:02 -04:00
shweetandClaude Opus 5.5 8e6b947042 Full redump with 15 prototypes from the locals round; ApplyLocals raises the decompiler's instruction limit for UseCard
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 03:26:24 -04:00
shweetandClaude Opus 5.5 79259ccf8f Full redump with round 10: 1017 local variables named in the 37 largest game functions
Entity_Player::UseActiveItem/update_effects/EvaluateItems/Update/TakeDamage, Entity_Tear::Update, Entity_Familiar::Update,
EntityConfig::LoadEntities, Room::Init, Level::place_special_rooms, Hush, Mega Satan, ... (only single-role variables:
damageSource, isPenalized, genRng, secretRoomIdx, daemonsTailRng). Entity_Player::UseCard's 56 rows did not apply
(ApplyLocals could not decompile it this run; it now prints the decompiler's error).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 22:57:49 -04:00
shweetandClaude Opus 5.5 40e518bc76 Full redump with round 9 prototypes (1716 applied) and KAGE_LogMessage returning again
Ghidra had KAGE_LogMessage marked non-returning, so ~1,200 functions were cut off at their first log call. ApplyProtos
clears the flag on any function with a RET, re-disassembles after its calls and regrows the callers: 'does not return'
5337 -> 2355 (all genuine: _invalid_parameter_noinfo_noreturn, _Xlen, _CxxThrowException), dump 1.235M -> 1.299M lines.
596 more prototypes, ~20% with REPENTOGON register notation: param_N lines 44610 -> 42588, in_XMM 1237 -> 734.
12 renames from the agents (HUD::LoadGraphics at 008ed350 = Menu_OnlineLobby::load_member_sprite, Room::MamaMegaExplosion
= Weapon::fire_bomb, vector_iterate_noop = PlayerManager::get_total_luck, log_room_transition = RoomTransition::start, ...).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 21:41:31 -04:00
shweetandClaude Opus 5.5 36ae4cbfb8 ApplyProtos: REPENTOGON register notation (float r<xmm3>, int x<edx>, float<xmm0> returns, static cleanup) via custom storage
Whole-program optimisation passes many floats in XMM registers and some arguments in ECX/EDX with the caller popping the
stack; those declarations were skipped. Every prototype is now applied with explicit storage (this in ECX for __thiscall).
Tested on a project copy: 1103 -> 1158 applied from the existing files (REPENTOGON's register declarations now fit),
e.g. void __thiscall Game::SetBloom(Game *this,int Time,float Strength).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 20:25:00 -04:00
shweetandClaude Opus 5.5 df5db46f62 Full redump with round 8: 471 confirmed prototypes (1103 applied, was 622); ApplyProtos takes free functions
Every db/protos.zhl line is checked against the callee's RET n. Typed parameters make more pointers typed: named
->members 104k -> 115k (field_0x 3946 -> 4576 as newly typed pointers show their unknown members), param_N lines
47349 -> 44610. 83 targets skipped: XMM float args/returns or ECX/EDX + caller-cleaned stack (whole-program optimisation).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 20:21:16 -04:00
shweetandClaude Opus 5.5 57cb93d778 Full redump with round 7: 465 names + ~40 corrections, 208 fields; stale REPENTOGON structs verified
field_0x 5868 -> 3946, named ->members 99k -> 104k, unnamed code 19% -> 13.5% of bytes, 9132 FUN_ left.
LayerState/ChallengeParam/DailyChallenge/Menu_Online/GameStateItemPool/ItemPool_Item/BackwardsStageDesc, left in Ghidra by
an early unfiltered import, now come from 86 verified rows (all offsets held; GlowingHourglassState's tail is +0x188 here).
Corrections: libpng/libjpeg/libvorbis misnames, wrong ZHL matches (Manager::ResizeWindow = Cutscene::ANM2Part::Update,
NPCAI_Pathfinder::EvadeTarget = netplay), GameOver::Show, Level::load_room. std::vector<bool> is 0x10 (bit count).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 19:32:02 -04:00
shweetandClaude Opus 5.5 f7a1e00362 Full redump with round 6 and STL/small-struct typing: field_0x 14227 -> 5868, named ->members 90k -> 99k
ApplyTypes: std_vector/string/deque/map/set/list members get MSVC layouts (_begin/_end/_capacity ...), structs used as a
member type are built even when small (BitSet128 _tearFlags._l, KColor, RNG were dropped), structs padded to a multiple
of 4 (PlayerCostumeMap stride 0x10). headers.py prints STL members at their real size and pads to the alignment.
Round 6: 99 fields (Manager ItemConfig lists/InfoDisplay/lobby settings, Game transitions/PreloadManager, PersistentGameData
arrays, HomingLaser, EntityList), 500 names, 6 corrections (Menu_Challenge::Render, Level::compute_room_distances, ...).
9622 FUN_ left, in_ECX + 0x 17363 -> 16720.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 18:31:00 -04:00
shweetandClaude Opus 5.5 3f1e276667 ApplyTypes: a field of unknown type (std_map, DeathmatchManager) names its first dword instead of being dropped
Shows &g_game->_deathmatchManager (462 uses of field_0x26614) and lets ItemConfig grow past a 4-byte stub, so Manager
accesses read (g_manager->_itemConfig).field_0xc. Takes effect on the next build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 17:52:42 -04:00
shweetandClaude Opus 5.5 55ff607849 Full redump with round 5: 600 function names, 11 corrections, 27 fields, 66 globals; drop ECX-offset class placement of FUN_
The FUN_ placement (1d43433) fit any small-offset function to a dense class: 29 library functions went to OptionsConfig,
ScoreSheet/Popup/NightmareScene/Room code to Entity_Player or Entity. Reverted, and the 72 placed functions moved back to
global. Corrections include wrong ZHL signature matches (Entity_Familiar::RestoreState is a libpng writer,
Entity_Pickup::TriggerShopPurchase a netplay message reader, LoadArchiveFile is Gamepad_processEvents) and
theora/vorbis/miniz misnames. 10134 FUN_ left; raw in_ECX + 0x 17363 (+1.1k from the un-placing).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 17:51:30 -04:00
shweetandClaude Opus 5.5 a928f6204f Full redump with 65 typed globals, 53 fields, 346 function names; apply_db.py writes atomically
g_game/g_manager typed: 1483 g_manager-> and 834 g_game-> member accesses now visible (field_0x 10636 -> 14385 counts them);
named members 81k -> 91k, raw in_ECX + 0x 18425 -> 16225. ApplyGlobals takes array types (char[5]).
apply_db.py used to truncate all.c before computing the new text, so a killed build left it empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 17:25:09 -04:00
shweetandClaude Opus 5.5 2e4322b8a5 db/globals.tsv + ApplyGlobals.java: label and type global data; apply_db.py 1000x faster (token match + dict lookup)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 16:36:51 -04:00
shweetandClaude Opus 5.5 1d43433e1b this_types: also place unnamed FUN_ functions in a class when their ECX offsets match one class's field starts unambiguously
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 16:30:21 -04:00
shweetandClaude Opus 5.5 5dbb3e398d ApplyTypes: FamiliarAI routines typed __fastcall(Entity_Familiar *familiar) like NpcAI (ECX reads all fit)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 16:08:58 -04:00
shweetandClaude Opus 5.5 cbb2f465ec Typed this for ~780 more methods whose ECX reads fit their class's confirmed fields; Sprite/Color = ANM2/ColorMod
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 16:08:01 -04:00
shweetandClaude Opus 5.5 134ab40589 Fields: 325 identified from the most-used unnamed offsets; bracketing is no longer evidence; '-' rows delete wrong fields
Entity _mass (0x2d4) and _depthOffset (0x2b0) were REPENTOGON fields kept by bracketing and both wrong
(Lua getters read 0x37c / 0x358). Bracketed fields now need direct confirmation; 155 are being re-verified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 23:40:33 -04:00
shweetandClaude Opus 5.5 d806b3b969 ColorMod layout from the Lua Color getters; Entity._splatColor; embed small/placeholder structs (EntityPtr)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 23:08:54 -04:00
shweetandClaude Opus 5.5 e285a40016 db/protos.zhl: own function signatures, applied like REPENTOGON's only where RET n agrees
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 22:50:46 -04:00
shweetandClaude Opus 5.5 540cc49d34 ApplyTypes: place fields in offset order and keep an embedded struct over views into it
Entity._sprite (ANM2, now its full 0x114) was being overwritten by _spriteOffset/_spriteScale/_isFlipX,
which are sprite members; every sprite access had fallen back to field_0x48/0x78/0x7c/0x8c.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 22:46:55 -04:00
shweetandClaude Opus 5.5 288ea53ab4 ApplyProtos: REPENTOGON prototypes applied only where the callee's RET n agrees (~600 functions)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 22:22:39 -04:00
shweetandClaude Opus 5.5 3f88849636 ApplyTypes: classes with __thiscall methods keep a typed this even with no confirmed field
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 21:59:11 -04:00
shweetandClaude Opus 5.5 5d1b595294 Struct fields only where this exe confirms them; 600 verified fields; generated src/structs.hpp
REPENTOGON targets 1.9.7.12 and its offsets drift, so they are no longer trusted by themselves:
scripts/zhl_fields.py (replaces fix_offsets.py) keeps a REPENTOGON field only when a getter or the
game's Lua field table confirms it, or it sits between two confirmed fields with the same shift.
8 agents verified the rest against code (Game/Manager/Entity_Player shift in steps; Room, ANM2,
EntityConfig unshifted). src/structs.hpp is generated from the confirmed fields with static_asserts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 21:37:10 -04:00
shweet d2b8a9229a names: CAH fill, NPC hold 2026-10-24 21:24:59 -04:00
shweetandClaude Opus 5.5 17fa5aa8e2 use_dispatch: id -> case table for UseActiveItem/UseCard/UsePill from the jump tables; find.sh active/card/pill
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 21:14:38 -04:00
shweetandClaude Opus 5.5 e22000166d vtable.py: bases from RTTI; 35 slot names inherited from REPENTOGON's base layouts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 20:30:12 -04:00
shweetandClaude Opus 5.5 3e43a4ced2 find.sh vtable CLASS: vtable slots from the exe's RTTI
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 20:29:01 -04:00
shweetandClaude Opus 5.5 0a615743fc db: 575 tier-3 names (largest unnamed functions) and 50 corrections of wrong ZHL/ICF names
Entity_Player::Update, RoomTransition::ChangeRoom, PlayerHUD::RenderHearts, ReviveFromTrinket,
Menu_Game::Update, MenuManager::Render were on the wrong functions; real Beast and Scourge bodies
found; the Lua Font table was attributed to KColor; Weapon vtable slots from the exe's RTTI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 20:28:28 -04:00
shweetandClaude Opus 5.5 ba6ef6dcb0 db/locals.tsv + ApplyLocals.java: per-function local variable renames/retypes; apply_db renames name-only locals in the dump
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 17:40:37 -04:00
shweetandClaude Opus 5.5 60942dc32c Split zhl multi-field declarations (22 lines: player hearts, BitSet128, BlendMode...) in zhl_match.py and zhl_fields.tsv
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 16:28:00 -04:00
shweetandClaude Opus 5.5 13fb3d891e db: 85 more names (Lua-vs-sig fixes, top gameplay helpers); apply_db by address; atomic redump
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 13:23:19 -04:00
shweetandClaude Opus 5.5 03a56f217f Import anm2/rooms labels into db, embed struct fields, mine Lua getters for fields
- db/names.tsv: 163 names from src/anm2 and src/rooms labels (2 fix wrong ZHL names)
- ApplyTypes: embed known structs (Entity._sprite is an ANM2) instead of skipping them
- scripts/lua_fields.py -> lua_fields.tsv: 96 fields from the game's own Lua getters

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 13:19:48 -04:00
shweetandClaude Opus 5.5 ad8f933086 Salvage Repentance+ 1.9.7.17 decompilation toolkit, notes and name database
Ghidra 12.2 project and full dump of isaac-ng.exe v1.9.7.17, query scripts, notes
indexed by entity, anm2/rooms reimplementations, and db/ (names + fields) that
build.sh re-applies. Fixes awk numeric address comparison in find.sh/decompile.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 13:08:19 -04:00