IO-56 Reader/Writer for NES, SNES and GameBoy

Docu version 1.2.1 and software 1.5a3 (DOS and Windows)

News
What is it?
Changes
Disclaimer
System Requirements
Schematics and Programs
How does it work?
Building the IO-56
The Programs
Buying the IO-56
Acknowledgements

News

The IO-56 windows version (source is included) from Jason Millard is here.

IO-56 1.5a3 DOS: the latest DOS version is available from here.

IO-56 1.5 is a complete rewrite of the IO-56 software. A single application is used for all extensions. The source code is also much clearer and more modular. It compiles with the freely-available C compiler DJGPP (DOS port of GNU C).

IO-56 1.5  supports the following extensions:

Debug (no extension)
Test
GameBoy
NES
SNES

For using the IO-56 program, you must have a DOS Protected Mode Interface (DPMI). For instance, Windows 95 provides a DPMI.

IO-56 expects options on the command line. Some options are global to all modules, and some are specific to one module. Global options are expected after the extension name, specific options are expected after global options, and commands are expected after specific options. Here are the options accepted by the IO-56 software:

Usage: IO-56 {DEBUG | TEST | GB | NES | SNES} [glob_opt...] [ext_opt...] [command...]

Global options:
    -p nb     Specify the address of the card: 0 = 0x300, 1 = 0x310 (default: 0)
    -w nb     Specify the time in ms. to wait between I/O accesses  (default: 0)

Commands:
    -a        Analyze the cartridge and print informations
              Supported by: GB, NES, SNES
    -s file   Save cartridge ROM in a file
              Supported by: GB, NES, SNES
    -b file   Backup cartridge save-RAM in a file
              Supported by: GB, SNES
    -r file   Restore cartridge save-RAM from a file
              Supported by: GB, SNES
    -c        Clear cartridge save-RAM
              Supported by: GB, SNES
    -t        Test cartridge save-RAM (WARNING: save-RAM will be cleared)
              Supported by: GB, SNES
    -d        Debug the extension
              Supported by: TEST, NES, SNES

DEBUG extension:
              The DEBUG extension is a simple cable with NO connections. All
              lines of the ISA card are configured as output. Output signals
              can be checked using a multimeter.

NES extension:
    -v        Verify (read the cartridge twice)
    -v -v     Verify even more
    -wa       The cartridge has VRAM
    -wo       The cartridge has VROM
    -m nb     Specify the memory controler (MMC) of the card
    -nc nb    Specify the number of character ROM banks
    -np nb    Specify the number of program ROM banks
    -lc nb    Specify the length of character ROM banks
    -lp nb    Specify the length of program ROM banks
    -f nb     Specify format of the save file: 0 = raw, 1 = iNES (default: 1)

Example

For analysing a cartridge:

    io-56 gb -a
    io-56 nes -m 1 -wa -a
    io-56 snes -a
For saving a cartridge: 
    io-56 gb -s filename.gb
    io-56 nes -m 1 -wa -s filename.nes
    io-56 snes -s filename.sn

For backing-up save-RAM:

    io-56 gb -b filename.bak
    io-56 snes -b filename.bak

For restoring save-RAM:

    io-56 gb -r filename.bak
    io-56 snes -r filename.bak

For clearing save-RAM:

    io-56 gb -c
    io-56 snes -c

For testing save-RAM (warning: this will also clear save RAM):

    io-56 gb -t
    io-56 snes -t

For saving zelda 1 on the NES:

    io-56 nes -m 1 -nc 0 -s zelda.nes

Limitations

The GameBoy extension does not backup/restore save-RAM correctly.

The NES extension is still primitive. I had a lot of hard work trying to make the software automatically recognize the mank switch (MMC) type of the cartridge. I also had problems in detecting whether the cartridge has VROM or VRAM. I tried to write some data, and read it back, to test if VRAM is present, but it seems that this can mess up the MMC, and bank switching does not work anymore after this test until next reset. So, at the moment, automatic MMC and VROM/VRAM detection as been disabled, and they must be specified on the command line.

The NES extension includes a powerful debug mode (use the '-d' flag). You can read/write values to specific PRG/CHR addresses, and calculate checksums on PRG/CHR banks. This allows to observe how bank switching works (bank switching is achieved by writing some values at specific memory addresses). It is also possible to save a PRG/CHR memory area from the debugger, and thus build an image file incrementally by manually switching and saving banks. A small help is available in debug mode.

What is it?

The IO-56 is a general-purpose input/output ISA card for PC computers. It provides 48 input/output + 8 output signals, as well as GND, +5V, +12V, and -12v.

In combination with specific extensions and software, it allows to transfer data from cartridge systems (like game consoles) to the computer. It provides an easy way for translating cartridge into image files required by software emulators.

An extension is basically a cable with a two connectors and a small PCB. The first connector plugs into the IO-56, while the other connector is free for receiving cartridges. Since cartridges for different systems have different size, pinout, or architecture, a different extension is required for each cartridge type, while no modification to the IO-56 is required.

