Welcome Guest [Log In] [Register]
Free Cross Powerups ASM hack; IPS patch that lets you customize crosses further
Topic Started: Jul 18 2010, 12:18 PM (2,247 Views)
Prof. 9
Member Avatar
Moderaptor

Since the normal Cross chip powerup routine severely limits what you can do, I've made an ASM hack that replaces it with a custom routine. Sadly, there wasn't enough room to fit everything I wanted in there, so you will have to sacrifice some free space. Anyway, this is what it can do:

- Chip powerup settings for EVERY cross/crossbeast
- Maximum of 250 extra attack power for ALL elements
- +5%, +10%, +25%, +50% or +100% attack power settings for ALL elements
- Check the chip flags (0x09) for bits that should be on or off (check for non-dimming, darkchip, etc)
- Optional: check any value in chip data (8-bit or 16-bit)! Supports ==, !=, >=, <=, etc

The last feature is very powerful; you could make a cross that only adds extra damage to DarkChips, or only to chips that have less than 50 MB, or only to chips that summon a Navi. Or only to chips that have less than 100 attack power. There's really a lot you can do with it :P

After patching your ROM with the IPS file, download cross_chip_powerup_data.raw and load it into free space. It has all the default settings for the crosses in MMBN6. You can insert it at ANY address as long as it is in free space. No need to worry about 16-bit or 32-bit; there's only one 16-bit value in there, and I set it to load it as two separate bytes, so having at an odd offset is fine. Remember the address where you loaded cross_chip_powerup_data.raw into.

Finally, go to address 0800F024 and put the address there. Remember to reverse the byte order, the 08 in the fourth byte, etc.

Now you can start messing with crosses. Here's the data format:

Code:
 
Cross data is 18 bytes long.

0x00 = Fire extra dmg
0x01 = Aqua extra dmg
0x02 = Elec extra dmg
0x03 = Wood extra dmg
0x04 = +/- extra dmg
0x05 = Sword extra dmg
0x06 = Cursor extra dmg
0x07 = Object extra dmg
0x08 = Wind extra dmg
0x09 = Break extra dmg
0x0A = Null extra dmg

Extra damage values:
00-FA = raw attack damage added as-is to the chip's damage
FB = 5% of original chip damage is added
FC = 10% of original chip damage is added
FD = 25% of original chip damage is added
FE = 50% of original chip damage is added
FF = original chip damage is doubled



0x0B = chip flags that must be ON (normally this is 02h)
0x0C = chip flags that must be OFF (normally this is 01h except for EraseCross)



The next part is optional; it allows you to add an extra check before power is added to the chip. You can load a single 8-bit or 16-bit value from the chip data and compare it to 16-bit value in the Cross powerup data.

0x0D = Check offset (start of chip data + this offset = address to be loaded from)
0x0E = Check type
0x0F = Given value (16-bit)

Check types:
00 = loaded value equal to given value
01 = loaded value is not equal to given value
02 = loaded value greater than or equal to given value
03 = loaded value is less than or equal to given value
04 = all bits in the given value are ON in the loaded value
05 = all bits in the given value are OFF in the loaded value
06 = at least one of the bits in the given value is ON in the loaded value
07 = at least one of the bits in the given value is OFF in the loaded value

00 = Skip check
10 = 16-bit
20 = 8-bit

Examples:
12h = 16-bit, check if chip's value is greater than or equal to cross's value
26h = 8-bit, check if at least one of cross's value's bits is on in chip's value



There's one more value:
0x11 = r7 value (8-bit)

What the r7 value does is still unknown. ElecCross and SlashCross use the same, and all the Beasts use 9h. The r7 value isn't used for displaying the extra damage on the screen at least.

To get a Cross's offset, multiply the Cross value by 18 (12h). Here are the necessary files, they work for both Gregar and Falzar:

free_cross_powerups.ips
cross_chip_powerup_data.raw
:ninja: Follow me on Twitter! :trap: Fork me on GitHub!
Posted Image
Profile
Quote
 
MegaRockEXE
Member Avatar
BN Guides Author

Wow. This looks awesome. How can all this be done? Since you have to patch it in, is it possible to edit one cross only? This looks convenient but lengthy. Looks impressive though,
The Rockman EXE Zone | YouTube
Profile
Quote
 
