Files
isaac-port/notes/systems/ascent.md
T

7.2 KiB

The Ascent (Dad's Note, the backwards path), 2026-10-25

What the isaac-classic port (rif/ascent) read from the exe. Game state flags are bits of the 64-bit Game+0x26548 (high word +0x2654c): 0x2c 0x1000 (left through a secret exit), 0x2e 0x4000 (Mom's Heart killed in the Mausoleum), 0x2f 0x8000 (STATE_BACKWARDS_PATH_INIT, "pre-ascent"), 0x30 0x10000 (STATE_BACKWARDS_PATH, the Ascent). Flags set inline as or [reg+0x2654c], bit (grep the disassembly; Game::SetStateFlag is only the Lua wrapper).

pre-ascent (Level::IsPreAscent 0x74ea50, GridEntity_TrapDoor::Update 0x71fef0)

GridEntity_TrapDoor::Update (asm 0x720bd9/0x720bfe): entering a trapdoor in a secret exit room (type 0x1b) or on IsMausoleumHeartStage sets flag 0x2c; when the level also HasPhotoDoor (Depths II off the path, unlocked) flag 0x2f. Level::IsPreAscent: not Greed, not on the Ascent, effective stage (+1 with the Labyrinth) 6 on stage type 4/5 and flag 0x2f: Mausoleum/Gehenna II reached through Depths II's photo door. Users: Room::is_pre_ascent_mom_room 0x827bc0 (room type 5 and room config subtype 0x59, i.e. Mom's Mausoleum boss room), Level::CanSpawnTrapDoor 0x74b5d0 (none in that room), Room::TrySpawnSecretExit (no Mom's Heart door there), CanSpawnDevilRoom, IsNextStageAvailable, TrySpawnBossRushDoor, Room::render_lighting 0x80ea80 (that room's darkness + 0.6, capped at 1) and Backdrop::pre_render_walls 0x937420 (an extra floor overlay there while not on the Ascent).

Dad's Note's drop (Level::pick_boss_room_config 0x739080)

There is no Spawn(5, 100, 668) anywhere: Dad's Note is a room entity. Level::pick_boss_room_config with boss id 0x59 (Mom, Mausoleum) and flag 0x2f takes RoomConfig::GetRandomRoomWithFallbackStage(seed, 1, stage id, fallback 0x1f, type 5, any shape, ..., subtype 0x59): 31.mausoleum.stb has exactly one boss room of subtype 89 (variant 1), holding 5.100.668 at (6,3), rocks in the corners and no Mom; Gehenna (32) has none, so it falls back to the Mausoleum's. Off the pre-ascent floor, subtype 89 rooms come from 00.special rooms (variant 6030, Mom). Room::SpawnEntry skips type 5 entries on IsMausoleumHeartStage. Entity_Pickup::Init never morphs subtype 0x29c (0x6e0b96/0x6e0d20); Entity_Pickup::CanRerollVariant keeps it; Level::GenerateHome leaves 0x29c (and 0x274) out of its item list.

the Ascent's start (Entity_Pickup::HandleCollision 0x6e8ae0, Entity_Player::AddCollectible body 0x762646, Game::Update 0x6fadc0)

Touching Dad's Note: Game::save_rewind_state, Music::Fadeout(0.01). Adding it (the AddCollectible body past 0x75f2b2, not a Ghidra function; case at 0x76263a): if Room::is_pre_ascent_mom_room, not IsAscent and Game+0x67788 (_ascentTimer) <= 0: timer = 1. Game::Update: while > 0 it counts up, screen shake = n / 6 + 2; past 0x59 (90 ticks) it is cleared and Game::StartStageTransition(0, 5, 0). Game::Render 0x6fbc10: while > 0 a white quad, alpha n / 90 (blend mode 2). Game::restore_game_state 0x6f8786 restores it as 0/1.

StartStageTransition 0x6fdc10 (asm 0x6fe04f..): duration +0x1ba80 = 0x32 (50), but 8 on the Ascent off its last floor; mode 5: no rewind save, frame = duration, state 2 at once and Level::SetStage(game->stage, 4) (the same floor: saving its backwards stage). StageTransition::Update 0x92f1c0, end of state 2 with mode 5: flag 0x30 set, then Level::Init. Every Ascent floor (and mode 5) plays sound 0x267 (615 SOUND_FLASHBACK) there; players play no trapdoor jump-out animation on it.

backwards stages (Game::SaveBackwardsStage 0x708050, Level::SetStage 0x7466d0, FUN_00707ad0)

BackwardsStageDesc 0x320 bytes (REPENTOGON): boss RoomDescriptors[2] +0, their GameStateRoomConfig +0x170, treasure [2] +0x188 / +0x2f8, boss count +0x310, treasure count +0x314, stage type +0x318, isXL +0x31c. Seven of them, depth 1 at Game+0x6778c (stage * 800 + Game + 0x6746c, getter 0x738340). Level::SetStage (and the reseed path 0x707ad0) saves the stage being left unless on the Ascent: depth = stage + 1 on stage type 4/5, only depths 1-7. Saved: the last boss room first (Game+0x18314), then the room list's other boss rooms (type 5) up to 2, and treasure rooms (type 4) up to 2, each with its room config and entity save states; isXL = 2 bosses, and an XL stage below 7 clears depth + 1's counts.

the Ascent's floors (Level::Init 0x744940, Level::generate_backwards 0x742ef0, Level::place_rooms_backwards 0x741e60)

Level::Init: stage 13 -> Game::generate_home_level; stage <= 6 on the Ascent -> 0x742ef0. Rooms: 14 - depth on hard (Game+0x269c8 _difficulty == 1), else 12 - depth; XL: Labyrinth curse (|= 2) and + 6. Room pool: stb 0x24 (36.backwards) type 1, difficulty 1..10 (15 on hard), refilled with 15 if under 20 rooms; subtype by the desc's stage type and the stage: 1/4/7 (Basement, Caves, Depths), on 4/5 27/29/31 (Downpour, Mines, Mausoleum). Up to 100 LevelGenerator::generate tries needing at least 2 dead ends, then place_rooms_backwards (misnamed Level::generate_boss_room in db/names.tsv; REPENTOGON's signature): with no saved boss room a boss drawn as usual (BossPool::GetBossId, pick_boss_room_config) at a new end room; else each saved boss room (last first) re-placed by its config's doors, the second beside the first, descriptor flags | 1 (cleared), its save states copied back; each saved treasure room at LevelGenerator::GetNewEndRoom(shape, doors); every other room a backwards room of the subtype by shape and doors; the start room GetRandomRoom(stb 0x24, type 1, difficulty 0..0, subtype 0) = 36.backwards variant 10000, a lone 9000 trapdoor at (6,3). Room::TransformEntry 0x7ec100: on stages 1-6 on the Ascent a 9000 entry becomes 999.39 (the heaven door 1000.39, Entity_Effect::Update case 0x5f2246 — not read).

