nesdev.com
http://forums.nesdev.com/

Balloon Fight hack - Would this actually work on hardware?
http://forums.nesdev.com/viewtopic.php?f=10&t=12034
Page 1 of 2

Author:  mikaelmoizt [ Tue Nov 18, 2014 11:42 am ]
Post subject:  Balloon Fight hack - Would this actually work on hardware?

I am really getting deep into this interesting world of NES coding and hacking. The only downside is that I would like to try my hacks on real hardware, not just emulation, but lack any kind of equipment and/or knowledge to do so. Since these are all new things for me, please excuse my extreme n00bism.

So I made a hack for Balloon Fight (JU) where you can play a 2-player trip game.
The original rom is a NROM-128 16k which I made into NROM-256 by adding a new iNES header, and then reorienting code to work like the original game.
Too many small details to explain, please take a look at my code if you like. Assembles with ASM6, Balloon Fight (JU) rom is needed. IPS ready to go.

Maybe you like to try it out? Does it work? :wink:

Attachments:
ballonfighthack-0.png
ballonfighthack-0.png [ 2.58 KiB | Viewed 2723 times ]
ballonfighthack.ips [23 KiB]
Downloaded 129 times
ballonfighthack.asm [6.43 KiB]
Downloaded 89 times

Author:  NovaSquirrel [ Tue Nov 18, 2014 3:06 pm ]
Post subject:  Re: Balloon Fight hack - Would this actually work on hardwar

Tried it on my PowerPak. It works for the most part, but pressing the reset button locks the game up on a black screen. Also, the menu seems to have a 5th position? Picking it just seems to start a 1-player Balloon Trip game.

Edit: The reset problem happens with the vanilla unpatched Balloon Fight too, so not your fault.

Author:  Vectrex2809 [ Tue Nov 18, 2014 3:17 pm ]
Post subject:  Re: Balloon Fight hack - Would this actually work on hardwar

Ooooh! Love me some Balloon Fight. Gotta check it out. However, I don't have a PowerPak so I can't help (Even though I'd like to), but trust me, it can be a pain to debug your stuff on real hardware.

Author:  Gilbert [ Tue Nov 18, 2014 7:43 pm ]
Post subject:  Re: Balloon Fight hack - Would this actually work on hardwar

I actually misread the title as Balloon Fight back.

I think it sounds awesome to have a parody or hack of this game called Balloons Fight Back or Balloon Fights back. :lol:

Author:  mikaelmoizt [ Tue Nov 18, 2014 10:30 pm ]
Post subject:  Re: Balloon Fight hack - Would this actually work on hardwar

NovaSquirrel wrote:
Tried it on my PowerPak. It works for the most part, but pressing the reset button locks the game up on a black screen. Also, the menu seems to have a 5th position? Picking it just seems to start a 1-player Balloon Trip game.

Edit: The reset problem happens with the vanilla unpatched Balloon Fight too, so not your fault.


Thanks for trying it out. Yeah, the fifth option is intentional - adding yet another mode for someone to add what ever functions into the game. More than 15k of nop's in upper bank, that is a lot to play around with 8-)

Author:  tepples [ Tue Nov 18, 2014 10:33 pm ]
Post subject:  Re: Balloon Fight hack - Would this actually work on hardwar

You could always do a CHR RAM conversion, with or without tile compression. This way you can replace tiles as you need them in case you need more background detail. (But then BF has a bunch of unused tiles anyway.)

Author:  mikaelmoizt [ Wed Nov 19, 2014 1:28 am ]
Post subject:  Re: Balloon Fight hack - Would this actually work on hardwar

tepples wrote:
You could always do a CHR RAM conversion, with or without tile compression. This way you can replace tiles as you need them in case you need more background detail. (But then BF has a bunch of unused tiles anyway.)


For educational purposes, I will look into this. If I understand this correct, you are referring to a BNROM hack?

Author:  tepples [ Wed Nov 19, 2014 7:59 am ]
Post subject:  Re: Balloon Fight hack - Would this actually work on hardwar

It could be interpreted as BNROM or as NROM-256 rewired to take a 6264. Either way, the same board RHDE uses.

Author:  Dwedit [ Fri Nov 21, 2014 7:29 am ]
Post subject:  Re: Balloon Fight hack - Would this actually work on hardwar

I noticed that in two-player balloon trip, the game immediately ends if the first player dies, but it doesn't matter how well the second player is doing. Also, the second player starts out very low, and player 2's score does not display. And bad things happening to either player kill the music.

Author:  mikaelmoizt [ Fri Nov 21, 2014 10:11 am ]
Post subject:  Re: Balloon Fight hack - Would this actually work on hardwar

Dwedit wrote:
I noticed that in two-player balloon trip, the game immediately ends if the first player dies, but it doesn't matter how well the second player is doing. Also, the second player starts out very low, and player 2's score does not display. And bad things happening to either player kill the music.


Ah. Well, right now the two player trip mode is just a result of number of players set to "2" and game mode to "trip", so I am not surprised there are some things not working correctly.
I haven't yet added anything to support the 2 player mode, just the possibility to select it and play. So there are some work to do apparently.

Thanks for trying it out 8-)

