mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-26 08:14:38 +01:00
Updated Decompiling Tips (markdown)
@@ -4,7 +4,7 @@ First, get a copy of [IDA][ida]. You can use the free version, though it will pr
|
||||
|
||||
[ida]: https://www.hex-rays.com/products/ida/
|
||||
|
||||
When you open IDA, load the openrct2.exe file from this repository. You will see a large number of instructions without any information attached, and will probably want the debugging information that people have added so far. Email [[IntelOrca]] for the latest copy of the IDC file.
|
||||
When you open IDA, load the openrct2.exe file from this repository. You will see a large number of instructions without any information attached, and will probably want the debugging information that people have added so far. Email [IntelOrca](/IntelOrca) for the latest copy of the IDC file.
|
||||
|
||||
Once you have the IDC file, load it by clicking "File -> Load Script" and loading it.
|
||||
|
||||
@@ -159,6 +159,22 @@ This stores in edx the beginning of data from a ride instance. The ride instance
|
||||
|
||||
[sv6]: https://github.com/IntelOrca/OpenRCT2/wiki/SV6-Ride-Structure
|
||||
|
||||
#### offset
|
||||
|
||||
If you see an instruction that looks like this:
|
||||
|
||||
```
|
||||
movzx ebx, offset sprites
|
||||
```
|
||||
|
||||
(where sprites is a named address in IDA, like 0x123456). This means, roughly, *add the register on the left to the value on the right, and store it in the register on the left. In this case, this would mean
|
||||
|
||||
```c
|
||||
ebx = ebx + RCT2_ADDRESS_SPRITE_LIST
|
||||
```
|
||||
|
||||
where `RCT2_ADDRESS_SPRITE_LIST` is a value like `0x123456`. In the binary, `ebx` could be any register, and `offset` can refer to any address in the code.
|
||||
|
||||
### IDA Tips
|
||||
|
||||
- Use the spacebar to shuffle between the graphical layout and the line-by-line instructions.
|
||||
|
||||
Reference in New Issue
Block a user