Although it is technically possible with the IO-56 to upload an image file to a writable cartridge (with DRAM or Flash-ROM), I did not develop such a cartridge. I'll develop the required software if somebody provides me with such a cartridge.

Changes

Changes in version 1.2.1

Minor revisions in the documentation.
Added the NES list (with informations about bank switches).
Added schematic and PCB files in PROTEL format.

Changes in version 1.2

New Web page.
Added the SNES extension.
Added the program for reading SNES cartridges.

Changes in version 1.1

Added a new line to pin 38 of the NES connector, used for bank switching .
Lines CD0 and CD1 of the NES connector were inversed in the PCB.
Lines CA10 and CA11 of the NES connector were inversed in the PCB and the schematics.
Added the program for reading NES cartridges.

Disclaimer

I've built several IO-56 cards and they all worked fine, but I can't be held responsible for anything that might happen to your hardware.

System Requirements

The IO-56 ISA card
An IBM-PC compatible computer (80386 or better)
One free ISA slot (8 or 16 bit)
DOS >= 3.3

Schematics and Programs

The included poscript files contain the schematics of the card, which is a double-sided PCB. There are also a four extension cards at the moment:

A test extension to test the IO-56
A GameBoy extension to backup GameBoy cartridges
A NES extension to backup NES cartridges
A SNES extension to backup SNES cartridges

These extension cards must be used together with specific programs, which are provided in both source and compiled form.

Here are the files you need to build and use the IO-56. The schematics and PCB files are in different formats: postscript (highly recommended), gif at 150 and 300 dpi. They are also available in PROTEL schematic and PROTEL autotrax format.

Schematics available on request
PCBs available on request
Programs

How does it work?

The U1 IC (comparator) decodes the address written on the ISA bus. If address is in the 0x300-0x30F range, and the /IOR or the /IOR are low (meaning the computer is reading or writing to the ISA bus), the pin 19 of U1 goes down and enables the U4 demultiplexer and the U2 bus transceiver. The direction of this transceiver is determined by the /IOR signal.

The U4 demultiplexer decodes the addresses in the 0x300-0x30F range: the U5 8255 is selected using addresses 0x300-0x303, the U6 8255 is selected using addresses 0x304-0x307, and the U7 flip-flop is selected using address 0x308.

If the switch S1 is set, the address range becomes 0x310-0x31F. This enables to have two IO-56 cards in the same computer listening to different addresses.

The fuses (F1, F2, and F3) protect the motherboard from short circuits.

Building the IO-56

ISA Card

You need the following components:

U1 74HC688
U2 74HC245
U3 74HC00
U4 74HC139
U5, U6 8255
U7 74HC574
R1 10 kOhm resistor
C1, C2 22 uF 16V capacitor
C3, C4 47 uF 16V capacitor
C5, C6, C7, C8, C9, C10, C11, C12, C13 100 nF capacitor
F1, F2, F3 500 mA fuse (fast)
S1 DIL switch
CON2 64 pins connector

Make the PCB for the ISA card. Put the vias (you can solder small pieces of metal between both layers through the vias). Be careful not to forget any of the vias. Solder the components (resistors, capacitors...), the connector, and the IC sockets. Some pins of the components must be soldered on both sides of the PCB, since they act as vias! Double-check that everything is correctly soldered and that there is no short circuit. Put the fuses in their sockets, but not the ICs.

Note: always shut down the computer when inserting (removing) an extension into (from) the IO-56.

You can now insert the ISA card into a free ISA slot (8 or 16 bit) of your PC. Be sure that none of the components is in contact with any metallic part of the PC. Turn the PC on, and check that the voltage of pins 58..64 of the connector are correct (0V, +5V, +12V, and -12V) with a multimeter. Turn off the PC.

Insert the test extension. Turn the PC on. The LED of the test extension should light on. Turn off the PC.

Put the ICs in their sockets. Insert the test extension. Turn the PC on. Run the test.exe program. If no error is printed, the IO-56 works fine on your machine. If you get errors, try to slow down the program using the -w flag (e.g. test -w 200).

Test extension

You need the following components:

L1 LED
R1 470 Ohm resistor
CON1 64 pins connector

GameBoy extension

You need the following components:

CON1 40 pins connector
CON2 GameBoy connector

You will need an original GameBoy connector.

NES extension

You need the following components:

CON1 64 pins connector
CON2 NES connector

You will need an original NES connector. Be sure that the connector pins are correctly aligned with the PCB pins. When inserting a cartridge into the NES connector, you must push on the extremity of the cartridge so that it is parallel to the PCB, or else the cartridge and the connector won't be in contact.

SNES extension

You need the following components:

CON1 64 pins connector
CON2 SNES connector

You don't need to use an original SNES connector (actually, original SNES connectors are difficult to insert/solder on the PCB). You need a connector with the correct spacing between pins (0.1 inch = 2.54 mm).

The Programs

