Excitebike saving/loading

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Excitebike saving/loading
by on (#110377)
I was annoyed, even since the 80's that I was not able to save my tracks on "Excitebike". Obviously the cartridge doesn't have SRAM and that explains that, but I've read somewhere that Excitebike was designed to work with some other kind of additional hardware (some kind of taperecorder a'la C64?) for saving/loading of tracks.
Would be interesting to know the facts concerning this matter. Anyone knows and actually tried it?
I've done some quick debugging and the game is obviously messing around with $4016 during saving. I can't recall I've ever seen an emulator support Excitebike-saves...(?)
Re: Excitebike saving/loading
by on (#110378)
I'm guessing it uses some of the additional latched outputs on $4016 to generate the audio that's recorded to cassette.
Re: Excitebike saving/loading
by on (#110380)
I would guess the easiest way to get it working in an emulator (or with the powerpak) would be to add SRAM and intercept the $4016 writes.
Re: Excitebike saving/loading
by on (#110383)
What would the SRAM store?
Re: Excitebike saving/loading
by on (#110384)
I remember some emulator actually supports the Family BASIC data recorder. I forget which.
Also:
http://wiki.nesdev.com/w/index.php/Fami ... a_Recorder
and
http://nesdev.com/tapedrv.PNG
Re: Excitebike saving/loading
by on (#110385)
lidnariq wrote:
I remember some emulator actually supports the Family BASIC data recorder. I forget which.
I think VirtuaNES does support it.
Re: Excitebike saving/loading
by on (#110387)
blargg wrote:
What would the SRAM store?

I meant battery backed WRAM. Change the STA $4016 to JMP writeBitToRam
Re: Excitebike saving/loading
by on (#110388)
There's going to be a lot of bits, given the encoding scheme. You'd also need a timebase since the delay between writes is critical (without that you'd likely just see 0 1 0 1 0 1).
Re: Excitebike saving/loading
by on (#110390)
The point was made here that intercepting the normal routine would only allow one save, and it would be better to write a new one with a menu for multiple saves. (And you would avoid all the tape protocol overhead.)
Re: Excitebike saving/loading
by on (#110394)
Here is a mod to get the tape drive audio I/O on the NES, sent in by sepi.

edit: Just noticed lidnariq already linked to this, n/m. :)
Re: Excitebike saving/loading
by on (#110397)
I remember poking around the load/save routines on Excitebike. If I recall correctly, the bits are encoded with frequency modulation. As in, a "1" bit is /¯\_/¯\_/, and a "0" bit is /¯¯¯\___/. (Or was it the other way around?)

So yes, it was indeed designed for a casette recorder, but we never got it in the US. :\
Re: Excitebike saving/loading
by on (#110400)
I don't suppose you happen to recall where in the ROM the code is? For curiosities' sake, I'm trying to collect which games use what protocol and record it in the wiki.
Re: Excitebike saving/loading
by on (#110439)
The saving/loading of Excitebike is pretty much a mess (for my eyes anyway) and it's very hard to debug in FCEUX since it doesn't emulate a taperecorder. Anyway, I've managed to create an SRAM patch instead. Available on my website..
Re: Excitebike saving/loading
by on (#110460)
Surely there's some routine that SAVE calls. So patch that out to just copy the entire NES RAM, and have LOAD just reverse that. No need to only save/load what the game does, unless some things should be preserved (high score maybe?).
Re: Excitebike saving/loading
by on (#110461)
What I did during my investigations into Wrecking Crew & Castle Excellent was change the writes from $4016 to $4011 to record the saved signal as a WAV file in an emulator. Loading won't work, of course...
Re: Excitebike saving/loading
by on (#189532)
Hi there!

Sorry for upping this old topic, but I have registered here specially because of it.

I was looking for information about rom hacks of Excite Bike that could save tracks... without luck.

I know that Virtual Console version does, so I extracted that ROM to figure out if it was an emulator feature or a ROM modification.

It turned out it was a ROM modification, because in emulators the save / load feature works and this ROM creates an SRM file. Also, the ROM doubles the size of the original Excitebike one. The sad thing is it only saves one track, wasting a lot of the SRAM memory because each track I think it's only 256k.

Have anyone tried it before? Could it open the door for someone with some programming skills to hack it and put a selection menu where to choose from a number of slots which track to save / load?


Btw, sorry for my english, I'm spanish native :P
Re: Excitebike saving/loading
by on (#189546)
I don't think anyone's made a rom hack to Excitebike to make the save/load work, but it doesn't seem like it'd be difficult to allow more than one track to be saved.

First, you'd need to figure out if the tracks are variable-sized or not. If the tracks are always the same size, it's easy; the next track is always XXX bytes after the current track. If they're variable sized, things get trickier, but not impossible. The easiest thing to do would be to determine what the biggest track size is, and then always leave that much space, and then you do the same thing as before; the next track is always XXX bytes after the current. You could fit more tracks into the save file if you only save the exact amount of bytes the track needs, but then things get complicated when you want to do certain things; like if you have 5 tracks and you want to delete track 3, or save over track 4.

After figuring out how to store the tracks in the save memory, you'd need to create a menu for selecting which slot to save to or load from, and you'd probably want to be able to give each track a name, or at least show which slots are empty and which ones have data. You'd also need to modify the existing menu so that SAVE and LOAD go to the new menu you just programmed.
Re: Excitebike saving/loading
by on (#189564)
Well, thanks for the answer.

Dooing a little more reserach, tt seems that somebody "did" a patch for SRAM before:

http://www.romhacking.net/hacks/2428/

That is a patch that converts the original ExciteBike ROM to the Virtual Console version. I don't know if the person who "made" that patch basically extracted the rom from the VC release and created an IPS file with the differences. It really seems so, because the ROMS are almost identical except for his "credits".

Anyway, I don't know at all how to do what you're saying. I know each track is 256Kb in memory, and the length of the track is basically specified with the Finish Line object. There is where it ends, but the memory used is 256Kb long in any case.

It would be really nice if someone is interested enough to build a version with a track selection menu :roll:
Re: Excitebike saving/loading
by on (#189910)
I did that patch. It's also available from my website at http://nes.goondocks.se/.
I didn't use some kind of Virtual Console ROM, it's just an ordinary Excitebike ROM-file. I patched the cassette-recorder stuff to write to SRAM instead.
Re: Excitebike saving/loading
by on (#190136)
Oh, great patch then! I downloaded the VC game and extracted it's rom and it was almost identically, that's why I guessed that.

I suppose adding slots will be too much difficult...

Btw, I have seen great patches in your page. I want to try the arcade Duck Hunt on the NES, I always wanted to shoot the Dog! :D