brianuuu
Member Avatar
SF Noise Spriter
Wait, which byte is the extra dmg for beast, which fro crosses?
Posted ImagePosted ImagePosted Image
Posted Image
Profile
Quote
 
louman7777777
Member Avatar
Newb
This is awesome but I don't really get the chip flags part. When was 02H a value you could put in?
Profile
Quote
 
Prof. 9
Member Avatar
Moderaptor

Quote:
 
Wow. This looks awesome. How can all this be done? Since you have to patch it in, is it possible to edit one cross only? This looks convenient but lengthy. Looks impressive though,
No, one of its major features is that it enables ALL crosses to have elemental chip powerups, for ALL elements.

What I did was I took the routine I posted about here, threw out everything that was about the Crosses, and put in my own, custom routine. In the old routine there was no data format, it just loaded your current Cross, compared it to a couple of cross values and if it matched, it would load the element of your chip, compare it to a single value and then add the extra damage if that matched too. There was no data format; it didn't go like "oh, I load the Cross and element data from some address+offset in the ROM", all the cross chip powerups were actually hardcoded into the routine.

My custom routine DOES load all of the data from a certain point in the ROM; it's actually loading everything from cross_chip_powerup_data.raw. This is why you have to put the address you loaded that file into at 0800F024. It takes that address, then adds (your cross value * 12h) to get to that Cross's data. After that, it loads the values for the chip flags check and performs that; then it loads the "extra check" data and performs that too. When all checks have been passed, it uses the chip's element value as an offset to load the extra attack power for that specific element.



Quote:
 
Wait, which byte is the extra dmg for beast, which fro crosses?
Go to the start of the data. Take the Cross value of the Cross you want to edit and multiply it by 12h. Add the result to the starting address of the data to get to the data for a specific Cross.

For example. Normal MegaMan has a cross value of 0h. That means starting address + 0h * 12h = starting address. So the chip powerup data for Normal MegaMan is right at the start.

Gregar BeastOut has a cross value of Bh. The data for Gregar BeastOut is at starting address + Bh * 12h = starting address + C6h.

Now that you've found the data for the Cross/Beast you want to edit, have a look at the data format which I posted. Say you want Gregar BeastOut to do 30 more damage with Sword chips. The extra damage for Sword is at offset 0x05 from the start.

Let's say you loaded cross_chip_powerup_data.raw into the address 08800000. You want Gregar BeastOut to get 30 extra power for Sword chips. So you add C6h to the address to get to Gregar BeastOut's data. Then you add 5h to get to the extra Sword damage for Gregar BeastOut. C6h + 5h = CBh. That means that you will have to write 1Eh (30) to the address 088000CB.



Quote:
 
This is awesome but I don't really get the chip flags part. When was 02H a value you could put in?
Have a look at this post. It's the chip data format. At offset 0x09 from the start is this:
Code:
 
0x09 Special Chip Attack (1 byte)
These are the "chip flags". You know a single byte consists out of 8 bits. At value 0x09, every bit determines a property of the chip. Does the chip freeze time? Does the chip display how much damage it does? The 0x09 value determines that.

You can find Greiga Master's new BN6 Chip Editor here. You might notice some new boxes in the lower right corner. "TimeFreeze", "Display Attack", "IsNavi", etc. Those are actually the chip flags.

Now have another look at the data format in the first post.
Code:
 
0x0B = chip flags that must be ON (normally this is 02h)
0x0C = chip flags that must be OFF (normally this is 01h except for EraseCross)
0x0B and 0x0C contain the chip flags that must be ON and OFF respectively for the extra damage to be added to the chip.

As you can see, 0x0B is normally 2h. This means that the second bit (which adds 2h to the value) must be turned ON. The 2h bit determines "Display Attack". That means that in order for a chip to receive the extra power boost, it must display its attack. If it does not display its attack, it will not get the extra damage.

0x0C is normally 1h. This means that the first bit (which adds 1h to the value) must be turned OFF. The 1h bit determines "TimeFreeze". That means that in order for a chip to receive the extra power boost, it must NOT be a time-freezing chip. If it's a time-freezing chip, it will not get the extra damage. You may be thinking "why doesn't EraseCross check for that chip flag"? This is because a lot of Cursor chips are time-freezing. CircGun, Magnum, etc. If all of those chips didn't get extra damage, EraseCross would be pretty useless. :P



