Some basic hardware questions.

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

Moderators: B00daW, Moderators

User avatar
bog7
Posts: 8
Joined: Tue Jun 18, 2013 12:04 am
Location: Florida
Contact:

Some basic hardware questions.

Post by bog7 » Tue Jun 18, 2013 12:43 am

I'm new to homebrewing and lack an understanding of the types of hardware and configuration needed to get a homebrew game running on an actual nes. I'd appreciate it if someone could answer my questions or direct me to resources that answer them.


1. I've purchased Repropak boards and Ciclone lockout chips to go on them. I understand that I will need at least 2 EPROMs, 1 for PRG data and 1 for CHR data. What other hardware will be needed on the board at minimum?

2. Specifically, what type of EPROMs are compatible with Repropak and where do you recommend purchasing them?

3. I took apart my copy of The Legend of Zelda: Majora's Mask for N64 and realized there was no battery inside. I could be wrong but I think newer games use EEPROMs to save data without the need for batteries. Can these be used to save data on NES games without batteries?

4. What is the difference between different mapper chips (i.e. 74HC32, 74HC161) as well as different board names (i.e. SROM, UROM, NROM, CNROM) and how do I know which is necessary for my game?

5. What types of Capacitors, Mapper chips and other parts are compatible and where do you recommend purchasing them?


Thanks for your help.

User avatar
Bregalad
Posts: 7890
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: Some basic hardware questions.

Post by Bregalad » Tue Jun 18, 2013 2:13 am

I can't answer 1) and 2) because I don't have a retroPak.
I took apart my copy of The Legend of Zelda: Majora's Mask for N64 and realized there was no battery inside. I could be wrong but I think newer games use EEPROMs to save data without the need for batteries. Can these be used to save data on NES games without batteries?
Absolutely, several Bandai games does exactly this. It takes longer to load and save, but the save is more reliable. If you save more than 10-100k times the EEPROM would eventually fail but I don't think anybody have to worry about this, even if some guy saves several times a day for all his life he'll still be safe.

Also this technology might have been more expensive in the early 90's and beacme cheaper later, which would explain the switch from Nintendo ? I have no idea. GBA games uses either of those technology. You can generally tell by how long it takes to save, if it is almost instant then SRAM is used, if it takes time then EEPROM is probably used.
4. What is the difference between different mapper chips (i.e. 74HC32, 74HC161) as well as different board names (i.e. SROM, UROM, NROM, CNROM) and how do I know which is necessary for my game?
The 74HC series are general purpose CMOS chips which were very popular in the 80s. Nowdays with the rise of programmable logic devices, those are hardly used anymore.
The 74HC161 is a counter (which is used simply as a latch in NES games (it actually took me years to figure this out !) ) and the 74HC32 contains 4 logical OR gates.

To know which mapper is necessary for your game is a bit tricky, but if you're serious about homebrewing you should definitely read about mappers (Dish made an excellent document).
Basically :
- If your game can fit in 32kb PRG and 8k CHR no need for a mapper
- If you need more CHR but your game fits in 32kb PRG, you can use CNROM mapper 3
- If you need more PRG, you can use CHR-RAM instead of CHR-ROM and use UNROM mapper 2 or ANROM mapper 7
- If you need even more advanced features, you should use a custom mapper like MMC1, MMC3, MMC5, etc, etc...

zzo38
Posts: 1067
Joined: Mon Feb 07, 2011 12:46 pm

Re: Some basic hardware questions.

Post by zzo38 » Tue Jun 18, 2013 3:12 am

