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

Author Topic: Excitebike Editor  (Read 15180 times)

Trax

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 537
    • View Profile
    • Trax ROM Hacking
Excitebike Editor
« on: December 15, 2010, 03:42:43 am »
Wheeee! When everyone least expected it, another editor! Excitebike editor named Biker...

Excitebike is a ridiculously simple game, with only one 16k PRG bank and one 8k CHR bank. I think the game is fun, though. Too bad there is no more than 5 tracks. Apparently, the arcade version was much more fun and allowed multiple players. Anyway, at least the tracks can be displayed correctly. The object data is very simple, with only basic RLE for repeating objects...

Any comments?

frantik

  • Hero Member
  • *****
  • Posts: 536
    • View Profile
Re: Excitebike Editor
« Reply #1 on: December 15, 2010, 08:51:53 am »
cool

care to put some of the info in a doc so a windows editor could be made?

though obviously excitebike comes with its own editor :p

PolishedTurd

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: Excitebike Editor
« Reply #2 on: December 15, 2010, 12:08:01 pm »
What would the editor allow that the game doesn't already let you do? Would you be able to create new pieces to use in a track? I guess it might be cool to store your favorite tracks and share them.

After firing up the game, I'm tempted to make the bike go a little faster when doing a wheelie...

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6937
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Excitebike Editor
« Reply #3 on: December 15, 2010, 12:11:06 pm »
I thought that all the game needed for the in-game editor to be usable was Famicom Data Recorder support in the emulator to save/load data.
"My watch says 30 chickens" Google, 2018

Jedi QuestMaster

  • Hero Member
  • *****
  • Posts: 968
  • About time, Photobucket--GOSH!
    • View Profile
Re: Excitebike Editor
« Reply #4 on: December 15, 2010, 03:01:08 pm »
What would the editor allow that the game doesn't already let you do?
Yeah, could you set things up with less restrictions?

I recall the predefined tracks having certain combinations that couldn't be done in 'Design Mode' . :-\
And I'll leave it at that!

Trax

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 537
    • View Profile
    • Trax ROM Hacking
Re: Excitebike Editor
« Reply #5 on: December 15, 2010, 06:25:54 pm »
The design function in the game does work on the NES version, but you can't save. However, with emulation, it could be fairly easy to simply make the ROM access the 0x2000 bytes the Battery RAM provides, and store track data there. Other than that, if you can access the 8000-BFFF portion of the ROM by adding a bank, you have 0x4000 bytes to create lots of extra tracks...

As for the objects, I think there is room for lots of new stuff. There are 0x24 objects in the game. Adding objects could be quite easy to do. Some of the objects are a composite of these objects. For example, the object I call "Mountain" object, like at the beginning of Track 2, is made with 3 or 4 objects, including one that is repeated a few times. The High Bump with Ramp is also made of a few parts sticked together. Another example is the "grass" object (which is more like mud), it's only one tile wide, but is repeated as needed. So yes, basically, you can create new objects from scratch with the original engine.

Here's the object list:

00 = Cool Down Arrow - Lane 4 (bottom lane)
01 = Flat Bump
02 = Mini Bump - Lanes 1-2
03 = Mini Bump - Lanes 1-2
04 = Mini Bump - Lanes 3-4
05 = Big Bump
06 = Big Jump Towards Right
07 = Medium Bump
08 = Small Bump
09 = Lap Bump
0A = Big Jump Towards Left
0B = Narrow Bump
0C = Mud Puddles - Lanes 1-3
0D = Mud Puddles - Lanes 2-4
0E = Small Jump
0F = Cool Down Arrow - Lane 1 (top lane)
10 = Cool Down Arrow - Lane 4 (bottom lane)
11 = Double Line - 4 Lanes
12 = Double Line - Lanes 3-4
13 = Double Line - Lanes 1-2
14 = High Bump with Ramp - Left Part
15 = Slope - 45 degrees (2 tiles wide)
16 = Grass - 4 Lanes (1 tile wide)
17 = Double Line - 4 Lanes
18 = Grass - Lanes 3-4 (1 tile wide)
19 = Double Line - Lanes 3-4
1A = Grass - Lanes 1-2 (1 tile wide)
1B = Double Line - Lanes 1-2
1C = High Ramp with Grass Under (1 tile wide)
1D = High Ramp with Support and Big Mud Puddle
1E = High Ramp with Support and Big Mud Puddle
1F = High Ramp End with Grass Under (1 tile wide)
20 = Elevated Ground - 4 Lanes (1 tile wide, 2 tiles elevation)
21 = Steep Incline (2 tiles elevation)
22 = Elevated Ground - 4 Lanes (1 tile wide, 6 tiles elevation)
23 = Mountain Object - Right Part
24 = Crash

