Page 1 of 3

more games on 1 cart

Posted: Mon Oct 09, 2006 7:55 am
by downloader
Hey peepz!
Is it possible to put multiple games of 1 mapper on a board? maybe by switching it.
If so, must I use seperate eproms for each game?

or is it possibe to create a menu or something?

Re: more games on 1 cart

Posted: Mon Oct 09, 2006 8:15 am
by tepples
downloader wrote:Is it possible to put multiple games of 1 mapper on a board? maybe by switching it.
Sure is. Wire the switch to the high address bits of the PRG and CHR memories.
or is it possibe to create a menu or something?
Yes. Use a latch as your switch, put in a decoder that allows writes to a specific CPU address to write to the latch, set the power up state of the latch to point to your menu, and then have the menu code write to the latch before starting the game. The last step will have to be done from code in RAM because a bank switch takes effect immediately; it might look like this:

Code: Select all

latch = $5FFF

:
  ldx #5
  lda code_for_7F0,x
  sta $07F0,x
  dex
  bpl :-

  lda chosenGame
  jmp $07F0

code_for_7F0:
  sta latch
  jmp ($FFFC)  ; simulate reset
What games were you planning on putting in the cart?

Posted: Mon Oct 09, 2006 8:20 am
by downloader
no clue yet, but I just want to know if it was possible :P

thanx for the info man!

Posted: Mon Oct 09, 2006 11:27 am
by gannon
Wouldn't it be fairly simple to write a rom image maker that would take the given roms, and auto create the menu code for them, combining them into the binaries for burning/flashing?
Not sure if something like that exists yet or not, but it seems like it should by now :P

Posted: Mon Oct 09, 2006 12:30 pm
by kyuusaku
Not if the menu code is supposed to reside in (one of) the game banks; an unintelligent program can't tell usable empty space from data.

Posted: Mon Oct 09, 2006 9:10 pm
by tepples
kyuusaku wrote:Not if the menu code is supposed to reside in (one of) the game banks; an unintelligent program can't tell usable empty space from data.
It doesn't take much intelligence to
  1. discover a huge block of $00 00 00 00 or $FF FF FF FF in the PRG and CHR of some larger (MMC1/MMC3 class) game, or
  2. create a new bank of all empty space and shove the menu in there, such that a 15-in-1 would have 15 games and one menu.

Posted: Mon Oct 09, 2006 9:50 pm
by gannon
Yeah, I figured dedicating 1 bank just for the menu, suppose that'd be a waste of space in some (or many) instances though

Posted: Tue Oct 10, 2006 1:55 pm
by rbudrick
What about physical switches?

-Rob

Posted: Tue Oct 10, 2006 2:35 pm
by gannon
rbudrick wrote:What about physical switches?

-Rob
Well..
tepples wrote:
downloader wrote:Is it possible to put multiple games of 1 mapper on a board? maybe by switching it.
Sure is. Wire the switch to the high address bits of the PRG and CHR memories.

Posted: Wed Oct 11, 2006 4:04 am
by downloader
I think I would use a physical switch.
I think that would be the easy way for me.
I don't know JACK about programming a menu (assembling isn't my strong pint ya know)
Physical switching is possible. I played around with it a little and in theory it should work.

Posted: Wed Oct 11, 2006 7:14 am
by kyuusaku
tepples wrote:
kyuusaku wrote:Not if the menu code is supposed to reside in (one of) the game banks; an unintelligent program can't tell usable empty space from data.
It doesn't take much intelligence to
  1. discover a huge block of $00 00 00 00 or $FF FF FF FF in the PRG and CHR of some larger (MMC1/MMC3 class) game, or
  2. create a new bank of all empty space and shove the menu in there, such that a 15-in-1 would have 15 games and one menu.
But it would then require user intervention to verify that the space is acceptible since the game may not like this "empty" space to be altered.

Also what if a bank really doesn't have empty space? There's a good chance that the game will initialize to that bank and won't have the routine to switch to the menu. In this case, space will have to be made--that's a lot of intelligence IMO.

Posted: Wed Oct 11, 2006 7:33 am
by rbudrick
gannon wrote:
rbudrick wrote:What about physical switches?

-Rob
Well..
tepples wrote:
downloader wrote:Is it possible to put multiple games of 1 mapper on a board? maybe by switching it.
Sure is. Wire the switch to the high address bits of the PRG and CHR memories.
Oh, ok sorry. I must have misunderstood. Reminds me of those old pirate VCS carts with something like 1 to 8 switches on them (or maybe 1 to 4...not sure if I've ever seen one with more than 4, to be honest) to switch banks.

-Rob

Posted: Wed Oct 11, 2006 12:06 pm
by Zack S
To answer your question about spereate EPROMS. It would be a lot easier to just use on e big one for the PRG and one more for the CHR ROM.

If you do go with DIP switches or something similar, you should consider having the switch for the CHR bank seperate from the cart via a ribbon cable or something. Then you could swap out the different CHR blocks while playing the game. Granted they probably won't line up to well, but it would be ammusing none the less.

As for wiring up the switches, it's quite easy. Say you have 4 games each using 32KB of PRG ROM. The ROM gets hooked up just like it were one game. Except the extra 2 address lines (A15 and A16) would go to your switch.

If the games you want to combine are different sizes, you can either just put each game in a block size equal to the biggest or have an extra switch. As cheap as ROM's are I would recommend just wasting the memory space so you can keep the circuit simple.

Posted: Wed Oct 11, 2006 12:58 pm
by tokumaru
How would such a switch actually work? It would be used to set or clear a bit in one of the higher address lines, right? Would you do that by selecting between connecting GND or +5V to it?

Posted: Wed Oct 11, 2006 2:01 pm
by Memblers
tokumaru wrote:How would such a switch actually work? It would be used to set or clear a bit in one of the higher address lines, right? Would you do that by selecting between connecting GND or +5V to it?
Yes. 2 different ways to do it come to mind.
1. SPDT switch (3 pins), obvious way to select address between GND and 5V.
2. SPST switch (2 pins) + 10kOhm resistor (or similar). 5V connects to the address pin through the resistor. Other end of the switch connects to GND.