Skip to content

Commit

Permalink
Use bytes found in the executable instead of from Ghidra (it flips th…
Browse files Browse the repository at this point in the history
…e byte order)
  • Loading branch information
DexrnZacAttack committed Jan 3, 2025
1 parent 5b59768 commit 20189c8
Showing 1 changed file with 31 additions and 24 deletions.
55 changes: 31 additions & 24 deletions LCE/Basic Info.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,42 @@
| Xbox One, PS Vita, Switch, PS4, 3DS, Windows, "NONE" | Little |

### LCE compression
| Platform | SAVEGAME | REGION | CHUNK/GRF |
|----------|---------------------------------------------------------------------|-----------------------|----------------------------------------------------------------|
| Switch | Zlib | Split Save RLE/None | Zlib (+ RLE) |
| PS4 | Zlib | Split Save RLE/None | Zlib (+ RLE?) <!-- rle unconfirmed but likely. --> |
| Xbox One | Zlib | Split Save RLE/None | Zlib (+ RLE?) <!-- rle unconfirmed but likely. --> |
| Xbox 360 | XMemcompress/LZX | None | XMemcompress/LZX (+ RLE) |
| PS3 | [Deflate(Algorithm)](https://en.wikipedia.org/wiki/Deflate) or None | None | Deflate(Algorithm) (+ RLE) |
| Wii U | Zlib | None | Zlib (+ RLE) |
| PS Vita | Vita RLE | None | Zlib (+ RLE) |
| 3DS | Zlib | None | Zlib (no RLE) |
| Windows | Unknown | Unknown | Unknown <!-- apparently this exists, source: ESavePlatform --> |
| Platform | SAVEGAME | REGION | CHUNK/GRF |
|----------|---------------------------------------------------------------------|-----------------------|----------------------------------------------------|
| Switch | Zlib | Split Save RLE/None | Zlib (+ RLE) |
| PS4 | Zlib | Split Save RLE/None | Zlib (+ RLE?) <!-- rle unconfirmed but likely. --> |
| Xbox One | Zlib | Split Save RLE/None | Zlib (+ RLE?) <!-- rle unconfirmed but likely. --> |
| Xbox 360 | XMemcompress/LZX | None | XMemcompress/LZX (+ RLE) |
| PS3 | [Deflate(Algorithm)](https://en.wikipedia.org/wiki/Deflate) or None | None | Deflate(Algorithm) (+ RLE) |
| Wii U | Zlib | None | Zlib (+ RLE) |
| PS Vita | Vita RLE | None | Zlib (+ RLE) |
| 3DS | Zlib | None | Zlib (no RLE) |
| Windows | Unknown | Unknown | Unknown |

> [!NOTE]
> Xbox One may be inaccurate. - DexrnZacAttack
> 3DS is not LCE so documentation will be off for it. - Cracko298
### ESavePlatform
Enum type (assumed by the name starting with E) that exists in Wii U Edition, which seems to hold all the platforms that LCE was compiled for.
Various checks for a value inside this enum tells us a few things, namely support for certain features. (such as Split Saves)

It seems these values got inlined by the compiler, so the enum has to be reconstructed manually.

| Assumed Name | Value | As String | As String (reversed) |
|------------------|------------|-----------|----------------------|
| Xbox 360 | 0x30363358 | 063X | X360 |
| Xbox One | 0x5f314258 | _1BX | XB1_ |
| PlayStation 3 | 0x5f335350 | _3SP | PS3_ |
| PlayStation 4 | 0x5f345350 | _4SP | PS4_ |
| PlayStation Vita | 0x5f565350 | _VSP | PSV_ |
| Wii U | 0x55494957 | UIIW | WIIU |
| Nintendo Switch | 0x584e584e | XNXN | NXNX |
| Windows | 0x5f4e4957 | _NIW | WIN_ |
| None | 0x454e4f4e | ENON | NONE |
| Assumed Name | Value | As String |
|------------------|------------|-----------|
| Xbox 360 | 0x58333630 | X360 |
| Xbox One | 0x5842315f | XB1_ |
| PlayStation 3 | 0x5053335f | PS3_ |
| PlayStation 4 | 0x5053345f | PS4_ |
| PlayStation Vita | 0x5053565f | PSV_ |
| Wii U | 0x57494955 | WIIU |
| Nintendo Switch | 0x4e584e58 | NXNX |
| Windows | 0x57494e5f | WIN_ |
| None | 0x4e4f4e45 | NONE |

<!-- Ghidra flips the bytes bruhhhhhhhhhhh -->

#### note: Xbox One may be inaccurate. -Dexrn
### note: 3DS is not LCE so documentation will be off for it. -Cracko298
> [!NOTE]
> Almost all values were found in the Wii U Edition executable.
> None was only found on Xbox One Edition, it may or may not exist in others. - DexrnZacAttack

0 comments on commit 20189c8

Please sign in to comment.