A new version of the programs is finished. There is now only one program for all extensions.

test.exe

The test.exe program allows testing the IO-56. You must have connected the TEST extension into the IO-56. Start the program with the -h flag for getting some help:

    Usage: test [-p int] [-w int]
        -p    Specify the address of the card (0 = 0x300, 1 = 0x310)
        -w    Specify the time to wait between accesses to the cartridge

gb.exe

The gb.exe program allows reading GameBoy cartridges. You must have connected the GB extension into the IO-56. You can analyze a cartridge, save the ROM in a file, backup the SRAM in a file or restore the SRAM. Start the program with no argument for getting some help:

    Usage: gb [-p int] [-w int] [-t | -d | -a | -s file | -b file | -r file]
        -p    Specify the address of the card (0 = 0x300, 1 = 0x310)
        -w    Specify the time to wait between accesses to the cartridge
        -a    Analyze the cartridge
        -s    Save the cartridge in a file
        -b    Backup the SRAM and save it in a file
        -r    Restore the SRAM from a file

For printing information about a cartridge:

    gb -a
For reading a cartridge and save it: 
    gb -s filename.gb

nes.exe

The nes.exe program allows reading NES cartridges. You must have connected the NES extension into the IO-56. When running the program, you must keep pushing on the extremity of the cartridge so that it is parallel to the PCB (you can block it in this position using adhesive tape). The IO-56 is able to read cartridges bigger than 32 kB (cartridge that use a bank switch), but you must know the type of the bank switch before reading the cartridge. There is no way to automatically detect which bank switch is used. I'm maintaining a list of NES games with informations on the bank switch they use. You can get it from here (the bank switch type is listed in the "Map" column). The bank switch numbers are the same as those used by iNES, and are not the number written on the bank switch IC inside the nes cartridges. If there is no number, it means that the cartridge has no bank switch. If the game you'd like to backup is not in the list, a good solution is to read the first bank of the cartridge (without using the -b flag), and to run it with iNES with verbose mode activated. It will print the accesses made to the bank switch and you will be able to determine which bank switch is used. You can also send this file to me, and I'll tell you the number. I will continue to improve the nes.exe program as I get feedback from people that use it, in order to let it support more types of bank switches. Note that the -a flag won't automatically detect which bank switch is used by the cartridge, and thus should be used together with the -b flag. Start the program with no argument for getting some help:

    Usage: nes [-v] [-b int] [-nc int] [-np int] [-p int] [-w int] [-a | -sp file | -sc file]
        -v    Verify
        -b    Specify the bank switch of the card
        -p    Specify the address of the card (0 = 0x300, 1 = 0x310)
        -nc   Specify the number of character ROM banks
        -np   Specify the number of program ROM banks
        -w    Specify the time to wait between accesses to the cartridge
        -a    Analyze the cartridge
        -sp   Save the program ROM in a file
        -sc   Save the character ROM in a file
        -sn   Save the cartridge in an iNES file

For reading a cartridge (without bank switch) and save it in the iNES format:

    nes -v -sn filename.nes

The -v flag will verify twice each byte read from the cartridge. If you get error messages, the cartridge is probably not inserted correctly.

For reading a cartridge (with bank switch) and save it in the iNES format:

    nes -v -b  -sn filename.nes

snes.exe

The snes.exe program allows reading SNES cartridges. You must have connected the SNES extension into the IO-56. At the moment, you can analyze a cartridge and save the ROM in a file. Start the program with no argument for getting some help:

    Usage: snes [-v] [-p int] [-w int] [-a | -s file]
        -v    Verify
        -p    Specify the address of the card (0 = 0x300, 1 = 0x310)
        -w    Specify the time to wait between accesses to the cartridge
        -a    Analyze the cartridge
        -s    Save the ROM in a file

For printing information about a cartridge:

    snes -a

For reading a cartridge and save it:

    snes -s filename.sn

Buying the IO-56

I do not sell the IO-56, but there is a commercial ISA card that is equivalent to the IO-56. It also uses two 8255 chips, and provides 48 I/O (instead of 56). The IO-56 software supports this card (starting with 1.5a3). The IO-48 is more "professional" than the IO-56 I built myself, and also cheaper. This card is being sold by Conrad Electronics (in Germany). It is priced at 99 DM, and its reference is: "975842-??, Interface 48 I/O". You can get informations from Conrad's web site: click on "Full Text Search", and enter "975842".

Once you get the IO-48, you must build a simple conversion cable. The schematics of this cable is available here. You will need an external power supply (+5V). Do not forget to to wire the ground of the power supply to the ground of the 64 pins connector (pins 58-60-62-64).

Acknowledgements

Marat Fayzullin, for his help with NES bank switching
DiskDude, for its SNES Kart v1.6
Matthew J. Richey, for his help with NES bank switching
Y0SHi for his great NES technical document
Soeren Gust, for his help in pointing out and correcting all my bugs

Last Updated 14-Aug-98, Pascal Felber