Bregalad wrote:If you save more than 10-100k times the EEPROM would eventually fail but I don't think anybody have to worry about this, even if some guy saves several times a day for all his life he'll still be safe.
I don't think so. I made the calculuation and if you actually do saves several times a day for all your life, this exceeds the 10k limit.
[url=gopher://zzo38computer.org/].[/url]

User avatar
qbradq
Posts: 951
Joined: Wed Oct 15, 2008 11:50 am

Re: Some basic hardware questions.

Post by qbradq » Tue Jun 18, 2013 6:35 am

Here's my advice: if you need a mapper (I.E. more than 32kb PRG-ROM or 8kb CHR-ROM/RAM, or any WRAM) then use MMC3. It's a very capable mapper with plenty of options, widely supported by emulators thanks to games like Mario 3, widely available donor carts due to the huge amount of games released with it, and an available development board: viewtopic.php?f=9&t=8808.

Whatever you decide, just don't fall into the same trap I did: spending all your time deciding on the best technology instead of making a game. The mapper doesn't make the game. Also, don't worry too much about hardware testing in the beginning. Use NintendulatorXD for development and you should be pretty OK once you get to hardware.

Also, look into using PDIP Flash chips instead of EPROM. I've also seen some self-contained battery-backed SRAMs, but they are pricey.

User avatar
rainwarrior
Posts: 7824
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Some basic hardware questions.

Post by rainwarrior » Tue Jun 18, 2013 9:13 am

The ReproPak has a manual linked on its page that tells you exactly what parts you need: http://www.retrousb.com/downloads/repropakmanual.pdf

But what you need is EPROMs for CHR and PRG, CIClone, a couple of 0.1µF ceramic capacitors, and depending on the mapper one or two 74-series logic chips. You'll also need solder, of course. I usually get most parts from Mouser. Digikey is also a popular source. If you're only planning to make 2 or 3 carts, maybe just find them at a local electronics shop (it's all standard stock stuff).

qbradq, you realize bog7 may have chosen the ReproPak specifically to avoid having to harvest old games? If you're trying to build a game from new parts, MMC3 is not generally very good advice, IMO. I think infiniteneslives' MMC3 repro solution might be available at this point, though it probably can't be as cost effective as the simple discrete logic mappers that the ReproPak supports. (Not to mention bog7 already has the ReproPak.)

User avatar
Dwedit
Posts: 4330
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Some basic hardware questions.

Post by Dwedit » Tue Jun 18, 2013 9:22 am

Majora's mask used flash rom to save, which is why it takes much longer to save than the previous game which used SRAM.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

User avatar
bog7
Posts: 8
Joined: Tue Jun 18, 2013 12:04 am
Location: Florida
Contact:

Re: Some basic hardware questions.

Post by bog7 » Tue Jun 18, 2013 9:50 am

Thanks for the advice everybody. You've helped clarify many things.

User avatar
qbradq
Posts: 951
Joined: Wed Oct 15, 2008 11:50 am

Re: Some basic hardware questions.

Post by qbradq » Tue Jun 18, 2013 11:19 am

I'm just a bit jaded on the whole mapper topic ;) I have a repro board from retrozone and they do work very well. It's just my opinion, but I think there's very few cases were a modern homebrew project that requires more than NROM will end up only needing expanded PRG or CHR ROM. MMC3 is an excellent target, and is roughly as available as all the other common mappers.

I could mention that an MMC1 repro board is available from retrozone as well, but personally I dislike that mapper. It is a little clunky to use in software, a little restrictive in hardware, and could be easily replaced with an MMC3 for roughly the same cost.

So Bog7, if that is in fact your real name :P If all you need are the discrete ICs and a few caps, check out Futurlec. They have a decent assortment of memory and a wide selection of 74-series IC's as well as all the other discrete components. Shipping can be a little on the high side for small orders, but they are a very reliable supplier and I have used them for years. They also have proto boards, cheap (but quality) tools, solder and the like.

DigiKey is great for bulk orders and always have 74-series and other discretes in stock. Unfortunately their selection of DIP-packaged memory is very spotty and often overpriced.

The most recent supplier I have used was Jameco. Again their selection of DIP-packaged memory is spotty, but it seems to be better than DigiKey's (especially for the larger sizes). I have had very good customer service from them.

User avatar
rainwarrior
Posts: 7824
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Some basic hardware questions.

Post by rainwarrior » Tue Jun 18, 2013 8:32 pm

RetroZone's MMC1 board/cpld hasn't been available in years, and seems at this point to have silently been removed from its catalogue altogether.

MMC3 is okay, but as far as (new parts) repro feasibility there's a huge gap between something that needs 1 or 2 discrete logic chips and something that needs 2 CPLDs. If you're harvesting boards from old games, though, yeah, it's about as easy to get MMC3 as anything else.

I'd say MMC3 is good if you have an idea that needs fine bank switching (e.g. CHR flipping animation, DPCM swapping), and presumably you have a use for the IRQ as well. If you only need the IRQ, MMC1 just as good, really (yes the bankswitch is annoying, but it's only a few lines of code that you write once). If you don't need either of those things, the discrete logic mappers can give you plenty of ROM space to work with, and there's still lots of interesting stuff you can do without an IRQ, especially with CHR-RAM (see: Battletoads).

Edit: MMC1 doesn't have IRQ what have i done
Last edited by rainwarrior on Wed Jun 19, 2013 8:26 am, edited 1 time in total.

User avatar
tokumaru
Posts: 11756
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Some basic hardware questions.

Post by tokumaru » Tue Jun 18, 2013 9:00 pm

rainwarrior wrote:If you only need the IRQ, MMC1 just as good
What? Is there a version of the MMC1 I'm not aware of?
yes the bankswitch is annoying, but it's only a few lines of code that you write once
Unless you need to bankswitch several times during short periods of time, such as VBlank (e.g. you're loading graphical data from several different banks), and the long time it takes to perform switches starts piling up. Another annoying part of MMC1 registers is detecting and recovering from interrupted mapper writes when the interrupt handler also has to perform bankswitches. IMO the MMC1 is much more annoying than "a few lines you write just once".
If you don't need either of those things, the discrete logic mappers can give you plenty of ROM space to work with, and there's still lots of interesting stuff you can do without an IRQ, especially with CHR-RAM (see: Battletoads).
As I see it, the only real advantage the MMC1 has over the discrete logic mappers is WRAM. Yes, we had a few proposed solutions on how to implement WRAM with discrete components, but we never got a final word on it AFAIK, and I also believe that battery backed WRAM is subject to corruption without any sort of protection mechanism.

If you don't need extra RAM on the cart or IRQs, discrete logic mappers are the way to go. Battletoads is indeed a great showcase of what's possible to do without any assistance from extra hardware (I'm not counting access to extra ROM as a form of assistance).

lidnariq
Posts: 9506
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Some basic hardware questions.

Post by lidnariq » Tue Jun 18, 2013 11:08 pm

rainwarrior wrote:If you only need the IRQ, MMC1 just as good
The only mappers simpler than MMC3 (in terms of bits of state) that provide an IRQ are: Sunsoft 3 (m67), VRC3 (m73), NES-EVENT (m105, and the IRQ isn't anything remotely close to general purpose), and Racermate (m168, and the IRQ is very limited).

VRC3 is actually pretty appealing to that end: it's basically UNROM, without bus conflicts, with WRAM and an cycle counting IRQ.
tokumaru wrote:As I see it, the only real advantage the MMC1 has over the discrete logic mappers is WRAM. Yes, we had a few proposed solutions on how to implement WRAM with discrete components, but we never got a final word on it AFAIK, and I also believe that battery backed WRAM is subject to corruption without any sort of protection mechanism.
I am confident that the NAND4 circuit (as used by Family BASIC!) plus the single-PNP 6264 RAM disable, and using two schottky diodes and two resistors as power switchover will work well.

User avatar
bog7
Posts: 8
Joined: Tue Jun 18, 2013 12:04 am
Location: Florida
Contact:

Re: Some basic hardware questions.

Post by bog7 » Wed Jun 19, 2013 1:12 am

Image

I've got a lot to learn.
Thanks for those links for buying components, qbradq.

tepples
Posts: 22017
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Some basic hardware questions.

Post by tepples » Wed Jun 19, 2013 5:31 am

tokumaru wrote:
rainwarrior wrote:If you only need the IRQ, MMC1 just as good
What? Is there a version of the MMC1 I'm not aware of?
If you only need one IRQ, you can set up a DPCM Split.
Another annoying part of MMC1 registers is detecting and recovering from interrupted mapper writes when the interrupt handler also has to perform bankswitches.
Then don't make the NMI or IRQ handler depend on anything not in the fixed bank. The only thing I can see that would require that is running a music engine in the NMI handler while the main game is in a lag frame.
As I see it, the only real advantage the MMC1 has over the discrete logic mappers is WRAM.
That and switchable mirroring. Otherwise, every single SGROM game would have been UNROM/UOROM instead.

User avatar
qbradq
Posts: 951
Joined: Wed Oct 15, 2008 11:50 am

Re: Some basic hardware questions.

Post by qbradq » Wed Jun 19, 2013 8:09 am

That's a real bummer that the MMC1 repro board is no longer available from RetroZone. I know it was not available the last time I tried to buy one, and I got a rather snarky reply to my email inquiry about it.

So with that in mind, MMC3 is now more available than MMC1, thanks to infiniteneslives :D

So I guess we've gone kind of off the topic with the discussion, but the links being provided should be great for the OP, especially the discrete logic WRAM circuits.

User avatar
rainwarrior
Posts: 7824
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Some basic hardware questions.

Post by rainwarrior » Wed Jun 19, 2013 9:31 am

Lol, I dunno why I thought MMC1 had an IRQ. Yeah, the mirroring switch and possible WRAM are good features it has.

Post Reply