Difference between revisions of "Sonic Adventure DX: PC/RAM Editing"
From Sonic Retro
MainMemory (talk | contribs) m (→Main Locations) |
MainMemory (talk | contribs) (→Global Variables) |
||
Line 291: | Line 291: | ||
| Health in Sky Chase | | Health in Sky Chase | ||
Max 5, decreases by .5 when hit. | Max 5, decreases by .5 when hit. | ||
+ | |} | ||
+ | |||
+ | ===Emblems=== | ||
+ | One bit for each emblem, starting at 03B2B5F0. | ||
+ | {| class="prettytable" | ||
+ | !Offset||Bit||Description | ||
+ | |- | ||
+ | | 0 | ||
+ | | 0 | ||
+ | | Emerald Coast Level C as Sonic | ||
+ | |- | ||
+ | | 0 | ||
+ | | 1 | ||
+ | | Windy Valley Level C as Sonic | ||
+ | |- | ||
+ | | 0 | ||
+ | | 2 | ||
+ | | Twinkle Park Level C as Sonic | ||
+ | |- | ||
+ | | 0 | ||
+ | | 3 | ||
+ | | Speed Highway Level C as Sonic | ||
+ | |- | ||
+ | | 0 | ||
+ | | 4 | ||
+ | | Red Mountain Level C as Sonic | ||
+ | |- | ||
+ | | 0 | ||
+ | | 5 | ||
+ | | Sky Deck Level C as Sonic | ||
+ | |- | ||
+ | | 0 | ||
+ | | 6 | ||
+ | | Lost World Level C as Sonic | ||
+ | |- | ||
+ | | 0 | ||
+ | | 7 | ||
+ | | Ice Cap Level C as Sonic | ||
|} | |} | ||
Revision as of 12:55, 26 October 2009
Note: All values are signed.
Global Variables
Main Locations
Address (hex) | Type | Description |
---|---|---|
0091268C | 4 Bytes | Music Toggle |
00912698 | 4 Bytes | Currently playing music |
0091269C | 4 Bytes | Music Copy |
03B0EF34 | Byte | Lives |
03B0EF35 | Byte | Time in frames. Max 60. |
03B0EF38 | Byte | Voice Language
|
03B0EF40 | Byte | Setting this to -1 will hide the HUD. However, it is constantly being written to by code at 00413D9E. It will have no effect unless you disable that code. |
03B0EF48 | Byte | Time in minutes |
03B0F0E4 | 2 Bytes | Rings. Allowing this to reach a negative value (over 32767) will crash the game. |
03B0F0E8 | Byte | Text Language
|
03B0F0EC | Byte | Debug. Setting this to a non-negative value displays collision spheres around both characters when on the ground and highlights bottomless pits in white. |
03B0F0F8 | Float | X Gravity |
03B0F0FC | Float | Y Gravity |
03B0F100 | Float | Z Gravity |
03B0F104 | 4 Bytes | Enemy Bonus |
03B0F104 | 4 Bytes | Level Frame Counter |
03B0F128 | Byte | Time in seconds. |
03B0F13C | 4 Bytes | Frame Counter |
Save Data | ||
03B18849 | Byte | Sonic Unlocked |
03B1884A | Byte | Tails Unlocked |
03B1884B | Byte | Knuckles Unlocked |
03B1884C | Byte | Amy Unlocked |
03B1884D | Byte | Gamma Unlocked |
03B1884E | Byte | Big Unlocked |
03B1884F | Byte | Super Sonic Unlocked |
03B18895 | Byte | Light Speed Shoes obtained |
03B18896 | Byte | Crystal Ring obtained |
03B188D5 | Byte | Jet Anklet obtained |
End Save Data | ||
03B18DB5 | Byte | Metal Sonic. Set this to 1 to replace Sonic with Metal Sonic. May crash if you set this during a level. |
03B18DB8 | Byte | Selection on Pause Menu
|
03B22DC0 | Byte | Current Character
|
03B22DC4 | Byte | Level Copy. Doesn't appear to do anything. |
03B22DC8 | Byte | Entrance Number. Only applies to Adventure Fields. |
03B22DCC | Byte | Current Level |
03B22DD0 | 4 Bytes | Set this to any non-zero value to speed up level transitions. |
03B22DD4 | Byte | Adventure Field Act |
03B22DD8 | Byte | Adventure Field Level |
03B22DE4 | Byte | Game Status. (Bad Textures) means that the level will load incorrect textures. This has no effect on the menu.
|
03B22DEC | Byte | Current Act |
03B22DF0 | Byte | Next Level. Change this while the screen is fading out. |
03B22E18 | Byte | Next Act. Change this while the screen is fading out. |
03B29D08 | 2 Bytes | Debug. Setting this to 1 displays collision spheres around objects and activates free movement mode. (Except for Tails.) |
03B2A2F2 | Byte | Menu voice
|
03B2A2FD | Byte | Selected character in character select
|
03B2B690 | Byte | Sonic Adventure Time of Day |
03B2B6C0 | Byte | Super Sonic Adventure Time of Day |
03B2B6C6 | Byte | Super Sonic Adventure Start Entrance |
03B2B6C8 | Byte | Super Sonic Adventure Start Act |
03B2B6C9 | Byte | Super Sonic Adventure Start Level |
03B2C3FC | 4 Bytes | Rings in Black Market |
03B42F8C | Float | Restart X Position |
03B42F90 | Float | Restart Y Position |
03B42F94 | Float | Restart Z Position |
03C74880 | 4 Bytes | Rings in vault in Casinopolis |
03C82304 | Float | Health in Sky Chase
Max 5, decreases by .5 when hit. |
Emblems
One bit for each emblem, starting at 03B2B5F0.
Offset | Bit | Description |
---|---|---|
0 | 0 | Emerald Coast Level C as Sonic |
0 | 1 | Windy Valley Level C as Sonic |
0 | 2 | Twinkle Park Level C as Sonic |
0 | 3 | Speed Highway Level C as Sonic |
0 | 4 | Red Mountain Level C as Sonic |
0 | 5 | Sky Deck Level C as Sonic |
0 | 6 | Lost World Level C as Sonic |
0 | 7 | Ice Cap Level C as Sonic |
Chao Data
These only work while you are in a garden. They are $800 bytes long, starting at 03C8888A. Thanks to GerbilSoft for his memory editor and Artichao for the Chao Genome
Offset | Type | Description |
---|---|---|
0 | String (7 bytes) | Name. Format unknown. |
E | Byte | Swim Fraction |
F | Byte | Fly Fraction |
10 | Byte | Run Fraction |
11 | Byte | Power Fraction |
12 | Byte | Stamina Fraction |
16 | Byte | Swim Grade |
17 | Byte | Fly Grade |
18 | Byte | Run Grade |
19 | Byte | Power Grade |
1A | Byte | Stamina Grade |
1E | Byte | Swim Level |
1F | Byte | Fly Level |
20 | Byte | Run Level |
21 | Byte | Power Level |
22 | Byte | Stamina Level |
26 | 2 Bytes | Swim Stat |
28 | 2 Bytes | Fly Stat |
2A | 2 Bytes | Run Stat |
2C | 2 Bytes | Power Stat |
2E | 2 Bytes | Stamina Stat |
6E | Byte | Type
|
6F | Byte | Chao Garden
|
BF | Byte | Eye Type |
C0 | Byte | Mouth Type |
C1 | Byte | Ball Type
|
C3 | Byte | Headgear
|
C4 | Byte | Feet Toggle (0=On,1=Off) |
C5 | Byte | Medal
|
C6 | Byte | Color
|
C7 | Byte | Highlights (0=On, 1=Off) |
C8 | Byte | Texture (Overrides color values)
|
C9 | Byte | Shiny (0=No, 1=Yes) |
11D | Byte | Happiness (-100 to 100) |
4D2 | Byte | Arm Type
|
4D3 | Byte | Ear Type |
4D4 | Byte | Eyebrow Type |
4D5 | Byte | Forehead Type |
4D6 | Byte | Leg Type |
4D7 | Byte | Tail Type |
4D8 | Byte | Wing Type |
Animation Data
These control the model used as well.
Locations
Address | Character |
---|---|
03C49D90 | Tails |
03C532A0 | Knuckles |
03C53FA8 | Gamma |
03C54880 | Amy |
03C556A0 | Big |
03C56210 | Sonic |
Format
Each entry is $10 bytes long and is sorted by Animation number.
Offset | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 4 Bytes | Pointer to animation in CHRMODELS.DLL | ||||||||||||||||||||||||||||
4 | Byte | Unknown. Don't change this. | ||||||||||||||||||||||||||||
5 | Byte | Property
| ||||||||||||||||||||||||||||
6 | Byte | Next Animation | ||||||||||||||||||||||||||||
8 | Float | Transition Speed | ||||||||||||||||||||||||||||
C | Float | Animation Speed |
Pointer Area
The data here changes its location when the level is restarted. Use pointers to find them.
Character Object 1
A pointer to this data for player 1 is at 03B42E10. A pointer for player 2 is at 03B42E14. Length: $180
Offset (hex) | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | Byte | Action. Varies by character. | ||||||||||||||||||
1 | Byte | Next Action
| ||||||||||||||||||
4 | Bitfield | Status 1
| ||||||||||||||||||
5 | Bitfield | Status 2
| ||||||||||||||||||
6 | 2 Bytes | Invulnerable timer | ||||||||||||||||||
8 | Bitfield | Unknown
| ||||||||||||||||||
9 | Byte | Character properties. Set this to a character ID. | ||||||||||||||||||
10 | 4 Bytes | Pointer to path data (loop/wind) | ||||||||||||||||||
14 | 2 Bytes | X Rotation | ||||||||||||||||||
18 | 2 Bytes | Y Rotation | ||||||||||||||||||
1C | 2 Bytes | Z Rotation | ||||||||||||||||||
20 | Float | X Position | ||||||||||||||||||
24 | Float | Y Position | ||||||||||||||||||
28 | Float | Z Position | ||||||||||||||||||
2C | Float | Shield Scale/Big X Scale | ||||||||||||||||||
30 | Float | Big Y Scale | ||||||||||||||||||
34 | Float | Big Z Scale | ||||||||||||||||||
38 | 4 Bytes | Pointer 3 | ||||||||||||||||||
3C | 4 Bytes | Pointer | ||||||||||||||||||
40 | 4 Bytes | Set this to -1 and exit the level to crash the game. | ||||||||||||||||||
44 | 4 Bytes | Same as $40. | ||||||||||||||||||
48 | 4 Bytes | Pointer | ||||||||||||||||||
4C | 4 Bytes | Pointer | ||||||||||||||||||
A8 | 4 Bytes | Pointer | ||||||||||||||||||
AC | 4 Bytes | Pointer | ||||||||||||||||||
C0 | 4 Bytes | Pointer 2 | ||||||||||||||||||
C4 | Float | Something with X speed | ||||||||||||||||||
C8 | Float | Something with Y speed | ||||||||||||||||||
CC | Float | Something with Z speed | ||||||||||||||||||
D0 | Float | Something with X speed | ||||||||||||||||||
D4 | Float | Something with Y speed | ||||||||||||||||||
D8 | Float | Something with Z speed | ||||||||||||||||||
DC | 2 Bytes | X Rotation Last Time On Ground | ||||||||||||||||||
E0 | 2 Bytes | Y Rotation Last Time On Ground | ||||||||||||||||||
E4 | 2 Bytes | Z Rotation Last Time On Ground | ||||||||||||||||||
FC | Float | Physics Multiplier? | ||||||||||||||||||
100 | 4 Bytes | Pointer. Keeps changing. Sometimes 0. | ||||||||||||||||||
104 | 4 Bytes | Same as 100 | ||||||||||||||||||
108 | 4 Bytes | Pointer |
Character Object 2
A pointer to this data for player 1 is at 03B3CDF0. A pointer for player 2 is at 3B3CDF4. Another pointer is at offset $C0 in data 1.
Offset (hex) | Type | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | Float | Holding Area for Running/Spindash Speed | |||||||||||||||||||||||||||
4 | Bitfield | Upgrades 1
| |||||||||||||||||||||||||||
5 | Bitfield | Upgrades 2
| |||||||||||||||||||||||||||
6 | Bitfield | Powerups 1
| |||||||||||||||||||||||||||
7 | Bitfield | Powerups 2
| |||||||||||||||||||||||||||
C | 2 Bytes | Underwater Time. Countdown at 1068. Drown at 1831. | |||||||||||||||||||||||||||
E | 2 Bytes | Idle Time. Max 1800. | |||||||||||||||||||||||||||
38 | Float | Horizontal Speed | |||||||||||||||||||||||||||
3C | Float | Vertical Speed | |||||||||||||||||||||||||||
9C | 4 Bytes | Hang Time | |||||||||||||||||||||||||||
A0 | Float | Amount of grip on floor | |||||||||||||||||||||||||||
A4 | Float | Horizontal Speed Cap | |||||||||||||||||||||||||||
A8 | Float | Vertical Speed Cap | |||||||||||||||||||||||||||
AC | Float | Something to do with the maximum speed Sonic can accelerate to on his own? | |||||||||||||||||||||||||||
B4 | Float | Initial Jump Speed | |||||||||||||||||||||||||||
C0 | Float | Rolling Cancel Speed | |||||||||||||||||||||||||||
C4 | Float | Rolling End Speed | |||||||||||||||||||||||||||
C8 | Float | Running 1 Speed | |||||||||||||||||||||||||||
D0 | Float | Running 2 Speed | |||||||||||||||||||||||||||
D4 | Float | While holding jump, add this to speed. | |||||||||||||||||||||||||||
D8 | Float | Ground Acceleration | |||||||||||||||||||||||||||
DC | Float | Air Acceleration | |||||||||||||||||||||||||||
E0 | Float | Ground Deceleration | |||||||||||||||||||||||||||
E4 | Float | Brake Speed | |||||||||||||||||||||||||||
E8 | Float | Air Brake Speed | |||||||||||||||||||||||||||
EC | Float | Air Deceleration | |||||||||||||||||||||||||||
F0 | Float | Rolling Deceleration | |||||||||||||||||||||||||||
F4 | Float | Something Gravity Related? | |||||||||||||||||||||||||||
110 | Float | Collision Size | |||||||||||||||||||||||||||
114 | Float | Gravity | |||||||||||||||||||||||||||
11C | Float | Y Offset | |||||||||||||||||||||||||||
124 | Byte | Animation | |||||||||||||||||||||||||||
140 | 4 Bytes | Animation Address
| |||||||||||||||||||||||||||
1E4 | Bitfield | Unknown
|
Character Object 3
A pointer to this data is at offset $38 in data 1.
Offset (hex) | Type | Description |
---|---|---|
2 | 2 Bytes | Touching Object |
6 | 2 Bytes | Interact with objects |
8 | Float? ( or 4 Bytes) | 10 when standing. Changes when you move. Does nothing? |
C | 4 Bytes | Pointer |
14 | 4 Bytes | Address of touching object |
1C | 4 Bytes | Address of 2nd touching object |
24 | 4 Bytes | Probably address of 3rd touching object |
2C | 4 Bytes | Probably address of 4th touching object |
Repeat until 90 | ||
90 | Float | Something with object collision. Never read from. |
98 | Float | Something with object collision in the air. Never read from. |
9C | 4 Bytes | Pointer |
1A8 | 4 Bytes | Pointer |
1AC | 4 Bytes | Pointer |