NAND and NOR
From PHWiki
The typical flash memories used in digital cameras and MP3 players, like Compact Flash, Memory Stick, or SD, are rather slow. They use the NAND type of flash chip, which are cheap for large capacities.
GBA Flash Cards generally uses NOR (which is faster to read, slower to write, more reliable and easier to access, and more expensive).
The crucial thing that makes NAND flash unusable for GBA cards is speed. The GBA requires memory that can respond nearly as fast as the CPU itself. Random access of NAND flash is in the order of 1000 times slower than NOR flash. 25 micro seconds vs circa 70 nano seconds.
As the very first GBA flash cards had speed issues with a 120 ns NOR chips, it's pretty obvious that NAND flash would be completely unusable.
The internal structure of the chips also matter to some extent. NOR chips are directly readable, the same way the ROM in original GBA cards are.
NAND chips are not, and need to be mapped out to be readable. And when it comes to implementations like CompactFlash it's all well and good that there's a PC ATA implementation, but the GBA doesnt exactly have ATA channels built in, so you have to create an interface that the GBA could understand.
GBA is made to read from ROM chips, which are very fast and designed such that each 16-bit word is directly addressable. GBA executes code straight from the chip (called "execute in place" or XIP), whereas portables made to use slower, cheaper chips, like N-Gage and GP32 which uses NAND based block device flash media have to read an entire block of code from the flash into RAM before executing. They both have noticeable load times.
For GBA to handle such slow media it'd need a bigger memory to run smoothly (without load time every 2 minutes of gaming) and all the software would have to be written to handle waiting for the flash. Since pirated GBA roms and some GBA homebrew games are not, when the media doesn't provide data fast enough, the game simply freezes up.
NAND Implementantions on GBA Cards
There are ways to use NAND on the GBA, but only by providing such a bigger memory into which the roms are copied before execution. This is either NOR flash or RAM.
Like ROM on authentic GBA Game Paks and like NOR memory, RAM can be read quickly and randomly. RAM can also be written to much faster than NOR. On the minus side is the fact that the RAM is instantly wiped when you turn the GBA off, and uses much more power than NOR, shortening battery time.
Some later flash cards for GBA combine one larger storage area of NAND with a smaller NOR area for execution, examples include Extreme Flash Advance II and EZ-Flash III.
There are also cards that work as adaptors for NAND based generic flash cards like CompactFlash and SD.
Supercard and M3 have onboard RAM, where all the rom data is loaded before it's executed, and works pretty much the same as any other GBA flash card.
GBA Movie Player v2 was not originally made to run roms, but to stream movie data from the NAND card. You can use it to run small roms that load fully into the RAM in the GBA. There are also cumbersome workarounds for some emulators to swap parts of the rom data into the GBA RAM for execution. These workarounds are much less cumbersome on the Nintendo DS, which has more RAM like the N-Gage and GP32.
See also
External links
- Flash memory: Low-level access on Wikipedia
