Commit Graph
256 Commits
Author SHA1 Message Date
shweetandClaude Opus 5.5 d6e1ca7c6c data.h: resource_path (lowercased, as the game normalizes); .anm2 files are Anm2Ed JSON documents
The import tool now writes every .anm2 as Anm2Ed's JSON document under its own name (anm2ed convert --format json),
as isaac-classic does; other XML keeps the generic {tag, attrs, children, text} mapping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 22:31:16 -05:00
shweetandClaude Opus 5.5 837aa06518 Curation round 1: 66 boot-path functions rewritten in src/; the game links into a Linux executable
Six agents took over ANM2/AnimationState/LayerState, ItemConfig, EntityConfig, StringTable/Font/FormattedText/RichText,
OptionsConfig/ChallengeParams and ModManager/ModEntry functions (FormattedText::parse checked against a transliteration
of its assembly on 200,000 random inputs). 174 field rows and 32 names from the round are merged into db/.
source_tree.py: a struct or class src/*.h defines is no longer emitted in classes.h (class takeover) and gets no stubs;
data labels get stub definitions. build/isaac links (64-bit ELF) and stops at the first function not reconstructed:
IsaacMain. Boot path 64/615 functions curated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 22:13:25 -05:00
shweetandClaude Opus 5.5 8c31c98a81 notes/systems/filesystem.md: the packed .a archive format; data_path lowercases like the game
The import tool (tools/import.py, gitignored) unpacks all 22 archives (checksums verified), converts XML and anm2 to
JSON and writes every path lowercased, matching the game's case-insensitive lookups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:56:56 -05:00
shweetandClaude Opus 5.5 08ca87dded src/gl.h: the OpenGL entry points the game calls, loaded through SDL (no libepoxy), as in smack-a-brother
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:45:50 -05:00
shweetandClaude Opus 5.5 2b108ca729 Generated stubs: the build links into a Linux executable that runs as far as src/ goes
source_tree.py writes generated-src/stubs.cpp: every function, vtable slot and import src/ has not taken over, defined
as a stub that prints 'Reached <name> <address>, not reconstructed yet' and stops. CMake builds src/*.cpp + stubs into
the isaac executable, so each run names the next function to curate. src/main.cpp hands over to the game's IsaacMain.
Classes with only parameterised constructors get a defaulted one, so stub constructors of their holders compile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:44:40 -05:00
shweetandClaude Opus 5.5 9d4d4f5c64 Build 29: zero-length placeholder structs, generated-src with standard types
--check: 938/3256 method bodies compile for x86_64 (28.8%), 32-bit layout asserts hold; boot path 3/626 curated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:41:34 -05:00
shweetandClaude Opus 5.5 2d3c4eb75b src/data.h: the curated loaders' view of a converted game document (resources/<path>.json via simdjson)
Elements are {tag, attrs, children, text} with attribute strings as written, so a loader walks them the way the game
walked rapidxml nodes and converts values with the same semantics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:33:10 -05:00
shweetandClaude Opus 5.5 1326bb1571 source_tree: generated code coexists with the standard library and simdjson
Ghidra's primitive names become the standard types they are (undefined4/uint/ulong -> uint32_t, byte -> uint8_t ...;
Ghidra's ulong is 4 bytes, glibc's 8); the prelude includes the C library headers and every Ghidra type, global, import
or free function the headers already declare is left to them; the MSVC STL stand-ins move to namespace msvc. A curated
file can now include <string>, <vector>, simdjson.h and classes.h together. Body rate unchanged: 877/3256.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:30:14 -05:00
shweetandClaude Opus 5.5 0b86c1071f external/: simdjson v5.1.1; the game reads JSON that an import tool makes from the player's install
Config and .anm2 data are converted from the install's XML (and packed archives) into a gitignored resources/ by a
tool in the gitignored tools/, as in smack-a-brother. The game has no XML parser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:27:08 -05:00
shweetandClaude Opus 5.5 199c3d3d2b external/: SDL3 (release-3.4.20) and Lua 5.3.6 as static submodules, wired into CMake
SDL3 replaces GLFW, Win32 and OpenAL (window, OpenGL context, input, gamepads, audio), trimmed to those pieces as in
smack-a-brother. Lua 5.3 keeps the mod API. Online features become offline stubs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:14:59 -05:00
shweetandClaude Opus 5.5 832ea0297b source_tree: db/fields.tsv (and --fields files) overlay the build's field list, so a new field needs no Ghidra rebuild
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:12:39 -05:00
shweetandClaude Opus 5.5 4badd39376 source_tree --check: report boot-path curation (what Manager::Init reaches, the first milestone)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:12:06 -05:00
shweetandClaude Opus 5.5 3ce74c6e2d Reconstruction layout: generated-src/ (generated) and src/ (curated), CMake, the first takeover: RNG
The decompiled C++ tree moves to generated-src/ (classes.h, C++20); src/ is for code written by hand. A curated function
defines the generated declaration and starts its comment with its address, and source_tree.py stops emitting that body.
src/rng.cpp takes over RNG (SetSeed, the constructor, Next, RandomInt, RandomFloat, Shuffle) with the shift table read
from the exe as a constexpr array; src/log.h names KAGE_LogMessage's levels (1 INFO, 2 NET, 4 WARN, 8 ERROR, 16 ASSERT,
from its prefix jump table). CMakeLists.txt builds src/*.cpp against generated-src/classes.h (clean with -Wall -Wextra).
structs.hpp and headers.py are retired: scripts/merge_fields.py writes the merged field list, classes.h checks the layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:10:23 -05:00
shweetandClaude Opus 5.5 2ff2d5d87f source_tree: pointer casts through GHIDRA_CAST (a float holds the pointer's bits); ApplyTypes: zero-length placeholders
MSVC copies pointers through XMM registers, so Ghidra types some as float: those casts now reinterpret the bits
(float-to-pointer errors 2415 -> 171). Classes with no known field get a zero-length struct, so the decompiler stops
typing 4-byte values with them (applies next build). The hazard count now covers every raw (char *)x + n access: 32689.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:01:50 -05:00
shweetandClaude Opus 5.5 bafef76746 source_tree: STL member layouts, (int) casts that keep pointer width, EntityPtr as a pointer, Ghidra partial fields
Container fields use the MSVC layouts ApplyTypes gives Ghidra (vector_X -> std_vector ...); (int)/(uint) casts become
GHIDRA_INT/GHIDRA_UINT (32-bit numbers, full-width pointers); EntityPtr behaves as the raw pointer the code treats it
as; EXPR._0_4_ partial accesses become explicit offsets; field-less Ghidra placeholders no longer claim 4 bytes.
--check: 878/3262 method bodies compile for x86_64 (26.9%).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 20:58:28 -05:00
shweetandClaude Opus 5.5 fdfdb10137 Build 28: DumpAll exports types, globals and imports; the generated tree targets 64-bit Linux
DumpAll writes dump/types.tsv (Ghidra structs/unions with components, typedefs, enums with values), data.tsv (global
data labels with types) and externals.tsv (imported functions). source_tree.py lays the Ghidra types out with the
classes (591 types, 347 sized), declares every global, import and code label, drops Windows calling conventions,
leaves third-party classes (std, rapidxml, theoraplayer, luabridge, stb_vorbis) declared but not reconstructed, turns
raw vtable calls on typed objects into named virtual calls and (int)p + n byte arithmetic into (char *)p + n.
The tree now targets x86_64 Linux; the original 32-bit layout stays as LAYOUT32 asserts, checked with -m32 (they hold).
--check: 775/3262 method bodies compile for x86_64 (23.8%), 23010 raw offset accesses left (64-bit hazards).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 20:54:04 -05:00
shweetandClaude Opus 5.5 177020866b Build 27: real class sizes in Ghidra's structs; src/game: generated C++ tree with method bodies
ApplyTypes grows each struct to its RTTI size: this[1] misreads 1363 -> 941, prototypes applied 3266.
scripts/source_tree.py now writes src/game/classes.hpp (477 classes, every free and namespace function declared,
Ghidra p-code intrinsics as macros) and one .cpp per class with its decompiled method bodies; member calls become
direct calls ((Class *)(obj))->Class::method(args) and field_0xN bytes explicit offsets. --check compiles the tree:
652/3315 method bodies compile against the header (19.7%), the rest mostly need the data globals and Ghidra types
DumpAll exports from the next build. CLAUDE.md is untracked (gitignored).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 20:18:39 -05:00
shweetandClaude Opus 5.5 c426b91486 Full redump with round 26 (689 locals in 127 functions); src/game/classes.hpp: reconstructed class declarations
classes.tsv (vtable.py --classes): 194 RTTI classes with vftable, direct bases (offsets from the PMD), vtable slots and,
for 176, the exact size from the deleting destructor's sized delete. Sizes flow into structs.hpp (static_assert sizeof)
and, next build, into Ghidra's structs (ApplyTypes 'size' rows) so this[1]._x stops standing in for the tail.
scripts/source_tree.py generates src/game/classes.hpp: 293 classes with real bases, vtables in slot order (overrides,
REPENTOGON slot names, vfunc_N placeholders), fields at their offsets, 2400 method declarations; it compiles with
clang --target=i686-pc-windows-msvc and all 174 sizeof / 1899 offsetof asserts hold. Round 26's prototypes are held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 19:43:13 -05:00
shweetandClaude Opus 5.5 d4033485ba Full redump with round 25: 778 locals in 97 functions; ApplyProtos renames a local that blocks a parameter name
Prototypes applied 3163 -> 3241, rejected 113 -> 35 (a locals row had named the stand-in local like the parameter).
Round 25 agents may fix wrong names and retype in place (39 same-name rows). Dropped the row naming Level::load_room's
this 'pit'; locals_round.py no longer merges renames of this. Round 25's prototypes are held in db/protos.zhl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 18:59:02 -05:00
shweetandClaude Opus 5.5 24098479e7 ApplyProtos: read the purge from the RETs when Ghidra has none, trust db/ prototypes past that; log what it skips
Purge unknown 139 -> 11, prototypes applied 3032 -> 3163 (round 24's 12 included), param_N lines 33145 -> 31116,
in_ECX 35059 -> 32432; Room::Update/Render get a typed this. ApplyLocals: a same-name row with a type retypes in place,
and an unparseable type fails only its row. notes/decomp_issues.md collects what the round 23-24 agents found wrong.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 18:16:18 -05:00
shweetandClaude Opus 5.5 264c401368 Full redumps with rounds 23-24: second-pass locals in the largest named functions, 270 prototypes from round 22
Round 23: 2490 locals in 50 functions (default names there 5761 -> 2946). Round 24: 1116 locals in 79 more.
3032 prototypes applied. db/protos.zhl also holds round 24's 12 prototypes for the next build.
scripts/locals_round.py: pick / locals / protos steps of a locals round (the /tmp copies were lost in a reboot).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 17:42:50 -05:00
shweet c4708deb51 Merge items/floors13 notes 2026-10-30 23:17:14 -04:00
shweetandClaude Opus 5.5 ff1a7e589b names/notes: floors13 - LevelGenerator for Repentance+ floors in isaac-classic: generate_dungeon's retries and photo-door block_cell, add_dead_end 0x9af1e0, try_resize_room's 14 spots and slots (the last read past the array), DetermineBossRoom's XL corridor, place_boss_room's XL second room, place_secret_room scoring, Level::get_secret_room_excluded_cells 0x738d70 (was Console::Print), place_special_rooms' required rooms; HasPhotoDoor 0x74f030 checked against the port's depths_ii key
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 23:14:01 -04:00
shweet a2536b4077 Merge items/ultra_secret follow-up notes 2026-10-30 22:22:19 -04:00
shweetandClaude Opus 5.5 4528d5c4cc Parity notes: ultra secret follow-up ported (pocket card outlines, stage 11 / HasPhotoDoor 0x74f030 start room exception, SetRoomTypes red-room normal doors, super secret colorize); the Abandoned Mineshaft's colorize left
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 22:21:45 -04:00
shweet ab107b3bba Merge items/ultra_secret notes 2026-10-30 21:57:28 -04:00
shweetandClaude Opus 5.5 d799646db4 Parity notes: ultra secret rooms and red rooms (place_special_rooms 0x739370's ultra secret step, try_place_room 0x9ae640, block_room_area 0x9b1860; UseRedKey 0x5b2360, UpdateRedKey 0x8271e0, CanSpawnDoorOutline 0x74cd70, get_door_neighbor_room 0x74cb50, MakeRedRoomDoor 0x74d010; Soul of Cain 0x7b7aed; type 29's pool, backdrop 50, music 0x33, colorize, map exclusions, door hole); Level::roll_red_room_type 0x74cea0 and get_red_room_neighbor_slots 0x74c9e0 named
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 21:57:00 -04:00
shweet f67f271995 Merge items/red_chest notes 2026-10-30 21:08:08 -04:00
shweetandClaude Opus 5.5 1184062f18 Parity notes: red chest (GetChestLoot 0x6dae40 variant 360 branch, TryOpenChest 0x6e6e40 spawning, ThrowSpider 0x6c2750, Pickup_PickVariant 0x6ddcd0's chest chain, POOL_RED_CHEST 9)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 21:07:12 -04:00
shweet 690b01459a Merge items/pedestals notes 2026-10-30 20:03:21 -04:00
shweetandClaude Opus 5.5 4cefceb1d6 Pedestals parity notes: collectible Wait 20 (Init 0x6e02f0, Update 0x6e3940, HandleCollision 0x6e8ae0), other pickups' Appear/DropSound gate, Render 0x6e69b0's shared altar/item origin, FindFreePickupSpawnPosition 0x813520
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 20:02:44 -04:00
shweet 10775d097f Merge items/strange_key notes 2026-10-30 19:45:04 -04:00
shweetandClaude Opus 5.5 8aa913ef2b Strange Key's Pandora's Box branch (UseActiveItem 0x5ba903): pool table read as ItemPoolType (6/8/12 = library/golden chest/curse, correcting parity_rooms2), shuffle, spawn loop; rng_vector_at 0x5cbd00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 19:38:00 -04:00
shweet cba1310e2e Merge items/blue_rooms notes 2026-10-30 18:45:15 -04:00
shweetandClaude Opus 5.5 43b608e25f Blue rooms and Blue Key: GridEntity_Door::TryUnlock 0x710480 forces key/coin doors (variant 1/2) open for free and marks the target room (flag 0x40000), StartRoomTransition 0x6fd7c0 -> Level::prepare_blue_room 0x74d4a0 (target DecorationSeed RNG 5/27/28, Init3's three draws, shape 6/7 or 4/5, GetRandomRoom type 28 then any shape, doors to target and source), Level::ChangeRoom 0x73fc80 clearing the mark through the entered room's doors, load_room 0x73e0a0's dead end to negative rooms, SetRoomTypes' unlocked doors in room -16, backdrop 13 (LoadBackdropGraphics 0x7f1380), the blue door light, SpawnClearAward's multiplier; Level::get_door_slot 0x73d9b0 named
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 18:41:32 -04:00
shweet ea42962f58 Merge items/player_parts notes 2026-10-30 17:47:06 -04:00
shweetandClaude Opus 5.5 88b8393cfe Player parts: how Entity_Player::Update 0x782af0 transforms the head and body layer groups separately (UpdateCostumes 0x75bf00 marks layers 1, 2, 3, 11 as body; head layers take HeadTransform, _headScale, the head lift * 8; render_build_sprite_quad 0x409cb0 scales a layer about its frame pivot), Jelly Belly's wobble constants (0x787178), and the other part effects (Adrenaline, Tainted Magdalene's hug, Reverse Chariot shake, Berserk, Mars, CACHE_SIZE head scale in EvaluateItems 0x763570)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 17:43:06 -04:00
shweet 71e01c6ba8 Merge items/effect_update: Salvation beam cadence 2026-10-30 17:22:38 -04:00
shweetandClaude Opus 5.5 08fd9ee26e notes: Salvation beam cadence settled from the exe: ANM2::GetLayerFrame 0x40b1a0 is GetNullFrameById (null HitNull, hidden before the Hit, 16 frames after), EntityList::Update 0x4186c0 updates in insertion order and skips entities spawned this tick (AddEntity 0x418500 push_back), Entity_NPC::Update runs the new beam's first Update itself (0x6c8cfd) then re-arms it every tick in range: charges/rewinds one frame a tick, Hit after 24 charged frames, then one 3.5 hit per tick while re-armed (else every 3rd), at most 16
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 17:22:23 -04:00
shweet 825d658d42 Merge items/effect_update: Crack the Sky case 19 2026-10-30 17:19:52 -04:00
shweetandClaude Opus 5.5 2ab2d8f43d notes: Crack the Sky 1000.19 (Entity_Effect::Update case 19 @0x5e96b5) from case decompile + asm: Spotlight/SpotlightDelayed/SpotlightDelayed2, Salvation's subtype 3 wait (playback speed 0 and rewind by time scale at state -1, re-armed by Entity_NPC::Update's set_state(1)), the target's charge-up colour (p = frame / Hit frame), Hit: sounds 0xad/0xac, ShakeScreen(5), 1000.18.1 crater, subtype 3's four variant-5 lasers at damage x0.5; damage every 3rd state tick while layer 0 is visible (2.0 to players from enemy beams, else collision damage to NPCs); timing interplay logged as a question
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 17:19:30 -04:00
shweet ab22edda78 Merge items/effect_update: decompile.sh --case and Entity_Effect::Update item cases 2026-10-30 17:16:52 -04:00
shweetandClaude Opus 5.5 e640efa18f notes: Entity_Effect::Update item cases transcribed via decompile.sh --case + asm: Salvation halo (case 123 @0x6064cc; its beams are Entity_NPC::Update's 1000.19.3), Trinity Shield (47 @0x5f2add), Luna moonlight (39.1 @0x5f2246 + timer callback 0x6073f0), Spear of Destiny (83 @0x5fea2f), Linger Bean cloud (105 @0x600dfc), Death Skull (109 @0x6029b5), Larynx/Mega Bean shockwave (127/202 @0x5fa30d) with Larynx's use from asm (pitch (n-8)*0.2+1.1, SetCollisionDamage(n*28+20), fade from n>=6), Mega Blast's laser damage (hit damage x5, x2 deathmatch), Meat Cleaver slash (176 @0x5df80d -> Entity_NPC::split 0x6d97e0), Vade Retro ghosts (144 @0x5d78ee), Ocular Rift (180 @0x5e1225), Jacob's Ladder chain lightning (167 @0x5e038f); names for 9 helpers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 17:16:16 -04:00
shweetandClaude Opus 5.5 9c1cc9c741 decompile.sh --case: decompile single switch cases of functions Ghidra times out on (Entity_Effect::Update 0x5d4380): DecompileCase.java patches the switch JMP at 0x5d47cc to jump straight to the case in a -readOnly copy and re-flows the body; all 139 cases decompile in ~90 s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 17:09:29 -04:00
shweet 308b17336a Merge items/death_certificate follow-up notes 2026-10-30 17:05:34 -04:00
shweetandClaude Opus 5.5 0aadfd025b Death Certificate follow-up: dimension maps (refresh_room_icons draws the current dimension's room map), transition 20's timing, and dimension 2's other rules read (pick_collectible's branch is a projectile variant; pit art from the room backdrop; rock drops never Mines)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 17:05:06 -04:00
shweet eb4952ed8f Merge items/death_certificate parity notes
# Conflicts:
#	db/names.tsv
2026-10-30 16:46:45 -04:00
shweetandClaude Opus 5.5 35955a3517 Death Certificate and dimension 2: Level::generate_dark_closet 0x751650 (was GenerateHome), Level::enter_dark_closet 0x7515c0, the LevelGenerator's tables and growth, the way back (RemoveOtherOptions, Game::Update, ChangeRoom) and dimension 2's looks; notes/items/parity_death_certificate.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:45:54 -04:00
shweet eb485534ed Merge items/familiars2 follow-up notes 2026-10-30 16:04:41 -04:00
shweetandClaude Opus 5.5 a28e3380c4 notes: familiars2 follow-up: 1000.2's subtype animation table (Entity_Effect::Init 0x5ce43f), NpcAI::ENTITY_BLOOD_PUPPY 0x552d30's targets, attack, _i2 heart drops and damage pass
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:03:33 -04:00