decomp
This commit is contained in:
parent
1b70294ef7
commit
ec236a2430
27 changed files with 3796 additions and 4 deletions
124
docs/SOTE/cheats-and-debug.md
Normal file
124
docs/SOTE/cheats-and-debug.md
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
# Shadows of the Empire: PC Cheats and Debug Menu
|
||||
|
||||
## Summary
|
||||
|
||||
Static analysis of the PC game executable confirms four embedded gameplay-secret instructions, several pilot-name hooks, and a functional hidden debug menu. The debug menu has a PC keyboard activation path; do not assume the N64 pause-screen sequence works on PC. The player-facing secrets overlap substantially with documented N64 unlocks, but that does not establish that every N64 input sequence or prerequisite is identical on PC.
|
||||
|
||||
## Scope and Method
|
||||
|
||||
- Target: `Sdata/Shadows.exe`, PE32 x86, SHA-256 `bb63e515b39467947adad5e7c94fce1b0d00f0a815ca5f8cd24d67b373b46175`.
|
||||
- Launcher: `SOTE.EXE`, SHA-256 `be596ee755afbd4f3a50de366a07866d8dfed032f3341b63f539e5f93773ff77`. Its WinMain path delegates to MFC startup; it is not the gameplay executable analyzed here.
|
||||
- Analysis: REA with Ghidra 12.1.4; static inspection plus the user's runtime confirmation that the debug menu appears only while the game is paused and the pause menu is visible. The agent did not launch either executable. Ghidra's imported program was ephemeral; no executable bytes or saved project data were changed.
|
||||
- Addresses below are virtual addresses in `Shadows.exe`.
|
||||
|
||||
## PC Findings
|
||||
|
||||
### Embedded Gameplay Secrets
|
||||
|
||||
The binary contains four secret-instruction strings in the `0x4c6c60`-`0x4c6d70` range. Their instructions describe these actions:
|
||||
|
||||
| Address | Instruction described | Reported effect / comparison |
|
||||
| --- | --- | --- |
|
||||
| `0x4c6c60` | Hold the camera button for five seconds while on foot. | Leebo scanner / overhead view. The N64 guides report this as the Leebo Scanner unlock. |
|
||||
| `0x4c6cb8` | Hold the camera button for five seconds during the Skyhook sequence. | Change ship, cycling through the X-Wing and TIE fighter. N64 guides report this unlock on Skyhook. |
|
||||
| `0x4c6d18` | Hold crouch for fifteen seconds while on foot. | Invincibility and weapon/ammo replenishment. N64 guides report this on-foot secret on Hard. |
|
||||
| `0x4c6d70` | Complete the Jedi-difficulty condition for friendly Wampas. | Matches the N64 friendly-Wampa reward at a high level; the N64 guide describes collecting all challenge points on Jedi, so the exact PC prerequisite should be verified in-game. |
|
||||
|
||||
These are confirmed as embedded PC instructions, not as runtime-tested behavior. Unlock prerequisites mentioned in the comparison column come from N64 documentation and may differ by platform or build.
|
||||
|
||||
### Pilot-Name Hooks
|
||||
|
||||
The profile-name checker at `FUN_0040d0c0` compares the current pilot name character by character against strings in the executable. The strings include:
|
||||
|
||||
| Address | Embedded name | Finding |
|
||||
| --- | --- | --- |
|
||||
| `0x4cae14` | `R Testers ROCK` | The checker accepts this name. PC references describe it as granting access to all levels; the same accepted name also passes the debug-menu eligibility check described below. |
|
||||
| `0x4cadf0` | ` Wampa Stompa` | Exact spacing, including the leading space and two spaces between the words, is present in the checker. Its flag is consumed elsewhere in gameplay; N64 references associate the similarly spaced name with enemy-control cheats. The precise PC effects were not fully traced. |
|
||||
| `0x4cade0` | ` WIPE ALL DATA` | The checker invokes a cleanup routine for this name. Treat it as destructive: do not enter it on a profile containing data you want to keep. |
|
||||
|
||||
The leading spaces shown above are part of the embedded strings. External guides use underscores to represent spaces in pilot names.
|
||||
|
||||
### Hidden Debug Menu
|
||||
|
||||
- **Dispatcher gates:** `FUN_00491f10` first checks `DAT_0073e668`. If it is already set, the routine calls `FUN_00492770` and returns; otherwise it calls `FUN_00493150` only when `FUN_00410be0()` returns `1` and `DAT_006ef1a8` is `0`. `FUN_00410be0()` is just a getter for `DAT_004caf40`; `FUN_0041088c` changes that global, but its deeper runtime meaning is not established. Modes other than `0` go through other input paths. **Runtime confirmation from the user:** the game must be paused with the pause menu visible for F12 to open the debug menu. The static global checks do not, by themselves, reveal that pause-menu requirement.
|
||||
- **Keyboard polling:** `FUN_0041d280` initializes the input-slot table, including slot `0x58`. `FUN_0041dfa0` scans populated input slots from `0` through `0x283` and returns the first currently pressed input via `FUN_004a95e0`. That helper returns no input when `DAT_00760e54` is `0`; this is a necessary input-ready gate, although the exact conditions that set it are not established here. The scan can also report another held key or controller input before it reaches F12.
|
||||
- **Press and release:** `FUN_00493150` skips the scan on certain competing input-transition/release paths (`FUN_0041ef30` / `FUN_0041eec0`). Otherwise, it stores the detected code in `DAT_0073e6fc` while an input is down. It dispatches the stored code only on a later poll that finds no input down, then clears the latch. The `0x58` case is the F12 path; holding F12 alone is not enough. The slot is present in the initialized input table, so no separate F12 key-binding requirement was found.
|
||||
- **Profile eligibility:** the F12 case calls `FUN_0040d0c0`, which compares the current in-memory pilot-name buffer at `DAT_008d6348` against `R Testers ROCK`. That exact, case- and space-sensitive name returns true unconditionally. Other names depend on `DAT_004cada0`. The profile file containing the string is not proof that this is the name currently loaded in memory.
|
||||
- **Activation result:** a successful check sets `DAT_0073e668`. On the next update, `FUN_00491f10` routes directly to `FUN_00492770`, before the ordinary input-mode checks. No additional campaign-completion, difficulty, or multi-key condition appears in this F12 path. Once active, F12 is no longer processed by `FUN_00493150`; use the menu's directional and confirm inputs instead.
|
||||
- **What is drawn:** `FUN_00426440` is the relevant display path. With the menu active it calls `FUN_0042b870`, formats the current selection as `~c~o%s`, and passes that text to `FUN_00427ae0`. The menu-specific text is one styled selection label, not a 20-row list or an explicit “F12 accepted” message. The selection index `DAT_0073e670` starts at `0` in the image, so the initial label should be **Get all stuff**. Static analysis establishes the text path, not its exact screen position or how noticeable it is at runtime.
|
||||
- **Menu navigation:** `FUN_00492770` wraps the selection over indices `0` to `19`. Its input masks decrement on `0x10500`, increment on `0x20200`, and confirm on `0x3800`. `FUN_0041c900` maps the executable's default keyboard bindings into the states consumed by those masks: Left Arrow or numpad 4 decrements; Right Arrow or numpad 6 increments. D and Space also feed the decrement group, and A feeds the increment group. Enter and numpad Enter confirm, but the same confirm mask also includes Escape, F1, X, and Z. Thus Escape is not a cancel/back command here: it confirms and executes the currently highlighted option. Confirmation clears `DAT_0073e668`; user-configured bindings may alter these defaults.
|
||||
- **Live adjustment input:** menu entries read a signed input axis (`DAT_008a5c64`), not the menu's Left/Right selection masks. The input update routine builds this value from configured control slots and has a keyboard fallback, but the default key mapping for that fallback has not been identified. The user's runtime test found that Up/Down did not change the selected values, so do not assume those keys work. A configured controller axis may supply the value directly. Changes are applied continuously when the axis magnitude exceeds a dead zone; live entries do not require Enter.
|
||||
|
||||
The table describes all 20 menu entries. `Enter` means the command is dispatched by the confirm input; `Input axis, live` means the highlighted value consumes the signed adjustment axis. Numeric ranges are the code's clamps, not recommendations.
|
||||
|
||||
| Index | Display label | Input | Command/effect |
|
||||
| --- | --- | --- | --- |
|
||||
| 0 | Get all stuff | Enter | Runs the inventory/resource grant helpers and sets a related counter to 1000; the exact resource represented by that counter was not identified. |
|
||||
| 1 | Invincibility | Enter | Toggles the invincibility state. |
|
||||
| 2 | Debug Display | Enter | Toggles the debug-display mode. |
|
||||
| 3 | 50 Lives | Enter | Sets the lives counter to 50. |
|
||||
| 4 | Villains aren't sleepy | Input axis, live | Changes the villain behavior's 0/1 state. The default keyboard binding is unresolved. |
|
||||
| 5 | Kill Dash | Enter | Runs the labeled Dash kill action through entity/action helpers. |
|
||||
| 6 | Teleport | Enter | Runs teleport helpers for available actor/vehicle candidates; exact target and destination were not resolved. |
|
||||
| 7 | Next Level | Enter | Calls the shared level-change handler for the next-level entry. |
|
||||
| 8 | This Level | Enter | Calls the shared level-change handler for the current-level entry. |
|
||||
| 9 | Prev Level | Enter | Calls the shared level-change handler for the previous-level entry. |
|
||||
| 10 | Wall Ghost OFF (dynamic) | Input axis, live | Changes the wall-ghost 0/1 state; the displayed label reflects its current state. The default keyboard binding is unresolved. |
|
||||
| 11 | Fog ON (dynamic) | Input axis, live | Changes the fog 0/1 state; the displayed label reflects its current state. The default keyboard binding is unresolved. |
|
||||
| 12 | vertFOV: xxxxxxxx | Input axis, live | Adjusts vertical field of view, clamped to 4-120 degrees. |
|
||||
| 13 | aspect: xxxxxxxx | Input axis, live | Adjusts aspect ratio, clamped to 0.1-10.0. |
|
||||
| 14 | Fog Max xxxxxxxx | Input axis, live | Adjusts fog maximum, clamped to 10-999. |
|
||||
| 15 | Fog Thick xxxxxxxx | Input axis, live | Adjusts fog thickness, clamped to 10-996. |
|
||||
| 16 | Fog Red xxxxxxxx | Input axis, live | Adjusts the red fog/light component, clamped to 0-255. |
|
||||
| 17 | Fog Green xxxxxxxx | Input axis, live | Adjusts the green fog/light component, clamped to 0-255. |
|
||||
| 18 | Fog Blue xxxxxxxx | Input axis, live | Adjusts the blue fog/light component, clamped to 0-255. |
|
||||
| 19 | Revert Fog and Lights | Enter | Resets vertical FOV to 67.5 and aspect ratio to 4:3, and clears the view override. The full fog/light reset effect was not separately resolved. |
|
||||
|
||||
Confirming a command closes the debug overlay after dispatch. Invincibility and Debug Display are confirm-based toggles; entries described as live consume the signed input axis. The default keyboard control for that axis remains unresolved, and the user's test found that Up/Down did not change the values. Avoid Escape unless you intend to execute the highlighted command; it shares the confirm mask rather than cancelling.
|
||||
|
||||
**Practical use:** pause the game and leave the pause menu visible, then press and release F12. The debug menu appears as one selected label, initially `Get all stuff`. Use Left/Right (or numpad 4/6) to cycle entries. Live value adjustment requires the signed input axis; its default keyboard binding is not yet established, and Up/Down did not work in the user's test. If a controller is configured, try its vertical axis while a live entry is selected. If F12 fails in the required pause state, check that the live pilot-name buffer is exactly `R Testers ROCK`, `DAT_004caf40` is `1`, the input mode is `0`, and the keyboard input-ready flag is nonzero. The meanings/runtime values of those flags were not observed.
|
||||
|
||||
The N64 GameFAQs debug-mode report instead describes a pilot name rendered `.Wampa..Stompa`, followed by a pause-screen button and analog-stick sequence. That sequence is not the PC activation path observed in this executable. IGN's PC cheats page does not document that N64 debug sequence.
|
||||
|
||||
### Enemy-Control Carryover
|
||||
|
||||
**Conclusion: enemy control survived at least in part on PC.** The clearest directly documented PC example is the Battle of Hoth AT-ST: IGN and GameFAQs report holding numpad `4+6+8` for about five seconds, then pressing `Tab` to cycle views until the AT-ST view appears. This is distinct from the N64 D-pad/C-Right sequence.
|
||||
|
||||
The PC executable also contains internal evidence for a broader Wampa-related actor/control mode:
|
||||
|
||||
- `FUN_0040d0c0` recognizes the exact pilot string ` Wampa Stompa` and sets `DAT_004cad98`.
|
||||
- The gameplay input/state routine `FUN_00471e90` checks that flag before enabling a second, level-mapped control chord; the chord tables are indexed by the current level/state. This sets the separate state `DAT_004caad8`.
|
||||
- `FUN_00497680` is a stateful input-sequence handler with multiple branches that set the Wampa flag. One branch also dispatches four-byte identifiers through `FUN_00410cf0`; their exact game-level meaning was not resolved, so they are not treated as proof of a specific enemy spawn.
|
||||
- `DAT_004caad8` is consumed by actor/update and rendering routines, including `FUN_0040a960` and `FUN_0040c060`; the latter changes the render scale under the special state. Other event paths also test it. This is consistent with a gameplay actor/control mode, not just an unused profile string, but static evidence does not identify every resulting player action.
|
||||
|
||||
The N64 guide describes the related ` Wampa Stompa` name as unlocking control of a Wampa, Snowtrooper, AT-ST, or Xizor guard using D-pad/C-Right inputs. The shared profile-name hook and PC control-state paths make it likely that some of this system carried over. The PC references directly confirm only the AT-ST method; they do not establish that the N64 enemy roster, capture sequence, or movement/attack controls work unchanged on PC.
|
||||
|
||||
## N64 Carryover Comparison
|
||||
|
||||
The PC binary's four embedded secret instructions closely match the following N64 guide entries:
|
||||
|
||||
- Camera hold for the Leebo Scanner.
|
||||
- Camera hold during the Skyhook battle to switch to X-Wing/TIE.
|
||||
- Crouch hold for invincibility and ammunition.
|
||||
- Friendly Wampas on Jedi difficulty.
|
||||
|
||||
The shared effects are strong evidence of gameplay-secret carryover. The PC strings themselves are direct evidence for the PC build; challenge-point requirements and exact controls in the external guides are N64-only evidence unless independently confirmed above.
|
||||
|
||||
Name-based behavior also overlaps: the PC binary contains `R Testers ROCK` and ` Wampa Stompa`, while N64 guides report `R_Testers_ROCK` and `_Wampa__Stompa` (underscores denote spaces). A matching name string alone does not prove identical effects.
|
||||
|
||||
## Evidence and Confidence
|
||||
|
||||
- **High, binary-observed:** target identity and hashes; secret string locations and described actions; profile-name strings and exact spacing; the F12 polling/latch/eligibility path; dispatcher gates; default navigation and confirm binding groups; all 20 menu labels and their selection indices; the single-label rendering path.
|
||||
- **Runtime-confirmed by the user:** the game must be paused with the pause menu visible for the debug menu to open, and its labels appear. Up/Down did not change the selected live values.
|
||||
- **Medium, external comparison:** exact gameplay effects and unlock prerequisites, because the pages below document N64 behavior and PC entries but are user-contributed guides, not tests of this specific executable.
|
||||
- **Unresolved:** the default keyboard binding for the live adjustment axis; the source of `DAT_004cada0`; the runtime meanings and values of `DAT_004caf40`, `DAT_006ef1a8`, and `DAT_00760e54`; the exact on-screen position of the menu label; whether all four secrets trigger under precisely the same requirements as N64; compatibility across PC releases.
|
||||
|
||||
The user confirmed F12 activation and label visibility at runtime. The agent did not independently test the keyboard navigation/confirmation, destructive pilot name, or full effects of `Wampa Stompa`.
|
||||
|
||||
## External References
|
||||
|
||||
- [IGN: PC Cheats](https://www.ign.com/wikis/star-wars-shadows-of-the-empire/PC_Cheats)
|
||||
- [IGN: N64 Cheats](https://www.ign.com/wikis/star-wars-shadows-of-the-empire/N64_Cheats)
|
||||
- [GameFAQs: N64 Cheats](https://gamefaqs.gamespot.com/n64/198789-star-wars-shadows-of-the-empire/cheats)
|
||||
|
||||
The GameFAQs debug-mode entry and other submitted codes should be treated as reported community instructions, not independently verified behavior.
|
||||
Loading…
Add table
Add a link
Reference in a new issue