Then there's the "extra check". Say you want all chips with 75 attack power or less to get +50 damage. The "extra check" makes it possible because it allows you to check an extra property of the chip before it gets the damage boost.

First of all, write 50 (32h) to 0x00 - 0x0A. This will make sure every chip element can receive the power boost.

Let's look at the values we need to edit. Have a look at the data format in the first post.
Code:
 
0x0D = Check offset (start of chip data + this offset = address to be loaded from)
0x0E = Check type
0x0F = Given value (16-bit)


Now have another look at the chip format.
Code:
 
0x1A Attack power (2 bytes)
The chip's attack power is located at offset 0x1A from the start of the chip's data. In order to check this property, we write 1Ah to the 0x0D value.

We want to compare the chip's attack power to 75. What we do is we convert 75 to hex (we get 4Bh) and so we write 4B 00 to the 0x0F value.

Finally, we must determine the check type.
Code:
 
Check types:
00 = loaded value equal to given value
01 = loaded value is not equal to given value
02 = loaded value greater than or equal to given value
03 = loaded value is less than or equal to given value
04 = all bits in the given value are ON in the loaded value
05 = all bits in the given value are OFF in the loaded value
06 = at least one of the bits in the given value is ON in the loaded value
07 = at least one of the bits in the given value is OFF in the loaded value

00 = Skip check
10 = 16-bit
20 = 8-bit
The chip's attack power is 16-bit. So we need this:
Code:
 
10 = 16-bit
Remember what we want to check. Check if the chip's attack power is less than or equal to 75. This type does that:
Code:
 
03 = loaded value is less than or equal to given value
So, we end up with 10h + 3h = 13h. Write 13h to 0x0E.

Now we're done. We've added an extra check. It loads the chip's attack power, checks if it's less than or equal to 75, and if so, the chip gets 50 extra damage.

The "extra check" function I added in the patch really gives you a lot more ways to customize Crosses that the original routine didn't give you. You can do stuff like:
- Don't add extra damage to chips that have a *-variant
- Only add extra damage to chips that can lock-on (Black Ace and Red Joker actually do this, iirc)
- Don't add extra damage to Standard chips
- Only add extra damage to chips with 50 MB or less
- Don't add extra damage to chips with a rarity of 4 or 5 stars.
There's some more things you can do. Be creative! :P
And if you don't want or need to use the "extra check", just set Check Type to 00h.
:ninja: Follow me on Twitter! :trap: Fork me on GitHub!
Posted Image
Profile
Quote
 
Kirak
Member Avatar
Annoying Dog
Woah! This is something I can use! It would be super cool if there was a custom program for this.
Profile
Quote
 
MegaRockEXE
Member Avatar
BN Guides Author

Wait, Killer Cross has an ability where attacks do more damage based on the enemy's HP. I forgot how it works but how can that be controlled?
The Rockman EXE Zone | YouTube
Profile
Quote
 
brianuuu
Member Avatar
SF Noise Spriter
mega rock.exe
Jul 19 2010, 05:56 PM
Wait, Killer Cross has an ability where attacks do more damage based on the enemy's HP. I forgot how it works but how can that be controlled?
It should be an ability, not power up, or I might be wrong.
Posted ImagePosted ImagePosted Image
Posted Image
Profile
Quote
 
Greiga Master
Member Avatar
Admin of the stars, owner of your soul...

mega rock.exe
Jul 19 2010, 05:56 PM
Wait, Killer Cross has an ability where attacks do more damage based on the enemy's HP. I forgot how it works but how can that be controlled?
i think it just added an hp bug if enemy hp contained a 6
Profile
Quote
 
brianuuu
Member Avatar
SF Noise Spriter
Greiga Master
Jul 19 2010, 07:48 PM
i think it just added an hp bug if enemy hp contained a 6
Do you mean 1687, 675, 76 <----contained a 6?
Posted ImagePosted ImagePosted Image
Posted Image
Profile
Quote
 
Prof. 9
Member Avatar
Moderaptor

