Rom bank switching question

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Rom bank switching question
by on (#105818)
Hi guys,
I've been working on my fx rom adapter, and I want to be able to put 3 starfox versions on 1 cartridge.
I have the famous tsop40 to 36 pin adapter integrated into my FX adapter and my question is this.
If i load all 3 game files onto the tsop40 adapter, How can I select any 1 of the 3 bank that the 3 different game codes are in?

Game 1 - ground or pull high which address lines?
Game 2 - ". "
Game 3 - ". "

And since the tsop 40 (29F032) has 4 banks, I guess I should use the last bank as well

Game 4 - ". "


A LONG time ago, I did this type of bank switching in the arcade Q*Bert days where I switched between 2 banks to switch between 2 game versions. But that was just a hi and low single line. I am guessing that I will need to toggle 2 lines? A20 and A21 ?


Thank you for any help!

The games would be starfox 1, 2, and comp weekend. 4th game not picked yet (probably stunt race) in case you are curious.


http://www.youtube.com/watch?v=MooCcCgf ... ata_player


And another question.... Why won't starfox run on yoshi' island cartridge? Or should it?? I hear the game sounds when I try it but no picture.


EDIT: figured it out. Pulling A20 high loads 2nd bank, pulling A21 high loads 3rd bank, 1st bank is A20 &21 low, and I haven't tested this yet but I am presuming that pulling both A20&21 high will load last bank.

I am curious why starfox 2 won't run on yoshi's island cartridge but will run on doom.
And yet, yoshis island will run on the doom cart. Both are GSU-2 carts.

I plan on making a star fox trilogy where all 3 are in 1 rom and I'll have a switch that selects which one loads. It would be very cool to use the last rom bank to load a menu select screen and then depending on your selection (1,2or3) it would load that game. Only star fox 2 uses save ram and it just for score rankings only, not progress. The other 2 don't use save ram at all so not conflicts there.
Anyone up to making a menu???????? It's outta my league for sure.
Re: Rom bank switching question
by on (#105867)
Look at the chip and compare to the other: Are they different chips?

If so, that's the cause!
Re: Rom bank switching question
by on (#105893)
Star Fox 2 won't run on Yoshi's Island because YI has less SRAM than Star Fox 2 needs. Doom has the most SRAM of any Super FX game and has the GSU-2 revision. It can run any Super FX software that exists. Doom lacks battery backup though.

You could certainly make a Multi-Cart with Star Fox, Star Fox Weekend Competition, and Star Fox 2. It's possible you could even create a software menu but it would be more simple to use Dipswitches. If each game is only 1 megabyte, by using just two dipswitches you can select any of the four banks. However since Star Fox 2 retains save information, as do other games, you'll need the switches or more switches to also control SRAM, either dividing it up or adding additional chips and logic to interface it.

I doubt anyone is going to post any exact details, or make a menu. But you are on the right track to just manually drive the upper address lines on the chip high or low to select the desired game. The first game, both lines are Grounded. Second game, the highest line grounded, second highest to +5v/high logic. Third game, the highest line to high and second highest to ground. Last one, both high. This is binary obviously.

For SRAM, Star Fox 2 uses 64KBytes. Star Fox 1 and Weekend use 32kb. Stunt Race FX uses 64kb. Yoshi's Island uses 32kb. If you were going to use any game that has 64KB, you might want to investigate (use an emulator) if you can have certain games use the same SRM file without corrupting the saved data from the other game. It may be possible that the saved data in Star Fox 2 and Stunt Race FX, or Yoshi's Island, could coexist. The majority of the SRAM I would guess is just used as the Super FX and game execute but isn't anything that needs to be stored.

But if you figured that would, with some switches you could divide the SRAM, the 64kb. Example, while playing Star Fox 1 and SF WC you could have the highest address line on the SRAM tied high or low, you'd have to have a switch to disconnect the pin from its normal connection, so that the RAM effectively becomes 32kb with only one half usable. This could protect the part that Star Fox 2 uses to save data, if there were to be a conflict.

But all the SRAM stuff requires you to research what parts of SRAM are used by various games. Good luck.
Re: Rom bank switching question
by on (#105897)
Could I just replace the SRAM with a bigger one on yoshi's island?

I don't think the SRAM would be corrupted but I'll test it out.
I've run other games similar to this and non save games didn't disrupt the save ram from the 1 save game. A multi game set I made a while back.

I was planning on a slide switch. A Dp3T or a Dp4T so sliding the switch would do exactly what you said... 1. LL. 2 LH 3. HL. 4. HH

A on screen menu would be nice but I'm not holding my breath.

I'm looking at seeing what it would take to add a battery and circuitry to make the Doom cart retain its save ram. I think it's possible. :).

The you tube video show the adapter, I think I'll remake it to adapt to the doom cart with the SRAM save stuff... We'll see if it works first.

Thanks for answering the question! I was puzzled about that star fox 2 not running on the yoshi cartridge.

Mark
Re: Rom bank switching question
by on (#105905)
This isn't the same as "non save games". Super FX games DO use the SRAM no matter what. The Super FX needs this RAM to do its job. This isn't like normal games that won't use SRAM even if it is there.

Yes you could add more RAM to a Yoshi's Island cartridge to allow it to play Star Fox 2, but I wouldn't do that. YI is a good game. Stunt Race FX or Dirt Trax FX could run Star Fox 2.