News: 11 March 2016 - Forum Rules

Author Topic: [HELP] Combine Super Metroid Project Base & Control Freak hacks (ASM src added!)  (Read 2306 times)

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1683
    • View Profile
Hello community.

About a month ago I started toying around with both Project Base and Control Freak for Super Metroid.
I always thought of Super Metroid as an odd sheep from the bunch, mainly because of the weird control mechanics and the floaty physics.
Project Base basically handled the physics part quite well, I can now control Samus in a way similar to that of Fusion and Zero Mission.
Control Freak takes care of the controls, and makes Super Metroid have a similar control scheme to that of Zero Mission, which is much more friendly when you are in the heat of the action in Super Metroid.

Now, with that said, I tried combining both Project Base and Control Freak to have the best of both hacks.
However, there is one problem...
The Spin Jump.

From all the tests I made, it seems like the Spin Jump code related to both hacks is the one making them incompatible with each other. This can be seen in the very first cutscene of the game where Samus jumps back to the pillar to attack Mother Brain. Right when she is about to perform the Spin jump, the game freezes.

How can I be so sure that's the Spin Jump the one conflicting between the two?
Well, I commented out the whole code related to the Spin Jump in the Control Freak source code (publicly available btw) and I managed to get the game booting just fine, the only downside was that Samus could not perform the Spin Jump, but she was able to jump vertically and move with the vertical animation too.

Now, I have tried to get around the ASM code I have to make it work, but I could only get as far as what I mentioned above.
I cannot wrap my head around the code to make Samus do her Spin Jump from Project Base and removing the one from Control Freak to avoid collisions.

That's why I wanted to ask for help in this regard, I feel like I'm really close, but due to my lack of proper ASM knowledge, I cannot seem to locate the main problematic code of Control Freak.

Here's the package I'm using:
https://www.dropbox.com/s/bulcqkq26yrazmv/SM-src.rar?dl=0

In there you will find four things mainly:
  • xkas - I am using this to inject the ASM files into a SMC ROM.
  • Control Freak's ASM source code - This includes four files: ControlFreak2.asm, CMenu1.bin, CMenu2.bin, CMenu3.bin. The CMenu files seem to be the ones that change the option's text for the Controls.
  • ProjectBase's Spin jump related code and IPS - The Project Base.asm file contains the code specifically related to the Spin Jump used in the Project Base hack (Provided by PHOSPHOTiDYL from Metroid Construction's forums). The ProjectBase.ips is the base patch that I'm using.
  • TransitionTable.asm - This is the disassembly ASM code for the Spin Jump found in the original game. Might help for debugging some stuff or simply as reference.

How to start performing tests:
  • Grab yourself a Super Metroid ROM (Unheadered)
  • Apply the ProjectBase.ips patch into the Super Metroid ROM you just got.
  • Once you have the patched ROM, make two copies of it. One to keep as a backup and the other one which we'll be using as our Test ROM.
  • Open CMD and run the following command (Replace testROM.smc with the name of your test ROM):
    xkas.exe ControlFreak2asm testROM.smc
  • You will need to delete the Test ROM and make a new one each time you run the CMD command if you want to make another test after changing some part of the ASM code.

That's pretty much it.

I would recommend ONLY modifying the ASM code found in ControlFrea2.asm.
Basically, I wouldn't mind sacrificing the Spin Jump hacks of Control Freak as long as Project Base's Spin Jump hack is still there, which means that removing the Control Freak's Spin Jump related code/pointers might suffice, but I haven't been able to do so yet.

The package also has a file called "rom.sh". This is a simple bash script I made to make the delete/copy/rename process of the Test ROM automatic, the .sh file is for use in Linux machines. Windows machines might want to do a .bat file with the following script:
Code: [Select]
del test.smc
copy Super\ Metroid.smc test.smc
xkas.exe ControlFreak2.asm test.smc

If there is anything else needed, please let me know.
Thanks in advance for anyone who might want to help out with this project!