Addresses - MarklyThomas/Secret-Repo GitHub Wiki

[Object] Addresses

Description:
Optional special function, for characters, with combinations (partner) support

0xffffb128, 0xffffb172, 0xffffb1bc, 0xffffb206, 0xffffb250, 0xffffb292, 0xffffb2e4, 0xffffb32e

Addresses of slot objects in the Data Select menu. (Don’t consider No Save and Delete slots)

Base u32 Address: 0xffffb128
Offset: 0x4a

u8[A0 + 0x24]

Returns 0x00 if not an extra character, or the ID of the shown character.

u8[A0 + 0x05]

The right value of the saved extra character for the slot. It determines the value for u8[A0 + 0x24].

u8[A0 + 0x08]

A temporary value that is set when deleting a slot with an extra character. Returns true.

u8[A0 + 0x3b]

Returns true for the locked character.

u8[A0 + 0x3c]

Sets to true when trying to create a save with a locked extra character.

u8[A0 + 0x3d]

While u8[A0 + 0x3c] is set, this counts up to 48 value to stop flashing.


ROM Addresses

Description:
Empty ROM addresses used by the framework
0xffffe653

Sets flags when loading the zone, if the character has a custom objects, layout, rings. See HAS_* constants.

Size: u8
Address key: global.zone.xtra

0xffffe654

Current active extra character in the Main game. It is also sets in some menus when selecting an extra character.

Size: u8
Address key: global.xtrachar

0xffffe655

Current active extra character in Competition mode (P1).

Size: u8 Address key: competition_mode.xtrachar.player1

0xffffe656

Current active extra character in Competition mode (P2).

Size: u8 Address key: competition_mode.xtrachar.player2

0xffffe657 ... 0xffffe65c

Stores a backup of selected extra characters in all slots on Competition mode character selection.

Base u32 Address: 0xffffe657
Address key: competition_mode.xtrachar.backup

// - 0xffffe657		->	Player 1's (on Sonic)
// - 0xffffe658		->	Player 1's (on Tails)
// - 0xffffe659		->	Player 1's (on Knuckles)

// - 0xffffe65a		->	Player 2's (on Sonic)
// - 0xffffe65b		->	Player 2's (on Tails)
// - 0xffffe65c		->	Player 2's (on Knuckles)
0xffffe65d

Stores a backup of player 1’s vanilla character before the race. (Competiton mode)

Size: u8 Address key: competition_mode.character.backup1

0xffffe65e

Stores a backup of player 2’s vanilla character before the race. (Competiton mode)

Size: u8 Address key: competition_mode.character.backup2

0xffffe65f

Sets the total number of extra characters available on the ending screen.

Size: u8 Address key: global.ending.xtrachar


Shared Memory

Stored data

Address values that are automatically stored in PersistentData and SRAM. Be careful when making your changes to the data, as this may damage your saves.

0x8fe660 ... 0x8fe667

Related functions:

Addresses for saving character IDs in Data Select slots. Each subsequent byte corresponds to a slot in the menu. (Doesn’t consider No Save and Delete slots)

Base u32 Address: 0x8fe660
Address key: sharedmemory.xtrachar
PersistentData key: SRAM_Extraslots

SRAM info:
Offset:0x660
Size:0x08

// - 0x8fe660   -> Save slot 1 (Saved extra character)
// - 0x8fe661   -> Save slot 2 (Saved extra character)
// - 0x8fe662   -> Save slot 3 (Saved extra character)
// - 0x8fe663   -> Save slot 4 (Saved extra character)
// - 0x8fe664   -> Save slot 5 (Saved extra character)
// - 0x8fe665   -> Save slot 6 (Saved extra character)
// - 0x8fe666   -> Save slot 7 (Saved extra character)
// - 0x8fe667   -> Save slot 8 (Saved extra character)
0x8fe668 ... 0x8fe676

Addresses for saving character IDs in the slots of the Competition mode zones. Every 3 bytes is a slot with the corresponding places in the list.

Base u32 Address: 0x8fe668
Address key: sharedmemory.records.xtrachar
PersistentData key: SRAM_CompetitionExtraChars

SRAM info:
Offset: 0x668
Size: 0x0f

// - 0x8fe668	-> Azure Lake (Best time extra character)
// - 0x8fe669	-> Azure Lake (Second time extra character)
// - 0x8fe66a	-> Azure Lake (Third time extra character)

// - 0x8fe66b	-> Balloon Park (Best time extra character)
// - 0x8fe66c	-> Balloon Park (Second time extra character)
// - 0x8fe66d	-> Balloon Park (Third time extra character)

// - 0x8fe66e	-> Desert Palace (Best time extra character)
// - 0x8fe66f	-> Desert Palace (Second time extra character)
// - 0x8fe670	-> Desert Palace (Third time extra character)

// - 0x8fe671	-> Chrome Gadget (Best time extra character)
// - 0x8fe672	-> Chrome Gadget (Second time extra character)
// - 0x8fe673	-> Chrome Gadget (Third time extra character)

// - 0x8fe674	-> Endless Mine (Best time extra character)
// - 0x8fe675	-> Endless Mine (Second time extra character)
// - 0x8fe676	-> Endless Mine (Third time extra character)
0x8fe677 ... 0x8fe707

Addresses for saving character IDs in DAGE Challenge mode slots. Every 0x48 bytes are responsible for their own mode, every 3 bytes is a zone (considering the act) of 1 byte for 3 slots.

Base u32 Address: 0x8fe677
Address key: sharedmemory.challenge.xtrachar
PersistentData key: SRAM_ChallengeExtraChars

SRAM info:
Offset: 0x678
Size: 0x48 * 0x03

// - 0x8fe677			-> Next 0x48 byte's is selected extra characters in Act Select mode.
// - 0x8fe677 + 0x48		-> Next 0x48 byte's is saved extra characters in Teme Attack mode.
// - 0x8fe677 + 0x48 + 0x48	-> Next 0x48 byte's is saved extra characters in Time Stone Run mode.

// First 0x48 bytes (Act Select mode)

// - 0x8fe677	-> AIZ Act 1 (on Sonic)
// - 0x8fe678	-> AIZ Act 1 (on Tails)
// - 0x8fe679	-> AIZ Act 1 (on Knuckles)

// - 0x8fe67a	-> AIZ Act 2 (on Sonic)
// - 0x8fe67b	-> AIZ Act 2 (on Tails)
// - 0x8fe67c	-> AIZ Act 2 (on Knuckles)
// (...)
// - 0x8fe6b9	-> DEZ Act 1 (on Sonic)
// - 0x8fe6ba	-> DEZ Act 1 (on Tails)
// - 0x8fe6bb	-> DEZ Act 1 (on Knuckles)
// - 0x8fe6bc	-> DEZ Act 2 (on Sonic)
// - 0x8fe6bd	-> DEZ Act 2 (on Tails)
// - 0x8fe6be	-> DEZ Act 2 (on Knuckles)
⚠️ **GitHub.com Fallback** ⚠️