This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

NES Zelda Multicart

NES Zelda Multicart
by on (#121729)
Interested in doing something like this game I found on eBay. Not to sell, I just like making my own reproductions so that I do not have to pay crazy prices for them. He created 4 of the Zelda hacks into a single cart, with a menu or something so that you can switch between games. Any idea how this was done??

Edit: Actually he stated that you can hit the reset button, and then it switches to a different rom on the cart somehow?

Image
Re: Reset to switch game + Compiling roms to 1 file?
by on (#121730)
The cartridge probably detects reset by loss of oscillation on the M2 (CPU clock) pin, and this feeds a counter that controls the upper address lines. Standard operating procedure for pirate multis.

What I want to see is The Legend of Zelda/The Legend of Bagger Vance/The Legend of Korra/The Legend of Sleepy Hollow multi, with hidden extras The Legend of Max, The Legend of Bag, and The Legend of Art (NSFW). (period)
Re: Reset to switch game + Compiling roms to 1 file?
by on (#121733)
This triggered my memory of a post I saw on hackaday. http://hackaday.com/2011/05/19/nes-multi-cartridge/#more-43216
Re: Reset to switch game + Compiling roms to 1 file?
by on (#121743)
tepples wrote:
The cartridge probably detects reset by loss of oscillation on the M2 (CPU clock) pin, and this feeds a counter that controls the upper address lines. Standard operating procedure for pirate multis.

I wonder how they do it in Atari 2600 cartridges, since the cartridge connector in that system doesn't provide any fancy signals... It has 8 data lines, 13 address lines, GND and +5V (plus a "shield ground" which I have no idea what it's used for). How do you detect a reset with that? I don't have any carts that do this with me anymore, but I know for a fact they exist because I had a couple of them when I was a kid.
Re: Reset to switch game + Compiling roms to 1 file?
by on (#121746)
Note that you can detect a reset in software pretty easily. The OP is talking about detecting a reset in hardware only so you can bank between multiple unmodified ROM images within a single cart. I'm not 100% sure what you are referring to with the 2600 carts.
Re: Reset to switch game + Compiling roms to 1 file?
by on (#121752)
tokumaru wrote:
I wonder how they do it in Atari 2600 cartridges, since the cartridge connector in that system doesn't provide any fancy signals... It has 8 data lines, 13 address lines, GND and +5V (plus a "shield ground" which I have no idea what it's used for). How do you detect a reset with that? I don't have any carts that do this with me anymore, but I know for a fact they exist because I had a couple of them when I was a kid.
I took an Argentinian pirate multicart for the 2600 apart earlier this year: viewtopic.php?p=107406#p107406
(They use Vcc to clock the counter, and use a diode-capacitor to make a "UPS"-ed supply for the counter). My 2600 doesn't have a reset button, per se...
Re: Reset to switch game + Compiling roms to 1 file?
by on (#121769)
qbradq wrote:
The OP is talking about detecting a reset in hardware

tepples did suggest a hardware solution.

Quote:
I'm not 100% sure what you are referring to with the 2600 carts.

tepples' solution might work on an NES, but since the 2600 doesn't make the same signals available to the cartridge, I was wondering how they handled the same situation in multicarts for that system that require power cycles to select games. BTW, thanks lidnariq for the explanation.
Re: Reset to switch game + Compiling roms to 1 file?
by on (#121780)
Couldn't the hardware just watch the CPU's A0 line? It would be oscillating whenever it was running, but I'm pretty sure stopped when held in reset.
Re: Reset to switch game + Compiling roms to 1 file?
by on (#121781)
Yeah, A0 would be fine too, Maxi 15 uses that.
You'd need to use a lowpass that was at most 1/4 the frequency as the one for M2, because A0 could remain low for two full instruction cycles in a row.
Re: Reset to switch game + Compiling roms to 1 file?
by on (#121797)
The worst case I can think of for A0 is oscillating at 1/8 of M2. Consider instruction $23 RLA (d,X), which takes 8 cycles:
  1. RLA
  2. operand d
  3. Internal operation: Add X to d
  4. Retrieve indirect address low byte
  5. Retrieve indirect address high byte
  6. Read from address
  7. Write unmodified value
  8. Write modified value
Now consider a case where the instruction begins on an odd address, the operand is even, X is even, and the indirect address is odd. This produces the following for A0:
  1. RLA: Odd
  2. d: Even
  3. IO: Even (I think)
  4. Low byte: Even
  5. High byte: Odd
  6. Read: Odd
  7. Modify: Odd
  8. Write: Odd
Repeat this process and A0 ends up dividing M2 by almost eight.
Code:
entry_C000:
  ldx #$01
  stx $FE
  stx $FF
  dex
  ; PC is now $C007
rlaloop:
  rla ($FE,x)  ; A0: 10001111
  rla ($FE,x)  ; A0: 10001111
  rla ($FE,x)  ; A0: 10001111
  rla ($FE,x)  ; A0: 10001111
  ; repeat this several times
  jmp rlaloop  ; A0: 101
Re: Reset to switch game + Compiling roms to 1 file?
by on (#122179)
Well I found this link that is done by the same person as the link above:

http://callanbrown.com/index.php/super- ... -multicart


I wired up the multi cart with all the zeldas, just like the link above, minus the wires to the chr, since the zeldas only use prg replacement. Game boots, but does not switch games when you h it reset?
Re: Reset to switch game + Compiling roms to 1 file?
by on (#122182)
Make sure you've wired the '161 correctly: specifically pins 1,2,7,9, and 10.
Re: NES Zelda Multicart
by on (#124882)
Yep everything was wired correct as far as I can see.
Re: NES Zelda Multicart
by on (#124883)
Are you using a top-loader, or equivalently have you disabled your NES's CIC?
Re: NES Zelda Multicart
by on (#124889)
I tried on toaster as well as toploader. All standard, unaltered equipment. Not sure if that would matter, as regular repros work fine.
Re: Reset to switch game + Compiling roms to 1 file?
by on (#124906)
Tormenter wrote:
Well I found this link that is done by the same person as the link above:

http://callanbrown.com/index.php/super- ... -multicart


I wired up the multi cart with all the zeldas, just like the link above, minus the wires to the chr, since the zeldas only use prg replacement. Game boots, but does not switch games when you h it reset?


This one you linked will only work on the Front Loading "toaster" NES model. It uses a reset signal on the CIC to clock the 74*161 chip.
Re: NES Zelda Multicart
by on (#124907)
I was eventually getting to where Mottzilla stated. ;)

I can think of a few possible reasons your build isn't working:

1a- The 74'161's /MasterReset line (pin 1) is always low, pinning its outputs at 0 forever
1b- The 74'161s +CountEnablePulse (pin 7) or +CountEnableCarryIn (pin 10) lines are low, disallowing alternations on the ClocK line from causing the outputs to increase
1c- The 74'161s /ParallelEnable (pin 9) input is always low, causing the outputs be always reloaded from D0..D3 instead of incrementing.
1d- The 74'161s power (pins 8 and 16) isn't connected properly
2- The 74'161's ↑ClocK line (pin 2) isn't ever alternating. A design that uses /CIC RESET OUT as a clock source will only work on frontloaders with a functioning CIC. You should probably use this design that uses a diode, resistor, and capacitor that I've seen in a lot of other multicarts.
3- The 74'161's Q0 and Q1 lines (pins 14 and 13) aren't successfully connected to the ROM's address lines (A18 and A19).
Re: Reset to switch game + Compiling roms to 1 file?
by on (#126181)
MottZilla wrote:
Tormenter wrote:
Well I found this link that is done by the same person as the link above:

http://callanbrown.com/index.php/super- ... -multicart


I wired up the multi cart with all the zeldas, just like the link above, minus the wires to the chr, since the zeldas only use prg replacement. Game boots, but does not switch games when you h it reset?


This one you linked will only work on the Front Loading "toaster" NES model. It uses a reset signal on the CIC to clock the 74*161 chip.


Okie just got around to testing this on a front loader, still does not work. Ya hit reset, and the game just resets, does not switch to the next boot.
Re: NES Zelda Multicart
by on (#126182)
This is how I have it wired on a AM27C040

Image