Creating a flash cart with a micro-controller and EEPROM?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Creating a flash cart with a micro-controller and EEPROM?
by on (#223892)
Hello,
Fairly new to NES development, but from what I understand flash carts are usually made with FPGAs, because a micro-controller is just not fast enough to emulate an EEPROM. Please correct me if I'm wrong.
I'm just wondering if you think it would be possible to use a micro-controller, flash stick, and an EEPROM.

What I am thinking, is that I would write an assembly program for the NES that displays the games loaded on the flash drive on to the screen.
On boot, the micro-controller would load that program, along with the list of games onto the EEPROM.
Then the player selects which game they would want to play, and the micro-controller would then load the game into the EEPROM.

Is this project feasible? And what kind of protection does the NES use to stop the use of custom made cartridges?

Thanks
Re: Creating a flash cart with a micro-controller and EEPROM
by on (#223894)
Flash carts like PowerPak use RAM in place of an EEPROM, not the FPGA. The FPGA replaces other logic hardware that goes outside the ROM (the "mapper"), mostly for banking larger ROM sizes into the limited NES address space, though there are other functions an NES mapper may perform too.

You probably don't really need a microcontroller to load an EEPROM for you? The 6502 is capable of doing that itself on flash carts. That's what PowerPak and Everdrive N8 do to copy ROM data from their CF/SD card into their onboard RAM.

Though, there is another type of flash cart that does use EEPROM rather than RAM (e.g. the boards InfiniteNESLives sells). These typically have a non-volatile CPLD or discrete logic components for the mapper. These behave more like a traditional NES cartrige, because in contrast the FPGA on a PowerPak or Everdrive N8 needs to be loaded with the mapper after powering on.


Also, you'd probably want to use RAM for this like the PowerPak or Everdrive, otherwise I don't think there's much point in copying from one flash source (like an SD card) into another. Might as well just flash the EEPROM directly, and use a mapper to bank it (i.e. a "multicart" device). Flashing the whole ROM every time to switch games will only support smaller games, load rather slowly, and probably cause continual wear of the EEPROM's limited write cycles?

Quote:
what kind of protection does the NES use to stop the use of custom made cartridges?

The CIC lockout chip. That's been reverse engineered and duplicated, so you can include one on your board if you want. (This, incidentally, is replicated with a microntroller.) Or alternatively you can easily disable the lockout chip inside your NES, if you're only worried about running it at home.
Re: Creating a flash cart with a micro-controller and EEPROM
by on (#223913)
I'm pretty sure that EverDrive SD adapters for platforms like Genesis and GBC use flash memory because their games are a lot bigger than 8 Mbit, and 64 Mbit of NOR flash is cheaper than 64 Mbit of (P)SRAM.
Re: Creating a flash cart with a micro-controller and EEPROM
by on (#223927)
The old ones did, the new X series for both Gen and GB use RAM for instant loading. The board pics are available if you're curious to the RAM type.
Re: Creating a flash cart with a micro-controller and EEPROM
by on (#224206)
Sorry for the late reply rainwarrior, and thanks for the reply.

Are there any ram chips that could be used without an FPGA, or I guess that would already be done wouldn't it?
Are you saying the 6502 could grab data from an SD card and then load it into ram, or how would that be done?
I'm just trying to think of a way I could do it with my current skill set, and for a reasonable price.

I was thinking of doing it that way because I wouldn't need an FPGA if I could find an EEPROM with the same pin out, it would be relatively cheap, and theoretically much easier to do. Not to mention the time it would save me from learning how to program an FPGA, which I do want to do, just too busy right now. But yes I guess with the write limit on EEPROM's it really isn't the best way to do things.


Unfortunately I don't own any flash carts, so I don't know too much about them, other then what I read on some forum posts.
I will look up those pictures calima thanks.
Re: Creating a flash cart with a micro-controller and EEPROM
by on (#224233)
The RAM is used by the 6502 regardless; the problem is that there are so many different "mappers" for the NES. That's what the FPGA is really there for.

It would be easy enough to create a cart that could just (for example) play every "mapper 0" game, but it would dramatically restrict what games you could play.

Even so, one could create something that just contained two RAMs, a ROM, a small amount of logic, and an SD or CF card.
Re: Creating a flash cart with a micro-controller and EEPROM
by on (#224236)
How about starting with a cart that can play only mapper 28 games as a cheap alternative to the PowerPak? That'd allow use of its subsets (common discrete mappers 0, 2, 3, 7, 34, and 180), and it'd probably be straightforward to hack mapper 1, 11, 66, and 78 games to it.
Re: Creating a flash cart with a micro-controller and EEPROM
by on (#224237)
Mapper 28, although designed to fit in a CPLD, still requires that the OP learn how to generate fusemaps for programmable logic ... which was what they were blocking on in the first place.