Does anyone here know lots about converting M4 games over? I thought I'd just write out what I've been trying to do and people can see if they can offer any suggestions:
I'm trying to convert Manic Panic Ghosts! to netboot. It's an M4 game, similar to others such as Akatsuki Blitzkampf Ausf. Achse you can view all of them here:
https://github.com/mamedev/mame/blob/master/src/mame/drivers/naomi.cpp#L700
I took the working version of Akatsuki and then tried to build my own from the mame roms so I could work out the process
Things I've worked out are different from the mame roms vs the working netboot version
- The first 0x800000 are decrypted in the working version
- The working version has the region flag set to FF (all regions)
- The working versions load the game and test binaries from a slightly different location (0x40 / 64) bytes less than the game on the cart
You can view all of the naomi header info here:
https://github.com/DragonMinded/netboot/blob/trunk/docs/naomi.md (looks like
@MetalliC heavily contributed to this, so thanks very much - it's been such a good resource!)
In the original roms of Akatsuki it loads the game from 0x00000040 and the test mode from 0x00004040
In the working netboot version, the person has just taken 0x40 away and so it loads the game from 0x00000000 and the test mode from 0x00004000
0x00000000 refers to the start of the game rom where the header starts
So by this logic, I apply the same thing to Manic Panic Ghosts:
- Decrypt the first 0x800000 of the game
- I just left the region flag, and turned my naomi to the region it wanted (USA / Export)
Then this is the problemanic bit, the game executable does the exact same thing, loads from 0x00000040 and so I set it so 0x00000000 and the game loads fine (up to the CALL THE ATTENDANT part)
But the test mode loads from 0x00003000
I've tried taking 0x40 away from this number to get 0x00002FC0, but that doesn't work (you select test mode and it just crashes)
It's also worth noting that the game executable starts loading from 0x00000040 and loads a length of 0x00003000 bytes
What's strange about this is that it would then overlap into the test mode executable by 0x40 bytes on the original game? You'd expect the test mode to start loading at 0x00003040 but it doesn't!?
I suspect it's a long shot to get anyone as interested as I am in this, but if anyone can see any mistakes I'm making here I'd be more than happy to hear what you've got to say!
It's mostly done as a learning exercise, and I appreciate that Manic Panic Ghosts requires some IO to work.