Sappharad / MultiPatch

Multi-Format File Patching App for macOS
http://projects.sappharad.com/multipatch/
GNU General Public License v2.0
193 stars 16 forks source link

MOD (Star Rod) support #15

Open GB-CG opened 3 years ago

GB-CG commented 3 years ago

mod is generated by Star Rod which is a Paper Mario (64) editor.

I've asked for documentation on the Star Rod discord and here's what they've said:

IIRC, it's a magic word = 0x504D5352 ('PMSR') followed by a u32 chunk count then a series of chunks. each chunk has three parts: u32 baserom offset, u32 patch length, byte[] patch data. no alignment. when patching, just copy the bytes from each chunk to the baserom offset (which may exceed the size of the baserom for appended data)

There's an option for mod packages to be Yay0 compressed, which just uses the PM Yay0 format. you can identify these by the magic byte being 'Yay0' instead of 'PMSR'.

Hope that helps? Apparently it's similar to IPS.

Here's some samples: Book of Mario Master Quest

Sappharad commented 3 years ago

If it's similar to IPS, why did they invent a new format just for one application?

Linear BPS practically exists as a replacement for IPS for later cartridge based systems and works the same way. At the moment I don't see any of these samples published to RHDN, I don't know if the format is popular enough to spend the effort supporting it yet.

I'm not closing this issue, but I'll probably take longer than I did with RUP to bother supporting it because it seems even less common than that was.