Difference between revisions of "Sonic Adventure 2 (PC)/RAM Editing"
From Sonic Retro
m (Text replacement - "{| class="prettytable" style="width:70%;"" to "{| class="prettytable" style="width:auto;"") |
|||
(15 intermediate revisions by 5 users not shown) | |||
Line 4: | Line 4: | ||
{{Download|title=SA2 Cheat Table|file=SA2_Cheat_Table.zip|filesize=27 KB}} | {{Download|title=SA2 Cheat Table|file=SA2_Cheat_Table.zip|filesize=27 KB}} | ||
Note: All values are signed, unless noted otherwise. | Note: All values are signed, unless noted otherwise. | ||
− | ==Global | + | ==Global variables== |
− | {| class="prettytable" | + | {| class="prettytable" style="width:auto;" |
!Address (hex)||Type||Description | !Address (hex)||Type||Description | ||
|- | |- | ||
Line 22: | Line 22: | ||
*1 - 2 Player (3 rounds) | *1 - 2 Player (3 rounds) | ||
*2 - 2 Player (1 round) | *2 - 2 Player (1 round) | ||
+ | |- | ||
+ | | 0174AFDF | ||
+ | | Byte | ||
+ | | 2P Level Category | ||
+ | *1 - Level 1 (Mini Stage) | ||
+ | *2, 3, 4 - Levels 2-4 (Normal) | ||
|- | |- | ||
| 0174AFED | | 0174AFED | ||
Line 35: | Line 41: | ||
| Time Stop Activator | | Time Stop Activator | ||
*0 - inactive | *0 - inactive | ||
− | *1 - stops | + | *1 - stops player 1 |
− | *2 - | + | *2 - stops player 2 |
|- | |- | ||
| 0174AFF8 | | 0174AFF8 | ||
Line 45: | Line 51: | ||
| Byte | | Byte | ||
| Controls Active | | Controls Active | ||
+ | |- | ||
+ | | 0174B004 | ||
+ | | Byte | ||
+ | | Chao Key collected | ||
|- | |- | ||
| 0174B013 | | 0174B013 | ||
Line 119: | Line 129: | ||
*16 - in-game level is fully loaded | *16 - in-game level is fully loaded | ||
*17 - pause menu | *17 - pause menu | ||
− | *18 | + | *18 - leftover memory card error ("slot %s") |
− | + | *19 - returns to menu | |
|- | |- | ||
| 01934BE4 | | 01934BE4 | ||
Line 137: | Line 147: | ||
| Byte | | Byte | ||
| Cannon's Core Freeze Duration | | Cannon's Core Freeze Duration | ||
+ | |- | ||
+ | | 01D7BB10 | ||
+ | | 4 Bytes | ||
+ | | Current Menu | ||
+ | *0 - Title Screen | ||
+ | *1 - Main Menu | ||
+ | *2 - Story Select | ||
+ | *3 - Stage Select | ||
+ | *4 - 2P Dreamcast | ||
+ | *5 - Story Mode | ||
+ | *6 - Settings | ||
+ | *7 - PAL TV Settings | ||
+ | *8 - Sound Test | ||
+ | *9 - File Select (from Title Screen) | ||
+ | *10 - Kart Racing | ||
+ | *11 - Download Event | ||
+ | *12 - Boss Attack | ||
+ | *13 - Tutorial | ||
+ | *15 - Emblem Results | ||
+ | *16 - 2P Battle | ||
+ | *21 - Controls | ||
+ | *22 - Bonus Video | ||
+ | *23 - How to Play | ||
+ | *24 - File Select (from Settings) | ||
+ | |- | ||
+ | | 01D7BB14 | ||
+ | | 4 Bytes | ||
+ | | Current Menu State | ||
|- | |- | ||
| 01D9442C | | 01D9442C | ||
Line 149: | Line 187: | ||
| Byte | | Byte | ||
| P1 Lighting (0 through 255) | | P1 Lighting (0 through 255) | ||
+ | |- | ||
+ | | 01DE94A0 | ||
+ | | Float | ||
+ | | X Gravity | ||
+ | |- | ||
+ | | 01DE94A4 | ||
+ | | Float | ||
+ | | Y Gravity | ||
+ | |- | ||
+ | | 01DE94A8 | ||
+ | | Float | ||
+ | | Z Gravity | ||
+ | |- | ||
+ | | 01DEC628 | ||
+ | | 4 Bytes | ||
+ | | Emblem Results Time (Stops increasing after collecting 180 emblems) | ||
+ | |- | ||
+ | | 01DEC62C | ||
+ | | 4 Bytes | ||
+ | | Play Time | ||
|} | |} | ||
− | ==Pointer | + | ==Pointer area== |
The data here changes its location when the level is loaded. Use pointers to find them. | The data here changes its location when the level is loaded. Use pointers to find them. | ||
− | ===Master Object | + | ===Master Object struct=== |
A pointer to this for P1 is at 01DEA6E0, for P2, 01DEA6E4. Length: 0x50.<br /> | A pointer to this for P1 is at 01DEA6E0, for P2, 01DEA6E4. Length: 0x50.<br /> | ||
These are all pointers. | These are all pointers. | ||
− | {| class="prettytable" | + | {| class="prettytable" style="width:auto;" |
!Offset (hex)||Description | !Offset (hex)||Description | ||
|- | |- | ||
Line 184: | Line 242: | ||
===Character Object 1=== | ===Character Object 1=== | ||
Length: 0x30 | Length: 0x30 | ||
− | {| class="prettytable" | + | {| class="prettytable" style="width:auto;" |
!Offset (hex)||Type||Description | !Offset (hex)||Type||Description | ||
|- | |- | ||
Line 194: | Line 252: | ||
| 2 Bytes | | 2 Bytes | ||
| Status Bitfield | | Status Bitfield | ||
− | {| class="prettytable" | + | {| class="prettytable" style="width:auto;" |
!Bit||Value (hex)||Description | !Bit||Value (hex)||Description | ||
|- | |- | ||
Line 244: | Line 302: | ||
===Character Object 2=== | ===Character Object 2=== | ||
− | + | ====Common Values==== | |
− | {| class="prettytable" | + | {| class="prettytable" style="width:auto;" |
!Offset (hex)||Type||Description | !Offset (hex)||Type||Description | ||
|- | |- | ||
Line 297: | Line 355: | ||
| 2 Bytes | | 2 Bytes | ||
| Powerups Bitfield | | Powerups Bitfield | ||
− | {| class="prettytable" | + | {| class="prettytable" style="width:auto;" |
!Bit||Value (hex)||Description | !Bit||Value (hex)||Description | ||
|- | |- | ||
Line 320: | Line 378: | ||
| 4 Bytes | | 4 Bytes | ||
| Upgrades Bitfield | | Upgrades Bitfield | ||
− | {| class="prettytable" | + | {| class="prettytable" style="width:auto;" |
!Bit||Value (hex)||Description | !Bit||Value (hex)||Description | ||
|- | |- | ||
Line 461: | Line 519: | ||
|- | |- | ||
| 176,178,17A | | 176,178,17A | ||
− | | | + | | 2 Bytes |
| Current Animation | | Current Animation | ||
+ | |} | ||
+ | ====Sonic==== | ||
+ | Length: 0x3A0 | ||
+ | {| class="prettytable" style="width:auto;" | ||
+ | !Offset (hex)||Type||Description | ||
|- | |- | ||
| 35C | | 35C | ||
Line 472: | Line 535: | ||
| Homing Range Timer | | Homing Range Timer | ||
|} | |} | ||
+ | ==References== | ||
+ | <references /> | ||
+ | |||
{{SCHGuides}} | {{SCHGuides}} | ||
− |
Latest revision as of 06:55, 25 March 2020
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 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 |
---|---|---|
0174AFDB | Byte | Minutes on clock |
0174AFDC | Byte | Seconds on clock |
0174AFDE | Byte | 2P Mode
|
0174AFDF | Byte | 2P Level Category
|
0174AFED | Array of Bytes (3 bytes) | P1 2P Special Moves |
0174AFF0 | Array of Bytes (3 bytes) | P2 2P Special Moves |
0174AFF7 | Byte | Time Stop Activator
|
0174AFF8 | Byte | Sunglasses/Treasure Scope |
0174AFFE | Byte | Controls Active |
0174B004 | Byte | Chao Key collected |
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
|
01934BE0 | Byte | Menu Mode (some level swaps horribly crash)
|
01934BE4 | Byte | P2 Character
|
01A5A678,01A5A67C | Byte | Cannon's Core Freeze Duration |
01D7BB10 | 4 Bytes | Current Menu
|
01D7BB14 | 4 Bytes | Current Menu State |
01D9442C | 2 Bytes | Kart Race Time |
01D96F48 | Byte | Have Boost (Route 101/280) |
01DE4664 | Byte | P1 Lighting (0 through 255) |
01DE94A0 | Float | X Gravity |
01DE94A4 | Float | Y Gravity |
01DE94A8 | Float | Z Gravity |
01DEC628 | 4 Bytes | Emblem Results Time (Stops increasing after collecting 180 emblems) |
01DEC62C | 4 Bytes | Play Time |
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
| |||||||||
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
Common Values
Offset (hex) | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | Byte | Player Number | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | Byte | Character ID
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3 | Byte | Character ID 2
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 | Array of Bytes (8 bytes) | Items in Action Window | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
C | Byte | Number of Items in Action Window | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10 | 2 Bytes | Powerups Bitfield
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
12 | Byte | Hang Time | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
24 | 4 Bytes | Upgrades Bitfield
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
174 | Byte | Animation Frames | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
176,178,17A | 2 Bytes | Current Animation |
Sonic
Length: 0x3A0
Offset (hex) | Type | Description |
---|---|---|
35C | Byte | Homing Attack Timer |
364 | Byte | Homing Range Timer |
References