Building a reset-based cartridge using a 74LS74/161/163

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

Moderator: Moderators

User avatar
MaarioS
Posts: 149
Joined: Wed Jul 22, 2009 8:53 am

Building a reset-based cartridge using a 74LS74/161/163

Post by MaarioS »

Hey there once again!! As the title suggests, I want to build a reset based cartridge which means when you turn the cartridge on- the console selects the first game but when you push the reset button, it switches to the next one.

As far as I know a 74LS74 chips includes 2x D-type flip-flops which apparently can switch through up to 2 or 4 different games. I know how to use it in a 2-in-1 game cartridge, just connect it like that:
Image

I can easily say this setup almost works. Well the only downfall of that is that when you turn the console on, it selects THE SECOND game right away but other than that the reset works perfectly fine. When you push reset, it switches to the first one and after you push reset once again, it runs the second game again and so on. What should I do to make the console run the first game right away??


My second and more serious problem is that I want to also build a 4in1 cartridge and as long as I'm concerned I can still use the 74LS74 in this case but how should I connect it??

But my biggest problem is that I also want to build a 8in1 cartridge and the 74LS74 is no longer useful in this case but apparently you can use a 4bit binary counter such as 74LS161/163.

So first of all, what's the difference between 161 and 163?? Second, how am I supposed to connect it in a FAMICOM cartridge?? Here's some schematics provided by @CallanBrown
Image

Making sense of these 2 schematics, I tried to connet my 74LS161 chip to my custom 8in1 cartridge this way (assuming that I use 8 different games with size 512KB each, the chip has to control 3 higher addresses A19, A20 & A21):
Image

After that it results the cartridge doesn't work.... Well technically it works, when you turn the console on, it shows the first game but when I push the reset button, it rarely switches through and when it does, it selects a random game but most the time it doesn't do anything.... What should I do to make it work?? Any kind of help or suggestions will be strongly appreciated!! Big thanks in advance!!
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Building a reset-based cartridge using a 74LS74/161/163

Post by lidnariq »

Your M2 / reset detection circuit is not going to work correctly.

Try this one.
User avatar
MaarioS
Posts: 149
Joined: Wed Jul 22, 2009 8:53 am

Re: Building a reset-based cartridge using a 74LS74/161/163

Post by MaarioS »

Great suggestion!! As far as I understand it should be connected this way to the pin 01 (clear)??
Image
where resistor=10K & cap=100pf (101)

But how about the pin 02 (clock)?? Should it be connected directly to M2 connector??
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Building a reset-based cartridge using a 74LS74/161/163

Post by lidnariq »

You forgot the diode... Also you're using /RESET to switch between games, not clear the register: connect the output of the /RESET detector to ↑CLK instead of /CLEAR.

The difference between the '161 and the '163 is that the '163 will ignore /CLEAR until CLK rises, while the '161 will react to /CLEAR being low immediately.
User avatar
MaarioS
Posts: 149
Joined: Wed Jul 22, 2009 8:53 am

Re: Building a reset-based cartridge using a 74LS74/161/163

Post by MaarioS »

Ah that's right, forgot about the diode, sorry.... Should I use that standard 1N4148 diode??
Image

By the way, I don't quite understand the naming. What's "↑CLK " and /RESET detector?? What should I connect to what?? I'm not quite good in special naming so I'd be grateful if you explained it to me in more simple language
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Building a reset-based cartridge using a 74LS74/161/163

Post by lidnariq »

1N4148 or 1N941 or any other cheap signal diode is fine. Power diodes (like the 1N400x) are too slow, though.

"↑CLK" because it reacts on a rising edge of the pin. "/RESET detector" is the diode/resistor/capacitor, because we aren't directly given /RESET, so we have to convert some other signal (M2 in this case) into it.
User avatar
FARID
Posts: 499
Joined: Wed Apr 07, 2010 1:14 am
Location: Iran
Contact:

Re: Building a reset-based cartridge using a 74LS74/161/163

Post by FARID »

