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

Author Topic: Biker 1.0 - Release  (Read 3989 times)

Trax

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
    • Trax ROM Hacking
Biker 1.0 - Release
« on: April 11, 2013, 11:33:32 pm »
Here we go...

After much struggle and despair, I finally release a piece of software that will probably be used by exactly 0 people on the entire planet Earth, which is almost funny by itself. It reminds me of Jean-Lou in Radio Enfer who runs for class president and loses 124 to 0 (he didn't even vote for himself!). But don't worry, I'm not trying to be cynical, nor am I trying to garner attention. There are a few reasons why I think it's not that relevant:

- The game is very old, very simple and short.
- Latest consoles recently started releasing obcene amounts of retro games (or spin-offs), some of them with more (cool) features than the original. This includes Excitebike for Wii and Gameboy Advance, with better graphics and the possibility to create your own tracks and save them.
- The app is for Mac.

Yet, I do it because I love ROM Hacking for what it is, and I love programming as well. Because I actually prefer the act of hacking a ROM, sometimes I just find the information, document it, but never find time to actually create a hack. I know that my work could be useful to other people, so I'm OK with that...

The main reason why I bumped into so many tree roots is because I was determined to make it expandable, i.e., add tracks and make them longer. The problem is that Excitebike has litterally no free space left. BUT! It also has only one PRG bank, which means adding a complete 0x4000 bytes bank to the ROM is a piece of cake...

From that, I said to myself, great, we are now free to use this bank to put any amount of new data. In practice, it was not so easy. Redirecting a pointer to the new bank is trivial, but it doesn't stop here. The pointer table itself is stuck in a contrived bank, so you have to move the pointer table. But then, you need to find the variable, or variables, that control the total number of tracks in the game. That's for the track data, which was the easiest part...

There is two other major parts of the game that needs to be addressed to make a coherent hack. Best Times and Palettes. If you only try to extend the track data, you will probably get away with it, but as soon as you exceed the 5 tracks limit, you end up with weird palettes. Again, you must move the palettes pointer table to the new bank, and reconstruct it accordingly. But wait, there are also other palettes related to parts of the game you don't necessarily want to change in the same way you want to change the tracks. From this point on, it becomes more technical, so I won't explain everything, although if time permits, I could share all the details on my own website...

And all that for a few more tracks. Sometimes it feels like it was not worth the trouble. But I couldn't realize it unless I actually worked on it. Anyway. Because of memory limitations (CPU memory), the game doesn't allow more than 20 tracks. More than that would mean that some memory locations would be overwritten and trigger all sorts of glitches...

So here's a screenshot:

And you can download the editor here: Biker 1.0

If I find time and motivation, I may as well try to make other versions of the game (NES VS and Famicom) editable as well. The track data is the same, so it could be relatively easy to add such feature...

As usual, if you have any questions, suggestions, or if you want to know about the data locations, or source code, let me know...

MathUser2929

  • Hero Member
  • *****
  • Posts: 1571
    • View Profile
Re: Biker 1.0 - Release
« Reply #1 on: April 12, 2013, 05:14:34 am »
Do we have to expand the ROM ourselves? If the program does that it'd be the most useful. There already is a Excitebike editor for Windows I think, but it don't let you add more tracks. Just edit the available ones.

Trax

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
    • Trax ROM Hacking
Re: Biker 1.0 - Release
« Reply #2 on: April 12, 2013, 08:03:56 am »
Yes, when you open a fresh ROM, the editor will detect if the ROM needs expansion and will execute the expansion automatically if needed...

RadioTails

  • Sr. Member
  • ****
  • Posts: 338
  • Holding the Mega Drive controller
    • View Profile
Re: Biker 1.0 - Release
« Reply #3 on: April 13, 2013, 04:52:23 pm »
This does look really cool. Shame I'm a Windows user.

What did you code this in?
Avatar by LazyNinjartist

Trax

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
    • Trax ROM Hacking
Re: Biker 1.0 - Release
« Reply #4 on: April 14, 2013, 05:57:52 am »
It's coded in Objective-C, using the Cocoa framework. Most of the code, like pointers arithmetic and arrays, is standard C. The "objective" part is mostly used to interact with the visual interface elements...

snarfblam

  • Submission Reviewer
  • Hero Member
  • *****
  • Posts: 590
  • CANT HACK METROID
    • View Profile
    • snarfblam
Re: Biker 1.0 - Release
« Reply #5 on: April 14, 2013, 09:22:02 am »
Trax, I like your editors. I wish I were a competent C programmer. I'd gladly port them (with your blessing, only, of course).

Trax

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
    • Trax ROM Hacking
Re: Biker 1.0 - Release
« Reply #6 on: April 18, 2013, 04:28:32 am »
Thanks for the support, guys, it's appreciated...

Another thing I keep in mind when I make en editor is the possibility that it inspires someone else to port it, or improve one that already exists. I don't know if it ever happened, but I still think it has a positive effect on the ROM hacking community. Good examples are Arkanoid, where the only other editor runs on DOS and is not very complete, and Contra, which has never seen the day on Windows, although there were a few tries...

The search goes on!

snarfblam

  • Submission Reviewer
  • Hero Member
  • *****
  • Posts: 590
  • CANT HACK METROID
    • View Profile
    • snarfblam
Re: Biker 1.0 - Release
« Reply #7 on: April 18, 2013, 04:53:50 pm »
Trax, if all the under-the-hood stuff is mostly in plain-old-C, and you're willing to share the source, I'd gladly port it to C#. It wouldn't be the first program I've ported from C to C#.

Trax

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
    • Trax ROM Hacking
Re: Biker 1.0 - Release
« Reply #8 on: April 22, 2013, 09:22:28 am »
There you go...

Biker 1.0 Source Code

Your main point of concern is the file BWTrack.m. You may struggle with some parts since there's not a lot of comments, and my code can be downright cryptic in some places. Objective-C is a very verbose language, so you can easily deduce what a function does by its function name. Everything else related to pointer calculations, data loading and array manipulations is quite straightforward...