USB Reader For SNES Game Carts

[youtube=http://www.youtube.com/watch?v=Pwq6vRM8U7k]

Reader, [Matthias_H], sent in a video about his USB adapter for SNES game carts. All you have to do is plug in the SNES game cartridge and USB cable, then a ROM file of the game shows up as an external storage device on your computer. After that, you can play the ROM with your choice of emulator. We emailed [Matthias] asking for more information, and he quickly replied with a very nice writeup about the hack that is pasted below.

Update: [Matthias] launched a site for the “snega2usb” with updates on the development of the board and a FAQ.

[Matthias] writes:

Part list:
Atmel AT90USBKey Evaluation Board (Digikey – $30)
FCI 10046971-003LF 70-pos. 2-row connector (Digikey – $4.76)
a little piece of prototyping board to solder the connector onto
thousands of little wires

I used the following reference documents:
http://www.emulatronia.com/doctec/consolas/snes/sneskart.html
(SNES cart pinout and ROM memory map)
http://www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx
(FAT16/32 specs)

The somewhat ugly cable solution is due to the USBKey’s weird choice for .05″ pitch port connectors, for which I was not able to find suitable pin headers and ribbon cable connectors. The exact pinout is a bit weird and not worth publishing yet, since many of the I/O pins are in fact shared by the onboard peripherals, so I have to spread the address and data bits among the available pins. A cleaner version with all parts on a custom PCB is on its way, as well as support for the Sega Genesis (working hard towards the all-in-one solution :-))

Code is based on the Atmel USB Mass Storage example app, to which I added a module for ROM access and a read-only FAT16 (the latter was hard-coded in a hex editor – FUN!). Again, development is still at a very early stage (I tested this on exactly one game cart), and as of now, redistribution of the source is in fact prohibited by Atmel’s proprietary license.

I’m not quite satisfied with the data rate yet. As of now, newer-generation console carts (N64 etc), while absolutely possible to read out, would take forever to load. The device is running at USB 2.0 full-speed (12 Mbps), and I am not aware of any cheap solution that offers high-speed USB (480 Mbps).

Open issues:
– testing with as many different games as possible (feel free to donate your least favorite game carts! :-))
– issuing a refresh when the cartridge is removed/replaced! The USB Mass Storage protocol uses the SCSI command set, so the device cannot send requests (“refresh directory, file may have changed”) to the host.
– optimization for speed
– add compatibility for HiROM games

By the way, I’ve never done anything like this before. The fact that it was so easy kind of scares the hell out of me ;-)

I think this is as exhaustive a description as I can give for now.
Hope you’re fine with it.

-Matthias

82 thoughts on “USB Reader For SNES Game Carts

  1. @meow: development kit for the ez-usb: us$500.

    @tim: usb 2 is by far fast enough, but the chip i’m using cannot do the “high-speed” mode. also, coming up with an idea for an interface is not enough. you need to find a suitable controller chip, someone who will sell you a small number of them ($10,000), etc.

  2. This is a very cool little device

    doesn’t the scsi command set specify an “ejected” signal or something – whatever usb cd drives or memory card readers do? at worst, you could just cycle the usb connection.

    I’m going to echo the sentiments of above posters that save games would be awesome. couldn’t you make a r/w file next to the rom file that just maps to the sram on the cart? I know zsnes writes its save files next to the rom image, and other emulators can be modified to do this as well.

  3. @drewg: good idea, but not too easy. Allowing the system to write on a removable medium means it can in principle do whatever it wants, including reordering FAT entries and defragmenting files.

    As for the “eject” signal, resetting the USB connection is exactly what I do now. It probably invalidates open file handles, but it works.

  4. I’m scepticall.
    I mean, .SMC ?
    If I take my copybox or some other device and dump a cart to my PC…the file get’s NO EXTENSION!!!

    I’m not saying you tried cheating or frauding us, but I’m scepticall about the fact that this has a file extension.

  5. @jeroen

    His microcontroller code tells the PC that the cart ROM is like a USB flash disk device. It shows the PC a FAT file system with a single file. The uC maps the cart ROM space to a single file so the PC understands how to read it.

    He’s ‘faking’ it in the sense that there isn’t actually a file or extension inside the cart, the cart is just a bunch of memory chips. The microcontroller reads the game info header inside the cart and ‘fakes’ a name so the PC knows how to read the ROM.

    The microcontroller acts like a USB storage device. The PC sees it as a FAT disk and asks for the list of files on the disk called the directory table. His code reads out the directory table format and inserts the name it read from the cart plus the .smc extension. The uC tells the PC what ‘files’ are there. His code determines the name and extension of the ‘file’, in the same way that your dump software has some code that determines the extension when you do ROM dumps.

    This must be a common issue because he addresses it in his FAQ:
    Q: The ROM file in the video is called SUPER MARIOWORLD.smc, which can’t be true, so this is all a fake.
    A: First of all, this is not a question…

    If anyone likes, I can make a post with some graphics and a more expansive explanation of FAT file systems, ROM, and what’s going on in this project. [matthias_h] has a beautifully elegant solution for playing ROMs legally*.

    *Probably varies by jurisdiction.

  6. Interesting… Personally I’d pay up to $100 for something like this, ‘specially an all-in-one solution that covers a few of teh classic consoles (at ‘least SNES/Genesis/N64)… Considering the number of old carts I’d have, it’d be well worth it. I’d probably spend more time scouring for all the ROMs to my old games than it’d be worth it.

  7. so far, have you been able to incorporate reading the save file as well (srm, etc…), within the cartridge, are you intending to, or is that not a concern for you?

  8. Reading works fine, but writing savestates back to the cart turns out even more of a pain than expected. Once you allow the slightest bit of writing on a medium, Windows automatically starts tampering with the FAT (which doesn’t go well if the FAT is supposed to remain static).

  9. Interesting… Personally I’d pay up to $100 for something like this, ’specially an all-in-one solution that covers a few of teh classic consoles (at ‘least SNES/Genesis/N64)… Considering the number of old carts I’d have, it’d be well worth it. I’d probably spend more time scouring for all the ROMs to my old games than it’d be worth it.

  10. @stevenmcfly, I am not speaking on behalf of the creator, but i would assume he was say for the fun of it, for shits and giggles, and in this case to learn of the USB mass device driver, and the FAT file system.

    If we all did what was easy we would not get any progression of technology.

  11. THIS IS AWESOME!!!! I have all of my game cartridges and my SNES, but instead of going (all the way) downstairs to play them, this would let me play them all right on my pc!! I wonder if there is something like this that I can use for my old NES games…. My NES stopped working, so I gutted it… Nice, cheap mcu, ppu, and sram.

  12. dude can I buy one of those from you just the super nes port thing you already made, I want to upload my on rom images to pc for my own personal use and it looks like this would actually work to do that. I like playing on pc rather than wearing out my game consoles plus you have more option like wireless game pads and better speed and smoother game play.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.