UNROM 8 IN 1 Multicartridge

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderator: Moderators

User avatar
FARID
Posts: 499
Joined: Wed Apr 07, 2010 1:14 am
Location: Iran
Contact:

UNROM 8 IN 1 Multicartridge

Post by FARID »

Making this multicartridge was a little tough, because I had to convert the NROM menu (CHR-ROM) to UNROM (CHR-RAM)
Also there is no WRAM, so I couldn't use my usual trick for generating the clock signal (STA 6000 ~ 7FFF), Instead of that I found out that I can expand the original mapper register and use the free line of original 74HC161 of UNROM to generate the clock signal :

Menu :
Image

Test on Breadboard :
Image

Front :
Image

Back :
Image

Cover :
Image

Mapper Schematic :
Image

Chips :
27C080 --> PRG-ROM
6264 --> CHR-RAM
74HC32 --> UNROM Mapper
74HC161 --> UNROM Mapper
74HC161 --> Latch

Download Multicartridge Menu Patch :
MenuPatch.zip
(42.12 KiB) Downloaded 374 times
Patch it to the original "Rush'n Attack (U) [!].nes"

PRG Structure :
PRG1 --> Rush'n Attack (U) [!].prg (Patched)
PRG2 --> Castlevania (U) (PRG1) [!].prg
PRG3 --> Metal Gear (U) [!].prg
PRG4 --> Jackal (U) [!].prg
PRG5 --> Rygar (U) (PRG1) [!].prg
PRG6 --> Megaman (U) [!].prg
PRG7 --> Duck Tales (U) [!].prg
PRG8 --> Duck Tales 2 (U) [!].prg

Register Bits (FFF0 ~ FFF7) :
D7........D0
ABCD EFGH
A --> D7 --> Clock Generator
B --> D6 --> PRG A19
C --> D5 --> PRG A18
D --> D4 --> PRG A17
E --> D3 --> Latch [0:EN 1:DIS]
F --> D2 --> X
G --> D1 --> X
H --> D0 --> X

Registers' Value :
GAME1 --> 1000 1XXX --> 1000 1111 --> 8F --> FFF0 --> Rush'n Attack (U) [!].nes [+Menu]
GAME2 --> 1001 1XXX --> 1001 1111 --> 9F --> FFF1 --> Castlevania (U) (PRG1) [!].nes
GAME3 --> 1010 1XXX --> 1010 1111 --> AF --> FFF2 --> Metal Gear (U) [!].nes
GAME4 --> 1011 1XXX --> 1011 1111 --> BF --> FFF3 --> Jackal (U) [!].nes
GAME5 --> 1100 1XXX --> 1100 1111 --> CF --> FFF4 --> Rygar (U) (PRG1) [!].nes
GAME6 --> 1101 1XXX --> 1101 1111 --> DF --> FFF5 --> Megaman (U) [!].nes
GAME7 --> 1110 1XXX --> 1110 1111 --> EF --> FFF6 --> Duck Tales (U) [!].nes
GAME8 --> 1111 1XXX --> 1111 1111 --> FF --> FFF7 --> Duck Tales 2 (U) [!].nes

It would be nice if someone can emulate this cartridge.
Last edited by FARID on Tue Apr 14, 2020 3:12 pm, edited 8 times in total.
natt
Posts: 76
Joined: Fri Oct 26, 2012 5:27 pm

Re: UNROM 8 IN 1 Multicartridge

Post by natt »

FARID wrote: It would be nice if someone can emulate this cartridge.
Taking a look over this, I could easily add it to Bizhawk. It would be UNIF only though.
User avatar
FARID
Posts: 499
Joined: Wed Apr 07, 2010 1:14 am
Location: Iran
Contact:

Re: UNROM 8 IN 1 Multicartridge

Post by FARID »

I really appreciate you, thanks.
natt
Posts: 76
Joined: Fri Oct 26, 2012 5:27 pm

Re: UNROM 8 IN 1 Multicartridge

Post by natt »

Does the second 74'161 clear on the reset button or just on hard power?
User avatar
FARID
Posts: 499
Joined: Wed Apr 07, 2010 1:14 am
Location: Iran
Contact:

Re: UNROM 8 IN 1 Multicartridge

Post by FARID »

natt wrote:Does the second 74'161 clear on the reset button or just on hard power?
What do you mean by "second"?
Do you mean the Latch 161?
The reset circuit (D1, R1, C1) clears the latch 161 by pushing the reset button
But nothing can clear the UNROM 161 because it is originally tied to 5V
natt
Posts: 76
Joined: Fri Oct 26, 2012 5:27 pm

Re: UNROM 8 IN 1 Multicartridge

Post by natt »

Yeah, that's what I needed.

The board is supported in Bizhawk as of r6204.

Here's a UNIF header that should work:
http://www.mediafire.com/download/xt2c9 ... header.unf

Concatenate the exactly 1MiB of PRG rom on the end of that, and it works in Bizhawk.
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: UNROM 8 IN 1 Multicartridge

Post by lidnariq »

Just for anyone else's reference, natt gave this the UNIF MAPR FARID_UNROM_8-IN-1.
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: UNROM 8 IN 1 Multicartridge

Post by lidnariq »

Oh, unrelated question, not important: Why not just connect the multicart latch to /ROMSEL as normal? You've already got the self-disable bit on Q3, so it's not like it'll be accidentally triggered afterwards...

For ease of wiring, you can use A0 (like Maxi 15) instead of M2 (like most other multicarts)—at worst, it toggles at 1/10th the frequency so a difference choice of R·C might be necessary.
User avatar
FARID
Posts: 499
Joined: Wed Apr 07, 2010 1:14 am
Location: Iran
Contact:

