Game cartridges are perhaps the hardiest of all common storage schemes. Short of blunt traumatic force or application of electrical surges to the cartridge’s edge connectors, damaging a game cartridge is hard to do by accident. The same is also true for the data on them, whether one talks about an Atari 2006 cartridge from the late 1970s or a 1990s Nintendo 64 cartridge.

The secret sauce here are mask ROMs (MROM), which are read-only memory chips that literally have the software turned into a hardware memory device. A mask layer unique to each data set is used when metalizing the interconnects during chip fabrication. This means that the data stored on them is as durable as the processor in the game console itself. Yet this is not a technology that we can use in our own hobby projects, and it’s not available for personal long-term data storage due to the costs associated with manufacturing what is essentially a custom chip.

Despite its value as truly persistent storage, MROM has fallen out of favor over the decades. You may be surprised to find a lot of what’s currently used in the consumer market is prone to data corruption over time spans as short as one year to one decade depending on environmental conditions.

So what are we to do if we need to have read-only data that should remain readable for the coming decades?

The Many Flavors of Total Recall

Mask ROM ICs next to a die shot.

The ‘M’ in ROM (Memory) comes in a variety of types; MROM is in the ‘one time programmable’ category along with PROM. Some types can be written to repeatedly, such as EPROM (where the former requires UV light to erase the contents) and EEPROM, where the additional ‘E’ means it can be erased with an electrical current. Magnetic storage is among the easiest to read and (re)write, which is why magnetic tape, floppy discs and hard drives were or are the storage medium of choice in a number of areas.

Finally, there are the ‘blink and it’s gone’ types of memories, such as SRAM and (S)DRAM, which require a constant source of power to keep their data intact.

Which type of memory one chooses depends here largely on the requirements. For system memory, RAM offers low-latency, random access to data, while for long-term storage (beyond a system reboot), magnetic storage has been a favorite destination, with NAND Flash (EEPROM’s sibling) only recently becoming more popular. NAND’s main perk is that it’s faster.

Then there is the data that should survive the life of the system, such as the BIOS and similar essentials that are needed to make the system boot at all. Here EPROMs were common until EEPROM put it out of business a few decades ago. The data retention of a modern EEPROM is rated to be around 10 years, after which it may begin to lose the stored data.

The main reason for data loss in EPROM, EEPROM, Flash and similar floating-gate MOSFET-based storage devices is the loss of the stored charge in what are essentially tiny capacitors, either as a factor of time, or due to accumulated damage from writes. This also makes it clear why such storage devices are not ideal for long-term storage.

Solid State Revival

SNES-CD
The only known to exist SNES-CD (PlayStation) prototype.

It has often been asked why modern consoles aren’t using cartridges if they are so durable and provide near-zero wait times. The reason for this can be tracked back to the early 90s, when Nintendo and Sony worked on their ill-fated SNES-CD project, Sega developed their Sega CD add-on, Hudson Soft released its PC Engine CD-ROM add-on, and Sony of course went on to launch their first of a range of cartridge-free PlayStation consoles. The main advantage of CD-ROMs: roughly 650 MB of space per disc compared to tens of MB per cartridge.

As Full-Motion Video and similar features became a distinguishing feature of the console wars of the 1990s, neither the advent of loading screens, nor the joys of swapping between the two or more discs that CD-ROM-based games would often feature, would deter fans or game publishers. Duplicating CD-ROMs was a cheap and easy process, with updates to the software on the disc possible during a production run without excessive costs.

In this regard it’s perhaps ironic that Sony’s PlayStation 5 is now doing its utmost to eliminate the loading times that the use of optical media (currently BluRay) incurs. Over the last few console generations, Sony’s (and Microsoft’s) approach has gone away from playing the game from the disc, using them more like installation discs as a PC would. That way games run from the (much faster) internal hard drive.

Both the PlayStation 5 and Microsoft’s latest cubetastic XBox use NAND Flash-based solid state drives, instead of mechanical hard drives. This allows them to use direct GPU to storage transfers via PCIe (NVMe), a feature which on PC is called ‘DirectStorage‘ in DirectX nomenclature and is essentially a kind of DMA. Perhaps also ironically, this move towards using DMA to load game resources from solid state media more or less brings those consoles right back to cartridges. Just with extra installation times, from disc or by downloading the software, a step which could be skipped by selling the game on an NVMe-capable card you’d stick into the console when you’d want to play the game.