It shouldn't be long before I finish disassembling the PRG bank entirely, so I'll be able to make a wrap-up of the important data and offsets...

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6937
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Excitebike Editor
« Reply #6 on: December 15, 2010, 09:39:32 pm »
The design function in the game does work on the NES version, but you can't save. However, with emulation, it could be fairly easy to simply make the ROM access the 0x2000 bytes the Battery RAM provides, and store track data there.
Again, it's because the game was written for the Famicom Data Recorder (cassette tape storage) because they hadn't invented battery back up yet.
It seems to work in VirtuaNES. (I only tested the NTSC ROM)
Load up the game, then when you want to save, click Edit -> ExtDevice -> Tape -> Record (it will ask you where to save a virtual tape), then choose the Save command in the game.
After it does saving, click Stop in the GUI.
When you want to load data, click Load in the game, then choose Play from the emu GUI (it'll ask where to load).

But I suppose you can argue those tape files can be large and it's also slow to load. I suppose an SRAM hack would solve both of those.
"My watch says 30 chickens" Google, 2018

frantik

  • Hero Member
  • *****
  • Posts: 536
    • View Profile
Re: Excitebike Editor
« Reply #7 on: December 17, 2010, 10:09:12 pm »
It shouldn't be long before I finish disassembling the PRG bank entirely, so I'll be able to make a wrap-up of the important data and offsets...

if you wouldn't mind, please publish the disassembly as well :)  the SMB dissasembly really gives a lot of insight into NES programming and i'm sure the excitebike dissasembly would as well :)   plus it opens the door to much more interesting hacks ;)

Jedi QuestMaster

  • Hero Member
  • *****
  • Posts: 968
  • About time, Photobucket--GOSH!
    • View Profile
Re: Excitebike Editor
« Reply #8 on: December 17, 2010, 10:25:21 pm »
24 = Crash
What is that? :huh:

Also, can you set the number of laps, or how long the track is?

I'd like to increase the length; I don't think I gained nearly the amount of speed I wanted to here: :P

http://www.youtube.com/watch?v=AmOUeCqvkTI
And I'll leave it at that!

Trax

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 537
    • View Profile
    • Trax ROM Hacking
Re: Excitebike Editor
« Reply #9 on: December 18, 2010, 02:22:05 am »
Here you can download Excitebike Bank 0 disassembly. Take note that the file it is bound to change anytime. Of course, if you can find any interesting data, let everyone know. What I am looking for in priority is these:

- The RAM location of the current track number
- How the game sets the "hard" parameter of a track

The game is only 1 PRG bank, and has absolutely no unused space left. If we can find the track number and make the game go on after track 5, that would be very interesting. Extra tracks could be stored in another bank. Track Data pointers are located at 0x2D3A. The byte 0x09, which is the ID for the Lap Bump object, denotes the end of the track data. There is no apparent track length limit. I presume the game engine goes on until the Lap Bump byte is read...

Some key data:

0x13D6: Palettes, with PPU command bytes. Each level has 0x13 bytes. One affects the tracks and objects, one for the crowd, and one for BG color and sprites. Followed by other palettes for sprites and intro and selection screens, and palette mappings at 0x1470.

0x1480. Basic tile mapping commands for tracks. Crowd, grass, banners, etc...

0x15B8: Text Data.

0x2D46: Beginning of Track Data. Starts with number of laps. Then each object is one byte, by ID. If an object has byte 7 set, it's an object that appears in "hard" version of the track. An object >= 0x40 is repeated, the next byte is the number of repetitions, but doesn't seem to follow bitfield logic. This means you can't simply AND the byte with 0x3F to get the track ID. 0x24 crashes the game, but 0x25-0x2F simply do nothing. Objects 0x30 and 0x31 are present in every track, but I'm not sure exactly what they are for. I think object 0x30 represents the starting blocks...

Description of Track 1 Data:

02      Number of Laps
40 10 30   30 ?
40 36 0D 31   Mud Puddles - Lanes 2-4 / 31 ?
40 07 05   Big Bump
40 02 88   Small Bump (hard)
40 02 88   Small Bump (hard)
40 1C 07   Medium Bump
40 25 10   Cool Down Arrow - Lane 4
40 0A 07   Medium Bump
40 02 07   Medium Bump
40 02 8D   Mud Puddles - Lanes 2-4 (hard)
40 39 07   Medium Bump
40 02 07   Medium Bump
40 02 07   Medium Bump
40 0E 0F   Cool Down Arrow - Lane 1
40 10 0C   Mud Puddles - Lanes 1-3
40 10 06   Big Jump Towards Right
40 05 0A   Big Jump Towawrds Left
40 2B 0E   Small Jump
40 1E 0F   Cool Down Arrow - Lane 1
40 02 0E   Small Jump
40 26 0E   Small Jump
40 02 08   Small Bump
40 02 08   Small Bump
40 02 08   Small Bump
40 02 08   Small Bump
40 02 88   Small Bump (hard)
40 12 06   Big Jump Towards Right
40 02 11   Double Line - 4 Lanes
46 0A 17   Grass - 4 Lanes (xA) / Double Line - 4 Lanes
40 14 01   Flat Bump
40 02 01   Flat Bump
40 02 81   Flat Bump (hard)
40 02 81   Flat Bump (hard)
40 02 01   Flat Bump
40 02 01   Flat Bump
40 11 30 8D   30 ? / Mud Puddles - Lanes 2-4 (hard)
40 0A 0C   Mud Puddles - Lanes 1-3
40 0B 0D   Mud Puddles - Lanes 2-4
40 03 8D   Mud Puddles - Lanes 2-4 (hard)
40 09 8C   Mud Puddles - Lanes 1-3 (hard)
40 02 0C   Mud Puddles - Lanes 1-3
40 0E 31 09   31 ? / Lap Bump

End of Track 1


And so on for all tracks...

3063: Table for Objects Tile Mappings Pointers. These pointers are for the 24 track objects data. The table starts with low-byte, then high-byte 24 bytes later.

Tile Mappings are coded this way:

First Byte = Height Offset
Goes down from initial height
When the bottom of the track is reached (0x0E), start a new column
00 = End Byte

At 0x34C7, there is a data table related to how some objects are constructed, including Mountain Object. This is not fully decrypted...

Mega-Dog

  • Jr. Member
  • **
  • Posts: 30
    • View Profile
Re: Excitebike Editor
« Reply #10 on: December 18, 2010, 08:45:17 am »
I was actually of doing an editor for this game at 1 time, but moved on to other projects...

Trax

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 537
    • View Profile
    • Trax ROM Hacking
Re: Excitebike Editor
« Reply #11 on: December 18, 2010, 10:59:13 pm »
Okay, here's what I got so far...

In ROM:

0091: Table for Default Best Times (1F bytes)

Easy Version of Tracks

01 10 00   1:16:00
01 10 00   1:16:00
01 10 00   1:16:00
01 0C 00   1:12:00
01 06 00   1:06:00

00

Hard Version of Tracks

01 18 00   1:24:00
01 16 00   1:22:00
01 0A 00   1:10:00
01 14 00   1:20:00
01 06 00   1:06:00


In RAM:

$43 = Current Track (0 = Track 1)
$46 = Hard Mode Switch (0 = Normal Mode, 1 = Hard Mode)


The Hard Mode check occurs at 0x0B4C. If $46 is 0, then the Current Track is not increased, and $46 is set to 1. If $46 is 1, the Current Track is increased, unless it's greater or equal to 4. Modifying this value lets you have the number of tracks you want. If you change nothing else, you will end up in a mysterious Track 6, with funny palettes and an infinite empty track...

I inserted an empty 0x4000 byte PRG bank just at the beginning of the ROM (after the header) and altered the header accordingly. I changed the pointer for Track 1 to point to 0x9000, I copy-pasted the original data for Track 1 at 0x1000, and everything works perfectly fine. In this case, ROM expansion really is a piece of cake...