What do you use for EPROM? Address lines up to A21 ?!
You said you want to use 512KB games and it means 256KB PRG + 256KB CHR so you have to highjack address lines starting from A18, A19, ...
I suggest to use 74HC393.
Attachments
reset based.PNG
reset based.PNG (1.93 KiB) Viewed 12435 times
User avatar
MaarioS
Posts: 149
Joined: Wed Jul 22, 2009 8:53 am

Re: Building a reset-based cartridge using a 74LS74/161/163

Post by MaarioS »

OK, so that /RESET detector is the converter signal from M2 pin, that's understandable. Well, to put it simple, should I connect that signal to the pin 01 or 02 on LS161?? Should something be left unconnected?? Is there anything more I should do??

@FARID

No no no all my games use VRAM so there's no need to do any highjacking or something, only PRG chip is being switched ;) . When it comes to memory, I use AM29F032B (dedicated to SNES but it works perfectly fine on NES/Famicom fortunately)
User avatar
FARID
Posts: 499
Joined: Wed Apr 07, 2010 1:14 am
Location: Iran
Contact:

Re: Building a reset-based cartridge using a 74LS74/161/163

Post by FARID »

When you connect PRG address lines to a TTL it is said that you are hijacking its address lines.
If you want to use 161 : Reset (pin1) must be tied to High (5v)
If you want to use 393 : Reset (pin2) must be tied to Low (GND)
In both cases you must use Phi2 signal to control Clock pin
Check their datasheets for more info
User avatar
MaarioS
Posts: 149
Joined: Wed Jul 22, 2009 8:53 am

Re: Building a reset-based cartridge using a 74LS74/161/163

Post by MaarioS »

FARID wrote: I suggest to use 74HC393.
I just tried the method shown above and unfortunately it doesn't work. The console switches any random game and sometimes it doesn't switch at all and sometimes it even crashes while resetting.... Are you sure there should be a 470pF cap included only?? Is the capacity correct?? Shouldn't there also be some kind of additional resistor??
User avatar
soulstorm
Posts: 7
Joined: Sat May 03, 2014 11:32 pm
Location: Königsberg
Contact:

Re: Building a reset-based cartridge using a 74LS74/161/163

Post by soulstorm »

Hi!
Can anyone give me working scheme for 4-in-1 MMC3 multicart using 74LS74 for Famicom?
I read whole topic but still can't understand how to do that.
I make my first 2-in-1 cart using this scheme
Image
But can't find any 4-in-1 solution :cry: I want to use W27E040 for 4x128k PRG and CHR.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Building a reset-based cartridge using a 74LS74/161/163

Post by lidnariq »

On the 74'74:
connect pin 5 (PRG/CHR A17 / +1Q) to pin 11 (↑CK)
connect pin 8 (-2Q) to pin 12 (2D)
connect pins 13 (-2RD) and 10 (-2SD) to +5v
connect pin 9 to PRG/CHR A18.

This daisy-chains the first clock into the second one.
User avatar
soulstorm
Posts: 7
Joined: Sat May 03, 2014 11:32 pm
Location: Königsberg
Contact:

Re: Building a reset-based cartridge using a 74LS74/161/163

Post by soulstorm »

Thanks for fast reply lidnariq! I try this one :wink:
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Building a reset-based cartridge using a 74LS74/161/163

Post by lidnariq »

Thinking about this again, after having slept, I just realized that it's going to count down instead of up. (0,3,2,1,&c)

Connect pin 11 (↑CK) to pin 6 (-1Q) to make it count up instead.


ALSO: that romlabs diagram will only work with a 74LS (or other TTL parts), not with any HC (or other CMOS) parts.
User avatar
soulstorm
Posts: 7
Joined: Sat May 03, 2014 11:32 pm
Location: Königsberg
Contact:

Re: Building a reset-based cartridge using a 74LS74/161/163

Post by soulstorm »

If I understand correctly for 8-in-1 cart on AT27C080 I have to use 74LS161?
Post Reply