Actions

SCHG

Sonic Adventure 2 (PC)/RAM Editing

From Sonic Retro

Revision as of 01:56, 17 December 2012 by Flarn2006 (talk | contribs) (Character Object 1: Clarified the meaning of the "Hurt" bit)
SCHG: Sonic Adventure 2
Dreamcast
GameCube
PC


Cheat Engine is a program that enables you to edit a program's RAM while it's running. You can use this program to edit the RAM in Sonic Adventure 2, and the below cheat table file contains the addresses so you don't need to enter them manually. It also contains some additional values relating to Chao, as well as a few tweaks to enable or fix certain things.

Download.svg Download SA2 Cheat Table
File: SA2_Cheat_Table.zip (94 kB) (info)

Note: All values are signed, unless noted otherwise.

Global Variables

Address (hex) Type Description
0174AFDE Byte 2P Mode
  • 0 - 1 Player
  • 1 - 2 Player (3 rounds)
  • 2 - 2 Player (1 round)
0174B013 Byte P1 Alternate Costume
0174B014 Byte P2 Alternate Costume
0174B015 Byte P1 Alternate Character
0174B016 Byte P2 Alternate Character
0174B024 2 Bytes Lives
0174B028 2 Bytes P1 Rings
0174B02A 2 Bytes P2 Rings
0174B050 4 Bytes P1 Score
0174B05C 4 Bytes Total Rings (Black Market)
01934B70 Byte Current Level
01934B80 Byte P1 Character
  • 0 - Sonic
  • 1 - Shadow
  • 2 - Mechless Tails
  • 3 - Mechless Eggman
  • 4 - Knuckles
  • 5 - Rouge
  • 6 - Mech Tails
  • 7 - Mech Eggman
01934BE4 Byte P2 Character
  • 0 - Sonic
  • 1 - Shadow
  • 2 - Mechless Tails
  • 3 - Mechless Eggman
  • 4 - Knuckles
  • 5 - Rouge
  • 6 - Mech Tails
  • 7 - Mech Eggman

Pointer Area

The data here changes its location when the level is loaded. Use pointers to find them.

Master Object Struct

A pointer to this for P1 is at 01DEA6E0, for P2, 01DEA6E4. Length: 0x50.
These are all pointers.

Offset (hex) Description
0 Pointer to previously loaded object in chain.
4 Pointer to next loaded object in chain.
10 Main routine
14 Display routine
34 Object Data 1
40 Object Data 2
44 Object Name

Character Object 1

Length: 0x30

Offset (hex) Type Description
0 Byte Action. Each object has its own values for this.
4 2 Bytes Status Bitfield
Bit Value (hex) Description
0 1 On Ground
2 4 Hurt (setting bit causes you to take damage)
8 4 Bytes X Rotation (BAMS)
C 4 Bytes Y Rotation (BAMS)
10 4 Bytes Z Rotation (BAMS)
14 Float X Position
18 Float Y Position
1C Float Z Position
20 Float X Scale
24 Float Y Scale
28 Float Z Scale

Character Object 2

Length: 0x3A0

Offset (hex) Type Description
0 Byte Player Number
1 Byte Character ID
  • 0 - Sonic/Amy
  • 1 - Shadow/Metal Sonic
  • 2 - Mechless Tails
  • 3 - Mechless Eggman
  • 4 - Knuckles/Tikal
  • 5 - Rouge/Chaos
  • 6 - Mech Tails/Chao Walker
  • 7 - Mech Eggman/Dark Chao Walker
  • 9 - Super Sonic
  • 10 - Super Shadow
3 Byte Character ID 2
  • 0 - Sonic
  • 1 - Shadow
  • 2 - Mechless Tails
  • 3 - Mechless Eggman
  • 4 - Knuckles
  • 5 - Rouge
  • 6 - Mech Tails
  • 7 - Mech Eggman
  • 8 - Amy
  • 9 - Super Sonic
  • 10 - Super Shadow
  • 12 - Metal Sonic
  • 13 - Chao Walker
  • 14 - Dark Chao Walker
  • 15 - Tikal
  • 16 - Chaos