If anyone wants to make an editor for another platform, I think there is already enough information to go on...

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6937
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Excitebike Editor
« Reply #12 on: December 18, 2010, 11:40:03 pm »
I inserted an empty 0x4000 byte PRG bank just at the beginning of the ROM (after the header) and altered the header accordingly. I changed the pointer for Track 1 to point to 0x9000, I copy-pasted the original data for Track 1 at 0x1000, and everything works perfectly fine. In this case, ROM expansion really is a piece of cake...
That is because the NES can handle up to 32KB without a mapper. In a 16KB ROM, the ROM is mapped to $C000-FFFF.
(though it is mirrored at $8000-BFFF, I don't think there was much of a point to use that part).
"My watch says 30 chickens" Google, 2018

frantik

  • Hero Member
  • *****
  • Posts: 536
    • View Profile
Re: Excitebike Editor
« Reply #13 on: December 19, 2010, 07:41:54 pm »
- The RAM location of the current track number

you wouldn't expect that to be hard to find.. but it is lol.. wtf

i did discover setting 0x51 to something like 0x22 makes some crazy glitches but the game is still playable
changing 0x52 to any value ends the level (and makes you the winner assuming you didnt take too long :D)
the early 0x4? range looks like it has something to do with level selections.. 0x42 will affect which level is loaded, and 0x44 also seems related.. edit, nm, looks like you found it right in between at 0x43 :-p
« Last Edit: December 19, 2010, 08:04:00 pm by frantik »

Yauch

  • Jr. Member
  • **
  • Posts: 35
    • View Profile
Re: Excitebike Editor
« Reply #14 on: December 19, 2010, 08:36:56 pm »
Any plans for this to support Excitebike VS?

syntax error

  • Full Member
  • ***
  • Posts: 227
    • View Profile
Re: Excitebike Editor
« Reply #15 on: December 20, 2010, 09:45:57 am »
I bought this game toghether with Super Mario and a pinball game and a sometimes not working console.I wondered why I could not save my tracks :banghead:

frantik

  • Hero Member
  • *****
  • Posts: 536
    • View Profile
Re: Excitebike Editor
« Reply #16 on: December 22, 2010, 01:38:40 am »
Here you can download Excitebike Bank 0 disassembly.

wot, no sound engine? ;)  i started trying to make an asm6 compatible assembly, we'll see if it goes anywhere.   knowing where all of the data is definitely helps a lot. :D  I  did identify the sound engine code so far (as you obviously did too lol).  luckily they stuck it on the end just like in SMB :D

some strings you didn't list
$D609:
    .hex 22 EC 07
    .hex 1D 12 16 0E FC 1E 19            ; "TIME UP"
    .hex 00

$D614:
    .hex 23 E0 50 FF

$D618:
    .hex 22 0D 07
    .hex 15 18 0A 0D 12 17 10            ; "LOADING"
    .hex 00

$D623:
    .hex 23 E0 50 FF

$D627:
    .hex 22 0D 06
    .hex 1C 0A 1F 12 17 10                ;    "SAVING"
    .hex 00

$D631:
    .hex 22 8E 05
    .hex 0E 1B 1B 18 1B                    ;    "ERROR"
    .hex 00
« Last Edit: December 22, 2010, 06:00:12 am by frantik »

Trax

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 537
    • View Profile
    • Trax ROM Hacking
Re: Excitebike Editor
« Reply #17 on: January 03, 2011, 08:13:06 pm »
Okay, so THAT is what is called Excitebike VS? Wow. This game is much better. For some reason, I thought Excitebike VS was only an arcade game, but it seems an equivalent for NES does exist. There are more tracks, better graphics in the cutscenes, high scores, slightly different sound effects, and if you cause enough bikers to crash, you gain a super power that prevents your motor from overheating. I'm working on it...

PolishedTurd

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: Excitebike Editor
« Reply #18 on: January 03, 2011, 09:47:23 pm »
Wow, that's cool. I didn't know about Vs. either. I definitely like the idea of rewarding combat between players.

And, uhh... I guess I'm never short of unsolicited new ideas, but you could also add a nitro powerup (temporary boost of speed that cannot be turned off) and a hop powerup that can only be used while both tires are down on the track, for the purpose of jumping over a player who crashes in front of you, or perhaps avoiding an obstacle or extending air time off a high obstacle.

No obligation there... I just get ideas. Looking forward to anything you might add to the game.  ;)

Trax

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 537
    • View Profile
    • Trax ROM Hacking
Re: Excitebike Editor
« Reply #19 on: January 04, 2011, 03:48:48 am »
Yeah, well, it now depends what ROM I decide to use. If it's the shitty single-bank ROM, I can use an entire 16k bank to add plenty of stuff. But I don't know about the other ROMs yet. We got the NES VS version, and I also tried the FDS version, which is even better! There is music during the races, a multiplayer mode with special exclusive tracks, and a few more tricks...

By the way. I checked the NES VS version of Excitebike, and the header says it uses mapper 63. I couldn't find any information on this mapper. Any hint?
« Last Edit: January 04, 2011, 04:04:39 am by Trax »