News:

11 March 2016 - Forum Rules

Main Menu

Battle City Mario Bros 4-player hack

Started by NesDraug, June 01, 2019, 05:05:05 AM

Previous topic - Next topic

NesDraug

So, I decided to do a graphics hack of the Battle City - 4 Players Hack by Ti. ( https://www.romhacking.net/hacks/2142/ )

In this version you can play as Mario, Luigi, Wario and Waluigi.




Swap Palettes must be turned off. (Or you'll get a flashy grey 4th player)   

I'd like to set these options to default. But I have no idea how:
✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg

Cyneprepou4uk

How about this. Write necessary bytes to these options, put this code somewhere in rom, change reset vector to it, and add a jump to an old vector at the end of that code

NesDraug

Quote from: Cyneprepou4uk on June 01, 2019, 05:16:00 AM
How about this. Write necessary bytes to these options, put this code somewhere in rom, change reset vector to it, and add a jump to an old vector at the end of that code

That sounds brilliant... But unfortunately I have no idea what you're talking about.
I tried to see what values was changed in FCEUX but I don't know what to do with them.
0066:00
01AC:4E
01AE:20
06D7:4E
06D9:20
✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg

Cyneprepou4uk

#3
Reset vector is an address where a game jumps to when its loaded, and starts executing code from there. This address is set at $FFFC (low) and $FFFD (high). Change them so battle city will jump to your new code first.

Code will be simple for you - LDA something, STA somewhere. So you are setting default options as you want them to be, ram addresses and necessary bytes you should be able to figure out by yourself. Then JMP to an original reset address

#


NesDraug

Quote from: # on June 01, 2019, 09:03:10 AM
Try this (also removes swap palettes option):
https://uploadfiles.io/gdsdy2tk

Thank you! Cred to you! The swap palette option disappeared, lovely! I wish I knew what I'm doing but I'm fairly new to romhacking. I don't know much about code and assembly language and whatnot and I'm just beginning to learn how to change code in the FCEUX Hex editor.

Things to fix, but don't know how to:

✓ Disable swap palettes
- Disable engine sound
- Decrease enemy speed
- Players start with ability to shoot faster
- More frequent power ups
- Change title Screen. Maybe "Battle City Mario." or "Wario's Battle City"?



✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg

Cyneprepou4uk

Engine sound is played when there are still enemies on the level if I recall correctly. Set read breakpoint to enemies counter, there are 2 of them.

Battle city doesn't have velocity values. It changes X/Y objects coordinates on some frames. Read frame counter address.

There are 2 addresses for powerups (I guess), one for tank graphics and one for actual tank power. Set correct values here when level loads and when a player dies. Also when died after grenade.

In original game there are fixed enemy numbers that spawn with bonus skin, which can be found by reading one of the enemies counters before they respawn. I think the same is for the hack, but more bonuses if there are 40 enemies.

Find battle city text in hex and set a read. You will have to write your oun title somewhere else if there is not enough space, and change some code here. There also should be a mechanic for drawing a next line, it's either a specific byte in text itself between words or a tiles counter for a string inside that code.


#

To increase shooting speed decrease ROM address 61EA for shooting left (FE) and increase 61EC (02) for shooting right. And decrease 61F1 (FE) for shooting up and increase 61F3 (02) for shooting down. Make sure to increase/decrease all addresses by the same amount unless you want different angles to shoot at different speeds. Increasing the shooting speed can cause the shells to not hit objects, so be careful! If you want to mess around, changing the values (00) next to these addresses can make the shells shoot diagonally. ;)

NesDraug

Thank you! Well I tried but I think I will just leave the shooting speed as ut is because it sometimes misses the bricks.

I would love to turn that engine sound off tho. I can turn it off in FCEUX in NES memory at 03AC and change it to 00. But I can't find it in the ROM to save the change.
✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg

#

It's actually RAM address 0312 that's important because it enables all the writes to 03AC. ;)

