Addressing Modes and Melee Damage: A Guide to ROM Hacking

Welcome back to ROM hacking! In our last video, we wrapped up our modifications to the melee accuracy routine. However, we encountered some issues with the code not working as expected. After some investigation, we discovered that the problem was with the assembly instructions we used. The Genesis console uses a different processor, which caused compatibility issues. But after some trial and error, we managed to fix the code and it finally works!

Now that the melee accuracy routine is sorted, let’s move on to the damage calculations. There are a few things we need to fix in this area. First, we need to address the equipment range check, which is currently incorrect. We also need to fix the strength lookup to properly account for gauntlets. Lastly, we need to adjust the damage values for certain weapons, such as the sword, which should have a damage range of 1-8 instead of 1-6.

To make these changes, we’ll need to modify the code. We’ll need to save and restore important values, such as D0, before making any changes. We’ll also need to check for the presence of gauntlets and adjust the damage accordingly. Additionally, we’ll need to update the weapon damage values in the script to reflect the correct damage ranges.

Once we’ve made these changes, we can test them out. We can roll the dice and see if the damage calculation is working as expected. If everything goes well, we should see the correct damage range for each weapon.

In our testing, we found that the sword damage range was incorrect, so we made the necessary changes to fix it. We also discovered that some weapons were not implemented properly, so we didn’t bother making changes to those.

Further reading:  Introduction to Strings in C

Moving forward, we’ll be investigating the calculations for ranged attacks in the next video. We suspect that the same routines used for melee attacks are also used for ranged attacks, so we’ll dive into the code and see what’s going on. If we find any issues, we’ll work on fixing them.

That’s it for this video! We made some progress in fixing the melee damage calculations, but there’s still more to do. Stay tuned for the next video, where we’ll tackle the calculations for ranged attacks. If you enjoyed this video, please give it a thumbs up and don’t forget to subscribe to our channel for more ROM hacking content.

For more information about Techal and to stay updated with the latest technology news and guides, visit Techal.

Addressing Modes and Melee Damage: A Guide to ROM Hacking
Addressing Modes and Melee Damage: A Guide to ROM Hacking

FAQs

Q: What was the issue with the melee accuracy routine?
A: The issue was with the assembly instructions used in the code. The Genesis console uses a different processor, causing compatibility issues. After some trial and error, we managed to fix the code and it now works correctly.

Q: What changes were made to the damage calculations?
A: We fixed the range check for equipment, adjusted the strength lookup to account for gauntlets, and updated the damage values for certain weapons. The sword, for example, now has a damage range of 1-8 instead of 1-6.

Q: What will be covered in the next video?
A: In the next video, we’ll be investigating the calculations for ranged attacks. We suspect that the same routines used for melee attacks are also used for ranged attacks, so we’ll dive into the code and see what’s going on.

Further reading:  Click and Drag: Bringing Interactivity to Unreal Engine 4 with C++

Conclusion

In this video, we made progress in fixing the melee damage calculations in our ROM hacking project. We addressed issues with the melee accuracy routine and adjusted the damage calculations for various weapons. We also discussed upcoming plans to investigate and potentially fix the calculations for ranged attacks. Stay tuned for more ROM hacking adventures!

YouTube video
Addressing Modes and Melee Damage: A Guide to ROM Hacking