Infinest / Phantasy-Star-II-MD-Plus

MD+ Patch for Phantasy Star II
GNU General Public License v3.0
1 stars 0 forks source link

MSU-MD conversion patch + Improvement #1

Closed moasama6 closed 3 years ago

moasama6 commented 3 years ago

Hi! I'm a total newbie to romhacking but I'm reaching out as I am interested in your MD+ patch for Phantasy Star 2 and seeing what it would entail to make it work on MSU-MD and some other changes.

A question first, is it possible to "stack" MD+/MSU-MD patches on top of existing Romhacks? I'd love to replay PS2 with redbook audio, but I'm also interested in playing with this Romhack.

https://www.romhacking.net/hacks/925/

Please let me know if you have any insights on either stacking patches or the MSD-MD conversion (I have a Mega Everdrive Pro). I'd love to learn how to help (I'm also a professional game developer).

Thank you!

Infinest commented 3 years ago

Hey there,

it is possible to simply patch a ROM with two ips patches one after another. Nothing will stop you from doing so. However, whether or not you'll run into any issues afterwards will depend on the patches themselves. It's all about what they change and if these changes conflict with each other. The hack linked does seem to have some conflicts with the ips patch supplied here so it might not work. You can check that for yourself with this: https://www.romhacking.net/utilities/1386/ You can always just go ahead and give it a try though.

Converting an MD+ patch will require you to know 68k assembly. I haven't done any MSU-MD patches myself but the biggest part of converting a patch is rewriting any writes to MD+ registers to equivalent MSU-MD registers. See here for documentations: https://downloads.terraonion.com/public/MegaSD_DEV_Manual.pdf https://github.com/krikzz/msu-md You will probably also need to extend the code with some kind of data table to check which track to loop and which not since MD+ can simply take that information from the cue file and MSU-MD can not.

moasama6 commented 3 years ago

Hello, thank you for the reply! I'm very interested in learning more. Do you have any tools to suggest getting started with 68k Assembly for Mega Drive romhacking? I've been looking at the Exodus Emulator but any other suggestions for resources would be great.

Do you think that the scope of conflicts between the two patches is something that could be resolved given enough time? Or does it seem quite extensive? Would love to stay in touch. Thank you again!

Infinest commented 3 years ago

You're welcome. First of all, here are some helpful websites you might want to look through: https://mrjester.hapisan.com/04_MC68/ https://plutiedev.com/ https://www.chibiakumas.com/68000/genesis.php https://segaretro.org/Mega_Drive_official_documentation https://info.sonicretro.org/SCHG:Sonic_Community_Hacking_Guide#General_Guides

For debugging and reverse engineering purposes i myself just use Regen and it's built in debugger, which personally, I wouldn't really recommend. It kind of sucks. I mainly use it because of the lack of any better alternatives that are to my liking.

I hear ArcadeTV uses Ghidra/IDA with plugins for loading Mega Drive ROMs. Something like these: https://www.romhacking.net/utilities/1155/ https://github.com/lab313ru/smd_ida_tools2 Don't ask me how to get these up and running though because I don't have any experience with them myself. Getting a hold of ArcadeTV might be a bit difficult at the moment as well because he's currently taking a break from MSU-MD.

I write all my code in Sublime. Other than that, the only stuff you really need are tools for building your code and patching it into your ROM of choice. Some helpful scripts to automate the whole process also help speed up the workflow. You can tell how I do it by looking at the bat scripts I have in all my repositories. If you want the executables for the tools used by these scripts, you can contact me on Discord and i'll upload them for you. My handle is infinest#8292.

Regarding the collisions: I've just checked and the improvement patch requires a rev A ROM. My patch requires a rev B ROM. That in itself might already pose a big problem. I think I never checked if my patch works with rev A though. I just know i worked with rev B as a base.

I have also checked which addresses these collisions are at and from what I can tell, most of them are at addresses of sound related functions. So it's definitely not something easy that would just require moving code around. I don't think it's impossible or that it would take forever but it'd definitely require some work. How much exactly depends on what you find out from investigating the other patch's code. You'd have to check what exactly the other patch changes and why. Afterwards, if necessary, you can make all necessary changes to make them work together. Having the source code for the other patch would be very helpful for this but i don't think it's available unfortunately.