This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
mission_impossible [2019/06/04 08:14] shygoo some level object info |
mission_impossible [2019/06/17 01:10] shygoo link rom map & sool engine pages |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Mission Impossible ====== | + | ====== Mission Impossible Hacking ====== |
- | Scratch page for ROM of the Month | + | **June 2019 [[rom_of_the_month]]** |
+ | |||
+ | This page is under construction! Feel free to add notes and links in whatever way you see fit - we'll polish everything towards the end of the month. | ||
+ | ---- | ||
+ | ===== Tools ===== | ||
+ | * [[https://github.com/hack64-net/rotm/releases/tag/miextract|miextract]] - Basic command-line ROM decompressor | ||
+ | |||
+ | ---- | ||
+ | ===== See Also ===== | ||
+ | * [[mission_impossible:rom_map]] | ||
+ | * [[mission_impossible:sool_engine]] | ||
+ | * [[https://hack64.net/Thread-RotM-June-2019-Mission-Impossible|Mission Impossible discussion thread]] | ||
+ | * [[https://hackmd.io/-WVc2PjoSkS06XMpV55bsw?edit|n64split config]] | ||
---- | ---- | ||
Line 167: | Line 179: | ||
struct BurpBlock | struct BurpBlock | ||
{ | { | ||
- | uint32_t dstSize; | + | u32 dstSize; |
- | uint32_t srcSize; | + | u32 srcSize; |
- | uint32_t unk08; // seems unused | + | u32 unk08; |
- | uint32_t offset; // relative to start of BurpHeader | + | u32 offset; // relative to start of BurpHeader |
- | uint32_t unk10; // 0x00000000 when dst and src are the same size, otherwise 0x04000000 | + | u8 unk10[4]; // 00000000 when dst and src are the same size, otherwise 04000000 |
}; | }; | ||
struct BurpHeader | struct BurpHeader | ||
{ | { | ||
- | char signature[4]; // "Burp" | + | char signature[4]; // "Burp" |
- | uint32_t numBlocks; | + | u32 numBlocks; |
struct BurpBlock blocks[]; | struct BurpBlock blocks[]; | ||
}; | }; | ||
Line 196: | Line 208: | ||
/*0x14*/ u16 unk14; | /*0x14*/ u16 unk14; | ||
/*0x16*/ u16 unk16; | /*0x16*/ u16 unk16; | ||
- | /*0x18*/ float posX; | + | /*0x18*/ vec3f position; |
- | /*0x1C*/ float posY; | + | |
- | /*0x20*/ float posZ; | + | |
/*0x24*/ u8 unk24[0x0E]; | /*0x24*/ u8 unk24[0x0E]; | ||
/*0x32*/ u16 unk16; | /*0x32*/ u16 unk16; | ||
- | /*0x34*/ u8 unk34[0x0C] | + | /*0x34*/ u8 unk34[0x0C]; |
- | /*0x40*/ float rotX; | + | /*0x40*/ vec3f rotation; |
- | /*0x44*/ float rotY; | + | |
- | /*0x48*/ float rotZ; | + | |
/*0x4C*/ s32 timer; // copied from gFrameCount | /*0x4C*/ s32 timer; // copied from gFrameCount | ||
/*0x50*/ u8 unk50[2]; // player: FFFF | /*0x50*/ u8 unk50[2]; // player: FFFF | ||
Line 228: | Line 236: | ||
</code> | </code> | ||
+ | Below is the header struct for level object placement data. When a level is loaded, one of these structs is decompressed from ROM along with ObjectPosRot and ObjectPosArray structs that follow. All pointer members of this struct are initially offsets relative to the beginning of the struct, but the game converts them to virtual addresses in-place. | ||
+ | <code> | ||
+ | struct ObjectPlacements | ||
+ | { | ||
+ | /*0x00*/ s32 numPlacements0; | ||
+ | /*0x04*/ struct ObjectPosRot *placements0; | ||
+ | /*0x08*/ s32 numPlacements1; | ||
+ | /*0x0C*/ struct ObjectPosRot *placements1; | ||
+ | /*0x10*/ s32 numPlacements2; | ||
+ | /*0x14*/ struct ObjectPosRot *placements2; // unconfirmed type | ||
+ | /*0x18*/ s32 numPlacements3; | ||
+ | /*0x1C*/ struct ObjectPosArray *placements3[]; | ||
+ | }; | ||
+ | </code> | ||
+ | |||
+ | <code> | ||
+ | struct ObjectPosRot | ||
+ | { | ||
+ | /*0x00*/ u8 unk00[2]; | ||
+ | /*0x02*/ vec3s position; | ||
+ | /*0x08*/ vec3s rotation; | ||
+ | }; | ||
+ | </code> | ||
+ | |||
+ | <code> | ||
+ | struct ObjectPosArray | ||
+ | { | ||
+ | /*0x00*/ s32 numPositions; | ||
+ | /*0x04*/ vec3s positions[]; | ||
+ | }; | ||
+ | </code> | ||
+ | |||
+ | <code> | ||
+ | /*0x800A98CC*/ struct ObjectPlacements *gObjectPlacements; | ||
+ | </code> | ||
+ | |||
+ | Breakdown of object placement data for the first mission: https://pastebin.com/raw/657rL7jD |