After having a first proof of concept working, I expanded it by adding an on-screen menu to choose between different bankswitch formats and communication methods (I added an optional serial output like in Batari's software). The working principles remains the same as in the fb2dumper:
- The dumping routine is copied to VCS ram and then executed.
- It displays a "ready screen" running from ram while waiting for a key press, allowing the user to make the game accessibile in the cartridge port (by swapping cartridges or using a special connector).
- Then you press the key and the game is read and trasferred to a PC.
Although there are better and more user-friendly ways to dump 2600 games (for example using an Harmony cart) I think this could still be of some use if other methods aren't available.
I intended to do some more testing, but I haven't worked on this for a while, and I decided to share it in it's current state. It's likely that it has some bugs.
WARNING: Use the software and circuits described here at your own risk! I assume no responsability for damages caused to your PC, console or games.
What do you need:
- An atari 2600 or compatible
- Some sort of programmable cartridge (the software is Supercharger-compatible) or an eprom burned with the dumper software
- (optional but recommended) A circuit to switch between the dumper software and the game to be dumped while the console is powered. It can be either an external device (which plugs into the 2600 and has 2 additional cart ports on it for the dumper and the game, or just 1 cart port for the game and an eprom chip with the dumper installed in it) or built inside the console itself.
It's possibile to use the dumper without such a circuit by just "hot swapping" the carts: I used this method with the FB2 dumper too and worked just fine for me, but there's risk of damage to carts and/or the console if done improperly.
- An adapter to connect to the PC serial port or, as an alternative, a cable to connect the audio output to the PC soundcard.
- A PC with a terminal emulator or an audio recording software.
- The utility to convert the ascii file (if you used the serial connection) or wav file (audio connection) into a binary file (the "rom" of the game).
Example of circuit to switch between dumper and game:
This is the pinout of the 2600 cart port. Pin 18 which is the CPU A12 address line is used as a "Chip Enable" (CE) signal for the cartridge. If the pin is high, then the cart is selected.
To switch between the dumper and the game a DPDT switch can be used. When it's in one position the CE pin of one cart is connected to console A12, while CE pin of the other cart is grounded. The connection are inverted with the switch in the other position. All the other pins are connected in parallel (game A1 and dumper A1 are both connected to the console A1, etc..). If you use an eprom inside the device for the dumper software you'll need to invert the CE signal, because eproms have an "active low" chip enable pin.
Instead of building it from scratch you can use a modified "Video Game Brain" or a similar cart selector.
EDIT: This simple circuit worked quite well for me (the software rarely crash while operating the switch), but results may vary depending on the specific console and components used to build the dumper. User Madhatter, for exaple, was unable to use it because the console always crashed, so he designed this debounce circuit which solved the problem:
Here is his website with some great Atari-related projects and also an article reporting his experience building the dumper. (the page is in spanish, but you can use google translator if you don't know the language).
If you want to dump the games built-in a console, you'll need a different circuit: in those consoles usually pin 24 of the cart port is used to detect the cartridge: most cartridges (there are a few exceptions) connect internally that pin to ground allowing the console to detect it. If the pin is not grounded the internal games are run. To allow the dumper to work without modifying the console you need an adapter like this:
Again you'll need an inverter if you use an eprom for the dumper software incorporated into the device.
This is the one I built. It has an eprom with the dumper software, and combines the 2 above circuits to allow dumping both cartridges and built-in games.
(EDIT: the pin on the bottom left was mislabeled in the schematic. I fixed it and also added pictures of the inside)
Adapter for serial connection:
I used the method suggested by supercat in the fb2dumper thread about having the console to output both normal and inverted TTL levels on different pins. By connecting the inverted signal to RD (Receive Data) pin of a PC serial port and the non-inverted one to GND pin, the port on the PC will see -5V for a "one" bit and +5V for a "zero", which is compatible with the RS232 standard. The dumper uses the right controller port on the console with the following pinout:
pin 1 (inverted TTL data)
pin 2 (TTL data)
pin 8 (ground)
These are the connections for the 9 pin and 25 pin style serial connectors.
2600 | PC (9 pin) -------------------- pin 1 -> pin 2 pin 2 -> pin 5 2600 | PC (25 pin) -------------------- pin 1 -> pin 3 pin 2 -> pin 7
If you have a TTL to RS232 or a TTL to USB converter, ignore the inverted signal and use the non-inverted one and the 2600 GND pin.
You'll need a terminal program (like Hyper Terminal or Minicom) on your PC which is able to save ascii file and configured for a 9600 baud or 19200 baud transmission 8N1 (8 bits, no parity, 1 stop bit) and no flow control.
Connecting audio to the PC:
If you use the audio transfer method you need to record the audio from the 2600 into a wav file. If the console you're using is A/V modded you can just connect it directly into the audio input of your PC soundcard. Else you can use the audio output from your TV (if present) or from an old VCR. If your TV or VCR has an headphone jack, that will work too.
You'll need a program to record the audio to a wav file. (I used Audacity on my Linux PC). You must experiment a little with volume settings on the TV/VCR and soundcard until the wav files convert without errors. Avoid clipping. Setting the volume so that the waveform's peaks in Audacity are about half of the maximum level works fine for me (For my tests I connected the console RF cable to a small 5" Black&white CRT and then connected the headphone output of the TV to the MIC input of the soundcard).
NOTE: the audio transfer is S L O W ! A 4k game takes about 40 seconds to be transferred at the fast speed (1300 baud) and about 1 minute and a half at slow speed (520 baud). So I suggest to use the serial method whenever possible.
How to dump a game:
(These instructions are mainly for dumping cartridges. Dumping built-in games must be examined case by case, because different consoles use different methods to select the games).
1 - Select the dumper rom using the switch in the circuit derscribed previously and turn on the console. The following menu is shown:
2 - Choose the bankswitch type (there's not autodetection, so you must try different ones until you get a playable rom if you don't know which one is used in your game), the output method and the transfer speed. Use the SELECT switch to cycle through the menu entries (the current one will blink) and the RESET switch to change its value.
There are 10 bankswitch schemes (ignore the "CUSTOM" entry for now): Standard (4k, non bankswitched), F8, FE, E0, 3F, UA, FA, F6, E7, F4. There aren't separate entries for games with additional ram so, for example, you use the F8 bank scheme also for F8SC (F8 with Superchip).
Check Kevin Horton's size.txt document for an explanation of the various bankswitch methods.
I tested the software with 4k,FE,F8 and F6 bankswitch types. I don't have carts to test the other schemes.
3 - When you are set select the "DONE" entry at the bottom and press RESET to switch to the next screen.
A screen is displayed, consisting in two bars at the side with cycling colors. This means that the software is ready to start the data transfer.
NOTE: Due to lack of space (the code runs in the VCS RAM which is only 128 bytes), this is not a "proper" TV signal, because it lacks the "vertical sync" pulses. It usually works with CRT TVs, but some modern LCD or video capture cards could just refuse to display it.
4 - Flip the switch to make the game rom accessibile by the console (or "hot swap" the carts). If the bars at the side of the screen become solid colored, the software crashed and you must power-cycle and restart from the beginning. In my tests this doesn't happen using the switch method, while frequently occurs by hot swapping the carts.
5 - Start the audio recording software or the ascii file capture in the terminal emulator
6 - Press the RESET switch to start the actual data transfer. The screen goes black while the data is sent to the PC. When finished the colored bars reappear.
7 - Stop the audio recording / file capture on the PC.
8 - Convert the saved wav or ascii file to binary by using the included command line utility.
You just need to specify the input and output file names:
2600dumper <input_file_name> <output_file_name>
If you omit the output file name, it will be called "out.bin".
If the resulting file size is not the expected one, then there were errors during the transfer. In this case check your connections, try adjusting the volume settings (if you're using the audio method) and retry.
9 - Test the binary with an emulator.
After the transfer is finished, pressing RESET will start execution at the address stored in the "start vector" (locations $FFFC and $FFFD). This will usually start the game, but sometimes will fail because it doesn't check if the correct bank is selected. If you switch back to the dumper rom before pressing RESET, the dumper will be restarted.
dumping unsupported bankswitch schemes:
Selecting the "CUSTOM" type in the main menu allows to dump some of the unsupported bankswitching formats. What the software does is to read from or write to a location in the 2600 memory map (the "hotspot") and then reading data from an address range. You would need to dump the various banks one at the time and then reassemble the complete binary by hand.
If you choose the CUSTOM type in step 2 above, an additional menu screen is displayed:
2B - You can chose to read or write the hotspot (and in the second case you can set the value to be written), select the hotspot address, the start and end addresses of the area to be dumped and optionally the TIA and RIOT base addresses to be used by the software (in case the standard ones may trigger the hotspot). All values are in hexadecimal format. You can find the 2600 memory map, with all the TIA and RIOT mirrors, here.
The hotspot can be in any location in the 2600 memory map, but the software only allows to write into TIA addresses $2D - $3F and in cartridge space (and their mirrors). The address range of the area to dump can only be in cart space. The software will automatically correct any out of range value.
After setting the desired values, proceed from step 3 above.
- the TV TYPE switch is used to select the TV format:
COLOR = 60 Hz
B&W = 50 Hz
If you get a rolling screen and the console you're using doesn't have a TV TYPE switch, keep the SELECT switch pressed at power up.
- the difficulty switches can be used to select the output method and speed (they only work in the main menu, flipping them in the "custom" menu or "ready screen" doesn't have any effect).
A = RS232
B = Audio FSK
A = fast transfer
B = slow transfer
- a joystick in the left port can be used to navigate the menu: moving the stick to the right change the current menu entry, while pressing the button changes its value.
- a keyboard controller/video touchpad/Kids controller can be used too. the "*" key selects the menu entry, while any digit from "0" to "9" change its value. When in the custom menu you can type the hex values directly by using the keypad. Hex digits "A" to "F" can be typed in by pressing the "#" key (which acts like a "SHIFT" key) before keys "1" to "6". A little arrow in the lower-left area of the screen indicates that the next digit will be "shifted".
+--------+--------+--------+ | A | B | C | | | | | | 1 | 2 | 3 | | | | | +--------+--------+--------+ | D | E | F | | | | | | 4 | 5 | 6 | | | | | +--------+--------+--------+ | | | | | | | | | 7 | 8 | 9 | | | | | +--------+--------+--------+ | | | | | | | | | SELECT | 0 | SHIFT | | | | | +--------+--------+--------+
NOTE: During the "ready" screen you can only use the RESET switch on the console to start the data transfer. The controllers (joystick or keypads) aren't checked by the software in that case.
automatic dumper/game switch
- Pin 18 of 6532 ("RIOT") chip is set "low" when the game to be dumped needs to be accessed. Otherwise is in "high" state (according to the 6532 datasheet it's always "high" at power up). This pin isn't connected to anything inside the console, so the idea was to use that signal, when the dumper is installed inside the console, to automatically switch to the game when needed. (you'll need a circuit to implement the logic). I haven't actually tested this feature.
Here are the files:
EDIT: Albert gave me permission to edit this post, so I'll just keep the latest version attached here. I removed previous revisions to avoid confusion
2600dumper_v064-2011-08-11.zip 16.17KB 125 downloads
In the archive you'll find the dumper rom and the command line utility (I included the C source file and the windows executable that I tested using wine, because I don't have windows on my PC). I didn't include the source for the dumper rom. It was my intention to clean it a bit before posting it (it's a big mess right now..), but haven't found the time yet.
Edited by alex_79, Tue Nov 1, 2011 5:24 PM.