Here's a patch that disables all engine sounds: https://uploadfiles.io/zxrgz1a6

Googie

Those are pretty cool graphics, I really like 'em.  :thumbsup:

NesDraug

Quote from: # on June 03, 2019, 04:24:17 PM
It's actually RAM address 0312 that's important because it enables all the writes to 03AC. ;)

You're the best! Thank you. How do you save changes in the RAM?

I also noticed that when I open the rom in FCEUX the options meny are exactly as I wanted. But in Nestopia and Mednafen it looks like this:

✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg

#

Quote from: NesDraug on June 04, 2019, 03:00:00 AM
You're the best! Thank you. How do you save changes in the RAM?

I also noticed that when I open the rom in FCEUX the options meny are exactly as I wanted. But in Nestopia and Mednafen it looks like this:

You can't save changes in the RAM. You can right-click on the RAM address in FCEUX and set a write breakpoint. Once it triggers you'll have to read the code(which is in the ROM file) and figure out which part of it you should change (there can be multiple writes to an address and you should check them all out before committing to a change).

It seems some emulators start with the whole RAM set to FF (which sets everything to YES), while the original 4-player patch seems to depend on only some of the RAM being initialized to FF. I'm not sure which is more accurate, but I can expand my patch to manually set all options instead of relying on the RAM behavior. That would fix it for all emulators.

New patch: https://uploadfiles.io/zmhs1imi

NesDraug

#13
Quote from: # on June 04, 2019, 07:37:56 AM

New patch: https://uploadfiles.io/zmhs1imi

Works like a charm. Thanks again.

On an other note: Do you guys think there's a problem with mario and wario being on the same team? The hack is made like this: Player 1 and 3 is team 1. And players 2 and 4 is team 2. It's only for the score and not that important.

The enemies share the same colors as player 3 and the explosions are the same as player 4. So Wario has to be 3 and Waluigi 4 since their colors coincidentally fit.
✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg

NesDraug

Well thanks to # I even managed to fix a new title screen. (I remapped it to the Pause graphics instead of having the text: PAUSE)



I finally figured out what "5 bonus tanks" meant. It means you get more power-ups from enemies!
I have renamed all the options.
Things to fix:
✓ Disable swap palettes
✓ Disable engine sound
✓ Change title Screen. "Battle City Mario."
✓ Replace the word "tank" with "enemies"
✓ Get rid of grey boxes in stage intro

- New preferred options (more bonus!)
- Player animation slower

I do try to change these settings by my self, but either I'm too stupid to figure it out or I don't have the patience to do so. Help?  ::) :angel:


✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg

NesDraug

It's finally released. Yay!

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

...now where am I ever going to find 3 friends to play with?  :woot!:  :banghead:
✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg

darthvaderx

Could you also offer an option with 1-2 players and competitors with A.I.?
See my hacks channel including some of my works:

https://www.youtube.com/user/MyWashington2/videos

NesDraug

Quote from: darthvaderx on June 26, 2019, 09:50:07 AM
Could you also offer an option with 1-2 players and competitors with A.I.?
That would be awesome. I can only do graphics and minor modifications tho. Perhaps # is up for the task?

✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg

#

Quote from: NesDraug on June 29, 2019, 04:38:03 AM
That would be awesome. I can only do graphics and minor modifications tho. Perhaps # is up for the task?
I'll let you know if I can find the time for it. This could take quite a bit more time to add than any of the other changes.

NesDraug

Quote from: # on June 30, 2019, 08:35:26 PM
I'll let you know if I can find the time for it. This could take quite a bit more time to add than any of the other changes.


Perhaps it would be easier to work off the original rom instead of the 4 player hack and create a standalone 1-2 player version? 
✍️ Blog: https://www.tumblr.com/blog/nesdraug

💀 Join my crypt on discord:
https://discord.gg/Eb4HTSNzeg