News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Battle City Mario Bros 4-player hack  (Read 2243 times)

NesDraug

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Battle City Mario Bros 4-player hack
« on: June 01, 2019, 05:05:05 am »
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:
Hello! You found my shop of strange and wonderful things!
https://www.tumblr.com/blog/nesdraug

Cyneprepou4uk

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #1 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
I am the baldest romhacker
NES Romhacking Guide

NesDraug

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #2 on: June 01, 2019, 05:23: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
Hello! You found my shop of strange and wonderful things!
https://www.tumblr.com/blog/nesdraug

Cyneprepou4uk

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #3 on: June 01, 2019, 06:36:17 am »
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
« Last Edit: June 01, 2019, 06:41:33 am by Cyneprepou4uk »
I am the baldest romhacker
NES Romhacking Guide

#

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #4 on: June 01, 2019, 09:03:10 am »
Try this (also removes swap palettes option):
https://uploadfiles.io/gdsdy2tk

NesDraug

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #5 on: June 02, 2019, 01:11:15 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”?



Hello! You found my shop of strange and wonderful things!
https://www.tumblr.com/blog/nesdraug

Cyneprepou4uk

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #6 on: June 02, 2019, 02:41:58 am »
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.

I am the baldest romhacker
NES Romhacking Guide

#

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #7 on: June 02, 2019, 07:15:32 am »
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

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #8 on: June 03, 2019, 11:05:01 am »
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.
Hello! You found my shop of strange and wonderful things!
https://www.tumblr.com/blog/nesdraug

#

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #9 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. ;)

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

Googie

  • Hero Member
  • *****
  • Posts: 803
  • Keepin' ROM Hacking gangsta since 2003
    • View Profile
    • My work in progress ROM Hacking site
Re: Battle City Mario Bros 4-player hack
« Reply #10 on: June 03, 2019, 08:19:18 pm »
Those are pretty cool graphics, I really like 'em.  :thumbsup:
This is most gangsta.


NesDraug

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #11 on: June 04, 2019, 03:00:00 am »
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:

Hello! You found my shop of strange and wonderful things!
https://www.tumblr.com/blog/nesdraug

#

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #12 on: June 04, 2019, 07:37:56 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

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #13 on: June 04, 2019, 05:18:10 pm »

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.
« Last Edit: June 11, 2019, 12:59:16 pm by NesDraug »
Hello! You found my shop of strange and wonderful things!
https://www.tumblr.com/blog/nesdraug

NesDraug

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #14 on: June 11, 2019, 11:46:34 pm »
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:


Hello! You found my shop of strange and wonderful things!
https://www.tumblr.com/blog/nesdraug

NesDraug

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #15 on: June 20, 2019, 01:50:08 pm »
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:
Hello! You found my shop of strange and wonderful things!
https://www.tumblr.com/blog/nesdraug

darthvaderx

  • Full Member
  • ***
  • Posts: 148
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #16 on: June 26, 2019, 09:50:07 am »
Could you also offer an option with 1-2 players and competitors with A.I.?

NesDraug

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #17 on: June 29, 2019, 04:38:03 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?

 
Hello! You found my shop of strange and wonderful things!
https://www.tumblr.com/blog/nesdraug

#

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #18 on: June 30, 2019, 08:35:26 pm »
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

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Battle City Mario Bros 4-player hack
« Reply #19 on: July 02, 2019, 01:53:44 am »
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? 
Hello! You found my shop of strange and wonderful things!
https://www.tumblr.com/blog/nesdraug