Re: UNROM 8 IN 1 Multicartridge

Post by FARID »

@ natt
Great, thank you very much :D

@ lidnariq
connect the multicart latch to /ROMSEL as normal
What do you mean by "multicart latch"?
you can use A0 (like Maxi 15) instead of M2 (like most other multicarts)—at worst, it toggles at 1/10th the frequency so a difference choice of R·C might be necessary
Can you please explain how can I calculate the correct value of them?
Digital logic is easy for me to understand, but I don't know how to design a precise analog circuit.
Please introduce me a good resource for learning this subject. Thanks
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: UNROM 8 IN 1 Multicartridge

Post by lidnariq »

FARID wrote:
lidnariq wrote:connect the multicart latch to /ROMSEL as normal
What do you mean by "multicart latch"?
The 74161 that you added, the one selects a 128KiB slice.
you can use A0 (like Maxi 15) instead of M2 (like most other multicarts)—at worst, it toggles at 1/10th the frequency so a difference choice of R·C might be necessary
Can you please explain how can I calculate the correct value of them?
Currently you're using 2.2kΩ and 100nF. 2.2kΩ · 100nF = 220µs. That's so much bigger than the low time of M2 (which is only 210ns) that the capacitor is guaranteed to stay charged so long as M2 continues oscillating. (Even if A0 is going at 1/10th the rate of M2 in the worst case, a factor of 100 is still adequate)

The other bound here is that it needs to be less time than a person might plausibly hit the reset button for. Generally we assume that a person won't be able to hit a button for less than about 5-10ms, and we've got a factor of 20-40 here, which is plenty. (A factor of 3 should be good enough).

There's one last factor: you're using a 74161 (no letters), rather than 74S, 74LS, 74HC, or anything else. This means that there's a different amount of current requires to drive a pin high or low than for other technologies. The 74161 will source up to 1.6mA of current into an input that's at 0.4V. This affects the choice of resistor: it must be able to sink more current than the gate will source such that the system of just gate and resistor will still read as low logic level. Throwing the reference stage from the SN7406 datasheet into a simulator, it looks like any resistor smaller than 2.4kΩ should work.

Meanwhile, 74LS gates only need to have .36mA drawn out of them to represent a logic low, and 74HC gates are entirely voltage-based.
Please introduce me a good resource for learning this subject.
Can you get a copy of Horowitz & Hill's The Art of Electronics? It's more or less the go-to for analog EE. Practical Electronics for Inventors is a nice hands-on guide. I haven't really looked around on the internet for good sources, unfortunately. I like Falstad's circuit simulator (requires java), but it's not clear how well that will teach theory.
User avatar
FARID
Posts: 499
Joined: Wed Apr 07, 2010 1:14 am
Location: Iran
Contact:

Re: UNROM 8 IN 1 Multicartridge

Post by FARID »

The 74161 that you added, the one selects a 128KiB slice.
I know you are referring to it but the main question is how to connect it to /ROMSEL?!

Analog Circuit seems very complicated!
Thank you for introducing the books.
I found both of them.
But they are really bulky :
The Art of Electronics - 2nd Edition - Paul Horowitz - 1041 Pages
Practical Electronics for Inventors - Paul Scherz - 625 Pages
I think reading them will take my whole life! :mrgreen:
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: UNROM 8 IN 1 Multicartridge

Post by lidnariq »

FARID wrote:
lidnariq wrote:The 74161 that you added, the one selects a 128KiB slice.
I know you are referring to it but the main question is how to connect it to /ROMSEL?!
Oh! sorry. I meant why not connect /ROMSEL instead of Q7 to its ↑CLK input? Right now you have to write $00 followed by $88|(bank), but I don't why the circuit couldn't be made such that the first write were unnecessary.
I think reading them will take my whole life! :mrgreen:
Have fun! :D
User avatar
FARID
Posts: 499
Joined: Wed Apr 07, 2010 1:14 am
Location: Iran
Contact:

Re: UNROM 8 IN 1 Multicartridge

Post by FARID »

I meant why not connect /ROMSEL instead of Q7 to its ↑CLK input?
Are you sure /ROMSEL remains stable enough to serve as a clock signal?
There is at least one necessary bank switch at the start up for loading the menu bank
The bank number is 06 (0000 0110) so at that point D7 will remain 0 and won't generate any unwanted clock signal
but I don't why the circuit couldn't be made such that the first write were unnecessary.
There are too many negative verbs, I can't understand it :shock:
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: UNROM 8 IN 1 Multicartridge

Post by lidnariq »

FARID wrote:
I meant why not connect /ROMSEL instead of Q7 to its ↑CLK input?
Are you sure /ROMSEL remains stable enough to serve as a clock signal?
Well, the original UNROM hardware uses it.
The bank number is 06 (0000 0110) so at that point D7 will remain 0 and won't generate any unwanted clock signal
Sure, but it's the process of writing $08 that prevents further writes to the outer bank select, so that shouldn't matter. As long as the values written have that bit clear, it should be fine...
FARID wrote:There are too many negative verbs, I can't understand it
Er. "A different layout seems to make this extra write unnecessary. Why not do it that way?"
User avatar
FARID
Posts: 499
Joined: Wed Apr 07, 2010 1:14 am
Location: Iran
Contact:

Re: UNROM 8 IN 1 Multicartridge

Post by FARID »

Well, the original UNROM hardware uses it.
Yes the original UNROM 161 uses /ROMSEL as the clock signal, but it uses another important signal too, CPU R/W --> Load
I don't think /ROMSEL can handle the Latch 161 just by itself
Post Reply