Author:  tepples [ Fri Nov 21, 2014 10:36 am ]
Post subject:  Re: Balloon Fight hack - Would this actually work on hardwar

Is there a way to expand the ROM without making the IPS so big? In ca65 there's a way to .incbin a portion of a file, and I use that in my Solar Wars UNROM hack to insert 32K of blank space before the existing PRG ROM. You appear to do the same thing in the asm6 source of your hack. Or if you know the user is overwhelmingly likely to have Python installed, such as on Linux, you could write a Python script that inserts 16384 bytes at offset $0010 in the file, putting everything in the right place for the IPS to line up properly. Even dd, which is present in most UNIX-like operating systems, could be used for this. But not everyone who wants to try this has ca65, ASM6, dd, or Python installed to expand the ROM before applying the IPS, especially on Windows.

Author:  JRoatch [ Fri Nov 21, 2014 10:56 am ]
Post subject:  Re: Balloon Fight hack - Would this actually work on hardwar

I'm guessing if the expanded blank space is at the end of the ROM then the IPS would result in a series of RLE block.

Otherwise if the patch involves moving ranges of data around even by 1 byte, a format like vcdiff is much more suited. For example, a vcdiff patch of your UNROM hack is about 16K. xdelta 3 is a popular tool for vcdiff.

Author:  tepples [ Fri Nov 21, 2014 11:16 am ]
Post subject:  Re: Balloon Fight hack - Would this actually work on hardwar

Because of the memory layout of Balloon Fight, the empty space has to be at the beginning. In fact, most expansion patches for NES games will require insertion of blank space at the beginning because of the demands of XIP ROM on a 6502.

Dwedit suggested the xdelta UI (.vcdiff) and beat (.bps) tools, which appear to support rearrangement. But I don't think most emulators that can apply IPS on the fly can apply those. But it's still better than an IPS file that contains effectively the entire ROM.

So can we get a vcdiff for this patch?

Author:  mikaelmoizt [ Fri Nov 21, 2014 11:40 am ]
Post subject:  Re: Balloon Fight hack - Would this actually work on hardwar

tepples wrote:
Is there a way to expand the ROM without making the IPS so big?


Perhaps.
As far as I understand

Code:
incbin "16kgame.nes"


Includes entire game with first 16 bytes header, will mirror $8000-$bfff and $c000-$ffff - working just fine
Code:
incbin "16kgame.nes",$10


Skips header so you need to write it yourself. However -

Code:
(ines header with 2xprg)
org $c000 ; or base $c000
incbin "16kgame.nes",$10


Will not work. Stuck at $8000.

Since reorienting the 16k of code into upper bank, ofcourse, will cause (almost) every instruction working in absolute mode to be wrong, you somehow have to fill the space down to lower bank to get the correct address OR change (almost) every absolute mode instruction in the game to fit upper bank orientation.. :roll:
With that method the ips would be 1 byte + changes in addresses I guess?

Author:  mikaelmoizt [ Fri Nov 21, 2014 12:00 pm ]
Post subject:  Re: Balloon Fight hack - Would this actually work on hardwar

(xdelta extension not allowed for upload.. rename my file)

So..
What.. the.. 278 bytes?!

Attachments:
balloonfight.txt [278 Bytes]
Downloaded 93 times

Page 1 of 2 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/