Difference between revisions of "Shippu Mahou Daisakusen/Reverse engineering notes"
(Initial draft) |
(Moved tables of values to the Racing subpage, just leaving the RE details here) |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
TODO: clean up addresses below pointing directly to bytes when code is operating on them as words. e.g., P1 lives @ 100555.b is probably referenced in the code as 100554.w | TODO: clean up addresses below pointing directly to bytes when code is operating on them as words. e.g., P1 lives @ 100555.b is probably referenced in the code as 100554.w | ||
| − | 1006C6 - seems to consistently hold boss HP value when one is on screen | + | * 1006C6 - seems to consistently hold boss HP value when one is on screen |
| − | 1006AA - base address of the boss enemy object | + | * 1006AA - base address of the boss enemy object |
| − | object+$04 - animation frame | + | * object+$04 - animation frame |
| − | object+$06 - animation related flags (sprite rotation, hit flash and/or palette?, etc.) | + | * object+$06 - animation related flags (sprite rotation, hit flash and/or palette?, etc.) |
| − | object+$08 - y-coord | + | * object+$08 - y-coord |
| − | object+$0A - x-coord | + | * object+$0A - x-coord |
| − | object+$1C - HP value for enemies. Damage value for projectiles/player, to apply against target enemy up to their specified durability cap | + | * object+$1C - HP value for enemies. Damage value for projectiles/player, to apply against target enemy up to their specified durability cap |
| − | object+$36 - i-frames | + | * object+$36 - i-frames |
| − | Code @ 13D78 - damage calculation for durable enemies | + | * Code @ 13D78 - damage calculation for durable enemies |
| − | Code @ 13F6A - damage calculation for zakos (uncapped) | + | * Code @ 13F6A - damage calculation for zakos (uncapped) |
| − | 100551 - current play state? | + | * 100551 - current play state? |
| − | 100553 - current play flags? | + | * 100553 - current play flags? |
| − | 100555 - current P1 lives | + | * 100555 - current P1 lives |
| − | + | * 10055c - current P1 character | |
| − | |||
| − | |||
| − | |||
| − | + | 10055c character values: | |
| − | + | {| class="wikitable" | |
| − | + | |- | |
| + | ! Gain !! Chitta !! Miyamoto !! Bornnam !! Nirvana !! Kickle & Laycle !! Honest John !! Bul-Gin | ||
| + | |- | ||
| + | | 0|| 1 || 2 || 3 || 4 || 5 || 6 || 7 | ||
| + | |} | ||
| − | + | * 10058C = current calculated rank | |
| − | + | * 10058E = base rank for current stage | |
| + | * 100590 = survival rank (resets on stage start or player death) | ||
| + | * 1006A4 = survival rank increment timer (does not reset on stage start) | ||
| − | + | * 102C4A + $44 (102C8E) = maximum unboosted speed | |
| − | + | * 102C4A + $46 (102C90) = minimum unboosted speed | |
| − | + | * 102C4A + $22 (102C6C) = current speed | |
| − | 100656 - table of P1 track times | + | * 1012DE = P1 main shot power |
| − | 10066E - table of track selections | + | * 1012D6 = P1 bomb count |
| + | * 1012DA = P1 sub-weapon type | ||
| + | * 1012D8 = P1 sub-weapon power | ||
| + | |||
| + | * 1005B1 - current stage | ||
| + | * 1005B3 - current track | ||
| + | * 1005B5 - current loop (0 = first, 1 = second) | ||
| + | |||
| + | * 100656 - table of P1 track times | ||
| + | * 10066E - table of track selections | ||
| + | |||
| + | == Speed and Boost Mechanics == | ||
| + | |||
| + | This section describes how the details in [[Shippu_Mahou_Daisakusen/Racing#Technical_details]] were found. | ||
| + | |||
| + | Minimum and maximum speed values for each track can be confirmed by watching the addresses 102C8E (max) and 102C90 (min) while playing through the game. | ||
| + | |||
| + | For boost mechanics, the relevant routines are at 7AD6 and 174D0. The routine at 7AD6 reads from a table stored at 718C2, which contains the base boost speed values for each character and stage. The routine at 174D0 applies the main shot power bonus and the bomb count modifier, using tables stored at 17568 (shot power bonus) and 175AE (bomb count modifier). | ||
| + | |||
| + | Note: Routine 174D0 also seems to do some stuff related to subweapons (probably damage calculations?) and there's a big table of subweapon-related values at 1756E. | ||
Latest revision as of 14:18, 3 April 2026
TODO: clean up addresses below pointing directly to bytes when code is operating on them as words. e.g., P1 lives @ 100555.b is probably referenced in the code as 100554.w
- 1006C6 - seems to consistently hold boss HP value when one is on screen
- 1006AA - base address of the boss enemy object
- object+$04 - animation frame
- object+$06 - animation related flags (sprite rotation, hit flash and/or palette?, etc.)
- object+$08 - y-coord
- object+$0A - x-coord
- object+$1C - HP value for enemies. Damage value for projectiles/player, to apply against target enemy up to their specified durability cap
- object+$36 - i-frames
- Code @ 13D78 - damage calculation for durable enemies
- Code @ 13F6A - damage calculation for zakos (uncapped)
- 100551 - current play state?
- 100553 - current play flags?
- 100555 - current P1 lives
- 10055c - current P1 character
10055c character values:
| Gain | Chitta | Miyamoto | Bornnam | Nirvana | Kickle & Laycle | Honest John | Bul-Gin |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
- 10058C = current calculated rank
- 10058E = base rank for current stage
- 100590 = survival rank (resets on stage start or player death)
- 1006A4 = survival rank increment timer (does not reset on stage start)
- 102C4A + $44 (102C8E) = maximum unboosted speed
- 102C4A + $46 (102C90) = minimum unboosted speed
- 102C4A + $22 (102C6C) = current speed
- 1012DE = P1 main shot power
- 1012D6 = P1 bomb count
- 1012DA = P1 sub-weapon type
- 1012D8 = P1 sub-weapon power
- 1005B1 - current stage
- 1005B3 - current track
- 1005B5 - current loop (0 = first, 1 = second)
- 100656 - table of P1 track times
- 10066E - table of track selections
Speed and Boost Mechanics
This section describes how the details in Shippu_Mahou_Daisakusen/Racing#Technical_details were found.
Minimum and maximum speed values for each track can be confirmed by watching the addresses 102C8E (max) and 102C90 (min) while playing through the game.
For boost mechanics, the relevant routines are at 7AD6 and 174D0. The routine at 7AD6 reads from a table stored at 718C2, which contains the base boost speed values for each character and stage. The routine at 174D0 applies the main shot power bonus and the bomb count modifier, using tables stored at 17568 (shot power bonus) and 175AE (bomb count modifier).
Note: Routine 174D0 also seems to do some stuff related to subweapons (probably damage calculations?) and there's a big table of subweapon-related values at 1756E.