Nice Data You Got There

It comes as little surprise to anyone that a game cartridge from 1979 still works today in the original game console. After all, we don’t expect ASICs from the 1970s to have magically erased themselves either. Similarly, we expect to be able to play back audio CDs from the 1980s and audio cassettes from the 1960s, but what about burned CD-ROMs from, say, 1998, or those photos you saved on a 128 MB SD card only a few years later?

The quick answer there is ‘it depends’, mostly on the conditions under which the storage device is kept. CD-ROMs are perhaps the most notorious here, with ‘disc rot‘ a well-known phenomenon. CD-ROMs also have the data carrying layer on the opposite side of the label, meaning that a scratch on the label will render the disc unreadable. This is a flaw which DVDs fixed, but as optical discs consist of layers that are glued together, they are all susceptible to bit rot and/or delamination.

Basic model of a floating-gate transistor.

NAND Flash and other types of storage that rely on storing an electrical charge (Floating Gate MOSfet, FGMOS) depend on the resistive structures surrounding the charged element to prevent leakage of electrons. Unfortunately a property of FGMOS is that writing (changing the charge) in a cell damages these structures. The shift to higher density NAND Flash in smaller ASIC manufacturing process nodes means smaller structures which damage more easily.

The basic summary here is that the data retention duration of an FGMOS device depends on its initial rated data-retention, minus the number of write cycles, times some device-specific factor. Simply put, the more you write to an FGMOS device, the worse its data retention performance will be, as also alluded to in this 2017 paper. This means that the aforementioned 128 MB SD card from twenty years ago might be just fine, since it would use an older, more robust process node. The main question is then how many times was the card written to before it was put aside?

A final consideration for FGMOS devices is the impact of temperature. In 2015 people were shocked to learn that when stored at 30 °C, NAND Flash drives would only be guaranteed to retain their data for about a year, and about a week at 55 °C. Over at Anandtech this issue was analyzed in more detail, although this doesn’t take away that leaving an SD card or SSD in a car that’s parked outside or in a loft over the summer is probably not helpful with data retention.

No Easy Answer

Which storage method is right seems to mostly come down to one’s requirements and which way the economics lean at that point in time. For large-scale production, MROM is still very convenient as it allows the firmware for a product to be literally added with the rest of the custom ASIC, while guaranteeing that the data will never be modified. PROM is another option here, which requires an additional programming step (blowing efuses or equivalent), but gives otherwise many of the same benefits as MROM.

For embedded applications, high-endurance EEPROM (often called Flash) is commonly used, along with PROM (so-called One-Time Programmable chips).  EEPROM would give one at least a decade of guaranteed performance, PROM practically infinite.

Full teardown of Switch cartridge and die shot of ROM.

Meanwhile, Nintendo is apparently using a type of Flash memory called XtraROM from Macronix for its Switch Game Cards. This XtraROM is rated for 20 years at 85 °C, with folk over at the AtariAge forum speculating about its durability.

Tying these numbers into the earlier referenced AnandTech article on NAND Flash data retention, it would seem that with a bit of luck a Switch cartridge might still work 30-40 years from now, just like the Atari and NES game cartridges we have working today, since they’d presumably be stored at room temperature or something close to it for most of its life. This is assuming that Macronix did their projection correctly, of course.

Over on Mars, NASA’s Curiosity rover has been struggling with the Flash memory in both its redundant computer cores. Disabling part of this memory resolved the issue initially, but the Curiosity team has been doing remote troubleshooting as recently as last year.

Plan For the Persistence You Need

The gist of things seem to be that if you are going to send something into space or to another planet or equally remote, you probably want to put all the essentials such as the operating system and other core files into MROM or PROM. For video game consoles it’s bit harder to say. For using video games right now, today, any storage method is fine, but buying a Switch cartridge in 2040 and finding that its data is corrupt would be somewhat tragic.

Long-term storage on SD cards as I have seen some people do (e.g. taping a microSD card with documentation to a project) might be okay for about a decade at room temperature, unless you’re unlucky. Definitely do not count on the operating system on an SD card stuffed in a hot, industrial environment to make it past a few years.

In the near future PCM (as 3D XPoint) might offer the benefits of both magnetic storage-like write endurance as well as data retention. Yet as a wise person once said: “One copy of a file is no copy.” Basically keep making those backups and no matter how bullet-proof you think that your system is, always add more redundancy than you think you need.



Source link