It is currently Fri Nov 24, 2017 8:10 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Tue Nov 18, 2014 11:42 am 
Offline

Joined: Sat Apr 12, 2014 12:11 pm
Posts: 120
Location: Gothenburg, Sweden
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 2899 times ]
ballonfighthack.ips [23 KiB]
Downloaded 137 times
ballonfighthack.asm [6.43 KiB]
Downloaded 92 times

_________________
I´ve got %01100011 problems but the BITs aint one.
Top
 Profile  
 
PostPosted: Tue Nov 18, 2014 3:06 pm 
Offline
User avatar

Joined: Fri Feb 27, 2009 2:35 pm
Posts: 214
Location: Fort Wayne, Indiana
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.


Top
 Profile  
 
PostPosted: Tue Nov 18, 2014 3:17 pm 
Offline
User avatar

Joined: Mon Jul 14, 2014 6:05 am
Posts: 89
Location: Lausanne, Switzerland
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.


Top
 Profile  
 
PostPosted: Tue Nov 18, 2014 7:43 pm 
Offline
User avatar

Joined: Sun Dec 12, 2010 10:27 pm
Posts: 291
Location: Hong Kong
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:


Top
 Profile  
 
PostPosted: Tue Nov 18, 2014 10:30 pm 
Offline

Joined: Sat Apr 12, 2014 12:11 pm
Posts: 120
Location: Gothenburg, Sweden
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-)

_________________
I´ve got %01100011 problems but the BITs aint one.


Top
 Profile  
 
PostPosted: Tue Nov 18, 2014 10:33 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19254
Location: NE Indiana, USA (NTSC)
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.)


Top
 Profile  
 
PostPosted: Wed Nov 19, 2014 1:28 am 
Offline

Joined: Sat Apr 12, 2014 12:11 pm
Posts: 120
Location: Gothenburg, Sweden
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?

_________________
I´ve got %01100011 problems but the BITs aint one.


Top
 Profile  
 
PostPosted: Wed Nov 19, 2014 7:59 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19254
Location: NE Indiana, USA (NTSC)
It could be interpreted as BNROM or as NROM-256 rewired to take a 6264. Either way, the same board RHDE uses.


Top
 Profile  
 
PostPosted: Fri Nov 21, 2014 7:29 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3951
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.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Fri Nov 21, 2014 10:11 am 
Offline

Joined: Sat Apr 12, 2014 12:11 pm
Posts: 120
Location: Gothenburg, Sweden
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-)

_________________
I´ve got %01100011 problems but the BITs aint one.


Top
 Profile  
 
PostPosted: Fri Nov 21, 2014 10:36 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19254
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
PostPosted: Fri Nov 21, 2014 10:56 am 
Offline
Formerly 43110
User avatar

Joined: Wed Feb 05, 2014 7:01 am
Posts: 313
Location: us-east
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.


Top
 Profile  
 
PostPosted: Fri Nov 21, 2014 11:16 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19254
Location: NE Indiana, USA (NTSC)
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?


Top
 Profile  
 
PostPosted: Fri Nov 21, 2014 11:40 am 
Offline

Joined: Sat Apr 12, 2014 12:11 pm
Posts: 120
Location: Gothenburg, Sweden
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?

_________________
I´ve got %01100011 problems but the BITs aint one.


Top
 Profile  
 
PostPosted: Fri Nov 21, 2014 12:00 pm 
Offline

Joined: Sat Apr 12, 2014 12:11 pm
Posts: 120
Location: Gothenburg, Sweden
(xdelta extension not allowed for upload.. rename my file)

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


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

_________________
I´ve got %01100011 problems but the BITs aint one.
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group