Page 1 of 2
Basic Cart Circuit Design
Posted: Sat Feb 04, 2012 10:02 pm
by Karatorian
In an effort to improve my dev environment, I'm interested in making some basic dev carts. As I've got some interest in electronics design, I'd like to make my own from scratch rather than use a donor cart or a Retrozone PCB.
As a first step, I'm working on a basic NROM schematic. It's designed for two DIP-28 and should be able to handle CHR RAM or ROM. Jumper 1 controls mirroring. Jumpers 2 and 3 are PGR and CHR write enable, respectively. (Which you want to disable if you're using writable memories as though they are read-only.)
Full Size
I think this basic design is done, but I'd like someone to proof it for me. Is there anything I forgot? Anything I've screwed up?
I haven't figured out how I'm gonna program this yet, but an EEPROM burner and sockets would be one option. Eventually I'd like to be able to program the chips while still in the cart. Any suggestions?
Once I'm satisfied with this design, I want to add WRAM and experiment with some simple mapper designs. I'm thinking of implementing the WRAM with an FRAM, so I can have the equivalent of battery backing, without batteries. FRAM would also make a pretty nice "ROM" for a dev cart.
Re: Basic Cart Circuit Design
Posted: Sun Feb 05, 2012 6:07 am
by l_oliveira
Karatorian wrote:In an effort to improve my dev environment, I'm interested in making some basic dev carts. As I've got some interest in electronics design, I'd like to make my own from scratch rather than use a donor cart or a Retrozone PCB.
As a first step, I'm working on a basic NROM schematic. It's designed for two DIP-28 and should be able to handle CHR RAM or ROM. Jumper 1 controls mirroring. Jumpers 2 and 3 are PGR and CHR write enable, respectively. (Which you want to disable if you're using writable memories as though they are read-only.)
Full Size
I think this basic design is done, but I'd like someone to proof it for me. Is there anything I forgot? Anything I've screwed up?
I haven't figured out how I'm gonna program this yet, but an EEPROM burner and sockets would be one option. Eventually I'd like to be able to program the chips while still in the cart. Any suggestions?
Once I'm satisfied with this design, I want to add WRAM and experiment with some simple mapper designs. I'm thinking of implementing the WRAM with an FRAM, so I can have the equivalent of battery backing, without batteries. FRAM would also make a pretty nice "ROM" for a dev cart.
FRAM as work (program memory) is a really BAD idea.
Why ? Due to the way it works, reading erases the read memory positions and because of that the chip automatically (well at least the modern ones) restore the erased bytes and writing damages the chip.
The chips are rated for hundreds of thousands of writes per memory word, but you can quickly (within weeks of use) wear that out if you use it as main ROM or RAM. It's meant to be used as storage memory, not work memory. That's what flash is meant for (also flash has wear down from writing, but reading it does not cause it to need to be re-written).
And the point of using FERAM in backup is that software wise it works as if it was an SRAM chip.

Posted: Sun Feb 05, 2012 6:41 am
by tepples
Except most NES games with battery-backed PRG RAM partition it in software between work memory and storage memory. It'd be possible to make this separation explicit by using a big serial flash mapped somewhere in $5xxx and not battery-backing the SRAM. (Serial flash nowadays costs in the neighborhood of no more than a couple dollars per gigabyte in the "microSD" form factor.) But in one old discussion about alternatives to battery backup, I got the impression "do it this way for work memory, or do it that way for storage memory; stop whining about wanting both in one cartridge."
Posted: Sun Feb 05, 2012 2:30 pm
by Karatorian
According to the Fujitsu document FRAM Guide Book, there is a type of FRAM, called "SRAM Type" that has unlimited rewrite cycles. However, the "2T/2C" and "1T/1C" types are limited to 10^8 to 10^12 rewrites (and reads, as they're destructive).
Running some numbers, with an access speed of 200ns (5MHz), spinning on one byte, 10^8 read cycles could be reached in as little as 20 seconds. The higher end (10^12 writes) would last 55 hours. So l_oliveira definitely has a point.
Ok, I guess I'll have to reread the datasheets on the FRAMs I was considering using and see if any of them are "SRAM Type". If not, I'll have to re-consider the whole idea. It'd still probably work pretty good for save games, as long as it's not used for general RAM.
tepples, your suggestion of microSD for storage is solid. However, I'm currently thinking that I want to use the same PCB design for development and production carts. I don't envision putting an SD card slot on a production cart. On the other tentacle, it could be kinda interesting. You'd probably want to standardize the data layout, so you could save multiple games on one card.
Anyone got any comments on my basic NROM circuit?
Posted: Sun Feb 05, 2012 4:40 pm
by tepples
Karatorian wrote:I don't envision putting an SD card slot on a production cart.
Which is why the microSD card would be soldered onto the motherboard, just as production games use soldered-on flash rather than socketed flash for the PRG ROM and any CHR ROM. The overall effect would be not unlike Bandai's FCG board or DS Game Cards, which use serial EEPROM.
Posted: Sun Feb 05, 2012 5:36 pm
by lidnariq
Karatorian wrote:Anyone got any comments on my basic NROM circuit?
You should probably not call CHR A14 that since it's not :p — On the 28c64s I have lying around here, that pin is /WriteInProgress, on the 6264 it's NC.
I'd consider using a resistor and 2 position jumper in places instead of the 3 position jumpers.
Other than that, and defeating the CIC, looks good.
Regarding the "using SD" comment: without hardware to assist, you should know that reading or writing using its documented SPI interface is going to be fairly slow (<30kB/sec; fine for save games, probably fine for one-time startup-costs, not so hot for midgame swaps). But it will be about as cheap as you can manage without economies of scale. Using a plain NAND FLASH IC should be cheaper in volume but will require (not too expensive) voltage translation.
Posted: Sun Feb 05, 2012 6:01 pm
by tepples
lidnariq wrote:You should probably not call CHR A14 that since it's not :p
Is that pin CHR A14 on a 62256? Some newer boards support using that instead of the 6264 because 62256s are still made.
Posted: Sun Feb 05, 2012 8:07 pm
by Karatorian
lidnariq wrote:You should probably not call CHR A14 that since it's not :p
Ah, but it is... Actually, the way it's currently set up, CHR is setup to use a 32k chip. Note that A14 is not connected to anything. It should probably be tied low. The basic idea was to reduce the types of chips used. Also 8x8k and 8x16k chips are hard to find, 8x32k is more common.
I'd consider using a resistor and 2 position jumper in places instead of the 3 position jumpers.
This is gonna sound dumb, but can you clarify? It's been years since I took electronics in high school and I don't remember the basics sometimes. Also, when I layout the PCB, I intend to set it up so that the jumpers can either be populated, or fixed with solder pads.
Other than that, and defeating the CIC, looks good.
I'm intentionally ignoring the CIC for now. I'm just pretending it doesn't exist. I'll have to deal with it eventually, but not right now.
I'm thinking of basing my first iteration on battery backed SRAM. I could use a CopyNES or a Kazzo to program it without much trouble I think.
Posted: Sun Feb 05, 2012 8:08 pm
by infiniteneslives
Your CHR A13 and CHR /CE are gunked up. If you ever want to read from CIRAM you don't want to gnd out /CE. CHR /CE should actually be tied to CHR A13. Because not only is there no A14 on the ROM/RAM there isn't a A13 either (from a NROM standpoint) A0-A12 = 8KB = NROM CHR size. Remember CHR A13 is low for the cart and high for CIRAM (inversely with /A13)
As for the programming method, if you're looking to attract people to your cart I would try to come up with something better than socketed EEPROMS. However doing so quickly makes your project more complex. If your looking to keep the cart simple (by staying away from SD cards or USB) once option would be an external programmer. Something like the kazzo or copyNES. The kazzo's hardware is great for the task and works as is for NROM, but you'll have to spend some time with the software and firmware as there isn't much ability to have a mapper disable which you'll need for more complex mappers.
Posted: Sun Feb 05, 2012 8:13 pm
by infiniteneslives
Karatorian wrote:
I'm thinking of basing my first iteration on battery backed SRAM. I could use a CopyNES or a Kazzo to program it without much trouble I think.
You ninja'd me, but I wanted to add that I have tested the kazzo for a SRAM setup like this and it works. Except I've got something weird going on with the first 4bits of the first byte in CHR data. For somereason 0 gets programmed to A. I thought it was something with the kazzo software/firmware initially but I saw the same bug last week with my own software/firmware so I'm puzzled at the moment as to how several versions of the same hardware (I have two) would cause this.
Posted: Sun Feb 05, 2012 8:32 pm
by Karatorian
Thanks for pointing that out, I knew I must have messed something up. I've revised the schematic and I hope I've got it correct now...
Full Size
Posted: Mon Feb 06, 2012 1:12 am
by lidnariq
Karatorian wrote:I'd consider using a resistor and 2 position jumper in places instead of the 3 position jumpers.
This is gonna sound dumb, but can you clarify? It's been years since I took electronics in high school and I don't remember the basics sometimes. Also, when I layout the PCB, I intend to set it up so that the jumpers can either be populated, or fixed with solder pads.
Something like
has the advantage that there's no state that's nonsense. If a jumper is lost, the input can't float and perhaps accidentally overwriting your ROMs.
If both the resistor and jumper's pads are 1/10th inch standard spacing for a resistor folded vertically, you don't even have to worry about part count for production boards.
Posted: Fri Feb 10, 2012 5:48 pm
by Karatorian
So, I'm putting in an order for some components (mostly EEPROMs) and figured I should pick up some bypass capacitors and some resistors while I'm at it. Any suggestions as to what values to get?
Posted: Sat Feb 11, 2012 4:59 am
by TmEE
0.1µF ceramics for bypassing, and perhaps some 10....100µF e-caps too.
For interfacing 3.3V stuff to 5V you would want 100....470ohm resistors, for pullup/pulldown 1K...10K. I generally use 220ohm and 1K or 4.7K resistors.
Posted: Sat Feb 11, 2012 11:54 am
by Karatorian
Thanks for the input. That basically matched the generic advice I got by Googling.