10 2 Bytes Powerups Bitfield
Bit Value (hex) Description
0 1 Barrier
1 2 Magnetic Barrier
15 8000 Invincibility
24 4 Bytes Upgrades Bitfield
Bit Value (hex) Description
0 1 Sonic's Light Shoes
1 2 Sonic's Ancient Light
2 4 Sonic's Magic Gloves
3 8 Sonic's Flame Ring
4 10 Sonic's Bounce Bracelet
5 20 Sonic's Mystic Melody
6 40 Tails' Booster
7 80 Tails' Bazooka
8 100 Tails' Laser Blaster
9 200 Tails' Mystic Melody
10 400 Knuckles' Shovel Claw
11 800 Knuckles' Sunglasses
12 1000 Knuckles' Hammer Gloves
13 2000 Knuckles' Air Necklace
14 4000 Knuckles' Mystic Melody
15 8000 Super Sonic
16 10000 Shadow's Air Shoes
17 20000 Shadow's Ancient Light
18 40000 Shadow's Flame Ring
19 80000 Shadow's Mystic Melody
20 100000 Eggman's Jet Engine
21 200000 Eggman's Large Cannon
22 400000 Eggman's Laser Blaster
23 800000 Eggman's Protective Armor
24 1000000 Eggman's Mystic Melody
25 2000000 Rouge's Pick Nails
26 4000000 Rouge's Treasure Scope
27 8000000 Rouge's Iron Boots
28 10000000 Rouge's Mystic Melody
64 Float Horizontal Speed
68 Float Vertical Speed
C0 Struct (0x84 bytes) Physics Data
D0 Float Base Speed (default is 3, changes when player picks up speed shoes, etc.)
Sonic Community Hacking Guide
General
SonED2 Manual | Subroutine Equivalency List
Game-Specific
Sonic the Hedgehog (16-bit) | Sonic the Hedgehog (8-bit) | Sonic CD (prototype 510) | Sonic CD | Sonic CD (PC) | Sonic CD (2011) | Sonic 2 (Simon Wai prototype) | Sonic 2 (16-bit) | Sonic 2 (Master System) | Sonic 3 | Sonic 3 & Knuckles | Chaotix | Sonic Jam | Sonic Jam 6 | Sonic Adventure | Sonic Adventure DX: Director's Cut | Sonic Adventure DX: PC | Sonic Adventure (2010) | Sonic Adventure 2 | Sonic Adventure 2: Battle | Sonic Adventure 2 (PC) | Sonic Heroes | Sonic Riders | Sonic the Hedgehog (2006) | Sonic & Sega All-Stars Racing | Sonic Unleashed (Xbox 360/PS3) | Sonic Colours | Sonic Generations | Sonic Forces
Technical information
Sonic Eraser | Sonic 2 (Nick Arcade prototype) | Sonic CD (prototype; 1992-12-04) | Dr. Robotnik's Mean Bean Machine | Sonic Triple Trouble | Tails Adventures | Sonic Crackers | Sonic 3D: Flickies' Island | Sonic & Knuckles Collection | Sonic R | Sonic Shuffle | Sonic Advance | Sonic Advance 3 | Sonic Battle | Shadow the Hedgehog | Sonic Rush | Sonic Classic Collection | Sonic Free Riders | Sonic Lost World
Legacy Guides
The Nemesis Hacking Guides The Esrael Hacking Guides
ROM: Sonic 1 | Sonic 2 | Sonic 2 Beta | Sonic 3

Savestate: Sonic 1 | Sonic 2 Beta/Final | Sonic 3

Sonic 1 (English / Portuguese) | Sonic 2 Beta (English / Portuguese) | Sonic 2 and Knuckles (English / Portuguese)
Move to Sega Retro
Number Systems (or scrap) | Assembly Hacking Guide | 68000 Instruction Set | 68000 ASM-to-Hex Code Reference | SMPS Music Hacking Guide | Mega Drive technical information