Level::SetNextStage 0x7467c0 on the Ascent: depth = stage (+1 on 4/5); depth 1 -> SetStage(13, stage type) (Home); else target = depth - 1, or depth - 2 when desc[depth - 2] is XL; desc type 4/5 -> SetStage(target - 1, 4), else SetStage(target, 0). Entity_Player::level_start 0x7a4ba0: on the Ascent (but Mausoleum II) the player starts beside the start room's first door (else a random free one).

Level::UpdateBackwardsPathStages 0x7eb870 (music): on the Ascent a layer bit per depth still to climb (chapter (depth - 1) / 2, or (depth - 2) / 2 + 3 on the path) of track 118 "Genesis (reversed)" (6 layers: Basement, Caves, Depths, Downpour, Mines, Mausoleum). Room::Update clears music layer bit 0 outside Home and the Ascent.

Not found: where the trinkets left in saved rooms become Cracked Keys (the wiki's claim): no 0x4e near a 0x15e in any Ascent-flag function, nor in AddCollectible's body.

isaac-classic port (2026-10-25)

stages.json ascent (the set rebirth_backwards with subtypes, counts, difficulty windows, start room backwards10000 whose trapdoor is the heaven door record, Home as its stage, the 90-tick white tint, SOUND_FLASHBACK), linked room is_pre_ascent (Depths II's photo door), chapter pre_ascent_boss_room (mausoleum1_5 for Mausoleum and Gehenna II), Dad's Note's ascent_start effect. The run carries backwards stages by depth (boss/treasure room codes, bosses and their left pickups, trapdoors dropped). Left: the music layers, the screen shake, the player's door start and LightTravel, the room's +0.6 darkness, the Cracked Keys, the heaven door's own update.