Castlevania III - Disabling enemies droping subweapons

Started by Marcelo_20XX, April 21, 2019, 09:45:21 PM

Previous topic - Next topic

Cyneprepou4uk

#20
Quote from: bogaabogaa on May 30, 2019, 07:48:09 AM
1 - Disables Sub-weapon with modding CPU-RAM $CE counter routine at (unheadered ROM) 2f59c E6 > AE (INC > NOP)

2 - Thank you Cyneprepou4uk for helping me to find this. It means so much to me  :crazy:

3 - LDA ($08), y @7334 = FF. What does this @ mean?

4 - A other Question that did come up was why the health refill of a meat (pork-chop) only works when it drops of a wall. (not candle or enemy)

1 - AE is not NOP, it's LDX with absolute addressing mode. NOP is EA. And you need 2 of them, not just 1, otherwise game will consider next following byte CE as an instruction

2 - you're welcome)

3 - debugger will show you final address after @ which he has calculated. In that particular instruction, final address is based on values in $0008, $0009 and Y

4 - perhaps this buggy meat has different id, changing it to wall's meat id should do the trick. Or you can change pointers for current id so the game will execute the same working subroutine with refilling hp after picking meat up. Choose which one is more suitable

bogaabogaa

#21
Quote from: Vanya on May 30, 2019, 01:28:30 AM

I'm interested in this.
That would be a big help to one of my old projects that I have been thinking of resurrecting in the next year or so.
It relies on specific weapons being placed in specific locations, so disabling enemies from dropping them would be great.

It is not the same as in CV 3

Probably simpler but I could not get it to work.

Here some resources:
TAS Disassembly of the CV1 special_item_drop routine: http://tasvideos.org/GameResources/NES/Castlevania.html
RAM Map CV1: https://datacrystal.romhacking.net/wiki/Castlevania:RAM_map

The RAM has a special item counter at 0x7b-(but when I disable the increase like in CV3 at PRG ROM 0x1e109 it will crash)
I am glad if someone could explain the routine (see disassembly) a bit better and a good way to disable it. 

May 30, 2019, 10:30:07 AM - (Auto Merged - Double Posts are not allowed before 7 days.)

Quote from: Cyneprepou4uk on May 30, 2019, 08:27:27 AM
1 - AE is not NOP, it's LDX with absolute addressing mode. NOP is EA. And you need 2 of them, not just 1, otherwise game will consider next following byte CE as an instruction


I did replace the loading of the Special_Item_Counter (now EAEA) But like this I need to worry that the accumulator might carry something that is = or Greater-Than 05 when it will approach the compare.. But I did change it since I also don't know what 0xcf might be used for. Thanks for pointing this out.




Also I did both-force my way through the 255 options for candle-drops. The meat does not work as a candle-drop. But I found a unused mechanic. The palette does chance when you hit a candle. https://youtu.be/sPkSif8gkEs
CV ROM DiscordServer
https://discord.gg/PvFgxRg

Marcelo_20XX

#22
Wow! awesome findings, thank you very much for all the inputs guys. I will disable the sub weapon drops in both games right now and share the personal projects I was working on...

@Vanya
No problem mate, here is a picture where I NOPed some instructions of the drop sub routine in Castlevania Rev A and yes it was handled very different on CV3:



When you kill an enemy the random drops sub-routine is called starting at E0A0 of Bank 7...
The code in the picture disables the enemies random dropping of: sub-weapons, gold and invincibility potion. But you can fine tune the NOPs to only disable the sub weapons drops...

Vanya

Awesome! Thanks a lot for that.
Now I have a reason to go back and revisit my old Castlevania Extreme hack.
I know, that is such a 90's hack title. Well, I did work on it in the 90's. ;)
Guess I'll give it a new title too.