The GameFAQs guide says this:
Quote:
 
Properties:
- Cursor Chips gain a +30 attack bonus.
- Non-elemental Chips cause instant death to Viruses and bugs to Navis if the
number "4" is present in their HP.

- Charged Buster turns into Killer Death Beam, which pierces through enemies
dealing 40+(20xAttack) Cursor damage.
- Weak against Wind attacks.
:ninja: Follow me on Twitter! :trap: Fork me on GitHub!
Posted Image
Profile
Quote
 
Prof. 9
Member Avatar
Moderaptor

Small fix. and r1,r2 changed to r2,r1. This should fix the chip flag checking (the first check was always returning zero* <_<). I've updated the IPS patch in the first post. If you don't want to repatch, just change the byte at 0800EF74 from 11 to 0A.
Edited by Prof. 9, Jul 21 2010, 09:47 AM.
:ninja: Follow me on Twitter! :trap: Fork me on GitHub!
Posted Image
Profile
Quote
 
Agro
No Avatar
Programmer!

Lol, you had the registers reversed. No wonder it was returning nonzero. o-o
Profile
Quote
 
Prof. 9
Member Avatar
Moderaptor

Agro
Jul 21 2010, 08:16 AM
Lol, you had the registers reversed. No wonder it was returning nonzero. o-o
The stupid thing is that it was in my source code file but it wasn't in the actual patch because I forgot to record the change; changing it in the emulator doesn't make it permanent. <_<

Anyway, now that this part of Crosses is pretty much done I can move on to chip charging. That should be interesting because there seem to be Cross abilities interfering with chip charging.
Edited by Prof. 9, Jul 21 2010, 08:40 AM.
:ninja: Follow me on Twitter! :trap: Fork me on GitHub!
Posted Image
Profile
Quote
 
Agro
No Avatar
Programmer!

Of course it does. Because you can't charge up non-elemental attacks(for tomahawkcross) with SpoutCross.. there has to be some connection.
Edited by Agro, Jul 21 2010, 08:52 AM.
Profile
Quote
 
Prof. 9
Member Avatar
Moderaptor

Agro
Jul 21 2010, 08:48 AM
Because you can't charge up non-elemental attacks(for tomahawkcross) with SpoutCross..
And this is exactly what I was planning to change.

It's already possible to some degree in fact. With the notes I posted in my Crosses guide, ou can atler the elements affected by Crosses' chip charging.
:ninja: Follow me on Twitter! :trap: Fork me on GitHub!
Posted Image
Profile
Quote
 
Agro
No Avatar
Programmer!

Yeah. But we can still extend the knowledge somehow to some extent..
Profile
Quote
 
Prof. 9
Member Avatar
Moderaptor

While working on chip charging, it occurred to me that the conditions for charging chips for Beasts are different from the conditions for Crosses. For example, THawkCross can only charge non-timefreezing (Wood) chips, while Beasts can charge ALL (Null) chips. With that in mind, I've decided to make a BeastStack version of this patch.

Now the chip powerups of BeastCrosses will stack with their normal Cross forms.
For example, say SpoutCross gives +20 to Aqua chips and SpoutBeast gives +30 to Aqua chips. Whenever you are in SpoutCross, your Aqua chips will do 20 extra damage. When you are in SpoutBeast, your Aqua chips will do 20+30=50 extra damage.

BeastCrosses stack with the normal Crosses. Falzar/Gregar BeastOut stacks with normal MegaMan. BeastOver stacks with both BeastOut and normal MegaMan (not really how it works in the normal game but ah well, BeastOver is weak anyway +30 null chips couldn't hurt).

I also changed "and r2,r1" back to "and r1,r2". It was correct after all. What the hell was I thinking?



http://theprof9.webs.com/free_cross_powerups_beaststack.ips
http://theprof9.webs.com/cross_chip_powerup_data_beastcross.raw

The new powerup_data is the same as the normal one except some of the elemental powerups for some of the BeastCrosses have been removed because those are taken from the regular Crosses. For example HeatBeast has his +50 Fire powerup removed because HeatCross already has it.
:ninja: Follow me on Twitter! :trap: Fork me on GitHub!
Posted Image
Profile
Quote
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Guides & Research · Next Topic »