Jump to content

alex_79

Members
  • Posts

    2,166
  • Joined

  • Last visited

  • Days Won

    1

Blog Entries posted by alex_79

  1. alex_79
    I already posted some earlier version of these "cartridge dumper" roms in the forums (link), but I think it's better (and easier to keep up to date in case I release newer versions) to have all of them in one place. (Actually this is more meant as a backup copy for myself...)
     
    These are stripped down versions of the menu-based cartridge dumper that I made years ago (I put up this other blog entry with an updated version of that one too). They allow to dump 2600 cartridges using a stock 2600 console. In fact, if you use the "Audio" transfer method, and you "hot-swap" cartridges, it doesn't require any custom hardware.
    Optional extra hardware allows to use a faster Serial transmission, or to keep both cartridges connected and enable them alternatively instead of unplugging and plugging them with the console powered on.
     
    Instead of an on-screen menu which allows to select the cartridge type, transfer method and transfer speed, in this case there are separate binaries for each combination of those settings. I think these are easier to use with programmable cartridges (Harmony, Unocart, Pluscart, Supercharger), as you just load the version you need and you are ready to start the dump, while the menu version requires to first set the correct options using the console switches to navigate the on-screen menu. The latter makes more sense if you're burning an eprom cart, or if you need to use the "custom" mode, to attempt dumping some unsupported bankswitching type.
     
    There are 8 Cartridge types supported: 4k (non bankswicthed), F8, F6, F4, FE, FA, E0, E7.
     
    2 transfer methods: Audio or Serial.
     
    2 speeds: slow (520 baud Audio or 19200 baud Serial) and fast (1300 baud Audio or 38400 baud Serial)
     
    When combined, it adds up to 32 different versions. Here are the binaries for use with flashcarts:
    2600dumper_sa.zip
     
    Here the audio files ready for Supercharger/Cuttle Cart I
    2600dumper_sa_Supercharger.zip
     
    Source:
    2600dumper_sa.asm
     
    ______________________
    Connections:
     
    If you choose the "Audio" method, you need to record the audio output from the console, save it o a PC as uncompressed "wav" file, and then use a small utility program to convert it into a binary file. (or you can just post the recording here or by PM and I'll convert for you). 
    If the console is A/V modded, then you can connect directly the audio output to a PC soundcard (or any other device you're using to record the audio). Else, you could use the headphone jack of the TV (if it has one), or an old VCR to demodulate the rf output into separate video and audio signals. If you're in Europe, the audio signal can also be picked up from the TV SCART socket.
    It's important that the TV is fine tuned to have the best audio possible (sometimes this doesn't correspond to the best video!). You might need to play a bit with the volume settings before you get reliable recordings. To test this you don't need to hot-swap cartridges: just leave the cart with the dumper rom inserted and let it dump itself.
     
    For the Serial connection some sort of adapter is required. The TTL serial signal is on pin 1 of the right controller port. If using a TTL serial to USB adapter, you only need to connect the RX pin to pin  1 of the controller port, and GND to pin 8. If you're using a real RS232 port, or a USB to RS232 adapter, you'll need a lever converter. These can be easily found, but there are also a lot of schematics to build one yourself if you prefer. They typically use a MAX232 IC, but you can also build one with a few discrete components that you might already have in your parts bin. I successfully build this one: https://web.archive.org/web/20080218095911/http://www.uchobby.com/index.php/2007/06/11/ttl-to-rs232-adaptor-explained/ and it always worked fine with both "real" serial ports and USB adapters. Note that you actually only need to build half of it (the "TTL TX to RS232 RX" part) for this application, as the communication is unidirectional.
    The serial port has to be configured to 8N1 (8 data bits, no parity, 1 stop bit) and 19200 or 38400 baud, depending on which speed you choose to use. (try the fastest one, and switch to the slower one if you encounter any issue). The dump is sent as raw binary, so you need a terminal emulator program that can capture raw data from the serial port. On linux I actually just use the "cat" command from the bash shell after setting the port correctly, and it works just fine for me.
     
    ______________________
    How to dump a cartridge (hot-swapping method):
     
    1 - Load the dumper rom for the cart type you're trying to dump and the transfer method/speed of your choice. The slower ones should be more reliable, so try those in case of problems. The screen will show two vertical bars with cycling colors at the two sides. If you're using the audio transfer, you'll hear a continuous tone. Note that this isn't a proper TV signal, as there's not vertical synchronization (I attempted to generate a more on spec signal in previous versions, but it never worked very well and in the end I dropped it).
     
    2 - Without powering off the console, unplug the cart you used to load the rom. If the two bars are not there anymore, or if they're solid color, the program crashed. Retry from the beginning in this case, else proceed with the following step.
     
    3 - Without powering off the console, plug the cart you want to dump. If the bars are still there and if they're still cycling colors, proceed with the next step. Else try again from the beginning.
     
    4 - Start recording (if using the audio method), or the data capture (if using the Serial one).
     
    5 - Press the RESET switch on the console until the screen goes black.
     
    6 - When the bars reappear, the transfer is complete. You can now stop the recording/capture software. Note that the audio transfer is S L O W ! (up to a minute and a half for a simple 4k game). You can dump the same game again by pressing RESET at this point.
     
    If you used the "Serial " method, you only have to save the captured data and no further step is necessary.
    In case of "audio" method, instead, save the recording as uncompressed "wav" file and then convert it to binary using the command line utility attached below. If you prefer, you can post the wav file here on the forums (or by PM) and I'll convert it for you.
     
    ______________________
    Notes:
    Hot-swapping cartridges is potentially dangerous for the carts and/or the console. That said, I did it several times without any issue, and I imagine it wasn't that uncommon to happen also back in the day, since video game consoles were used by kids, so I think the risk is minimal.
    In any case, I assume no responsibility for any damage that can be caused by using the software described in this post.
    A way to reduce the potential risk, is to build a cart switcher, or modify one of the existing ones such as the Video Game Brain.
     
    ______________________
    Utility for converting audio files to binary
     
    The only change compared to the version I posted in the old thread is that the program now prints the position (in seconds) on the audio file where it stopped converting data, which is sometimes useful to track down issues in a waveform that fails to convert properly. (Note that the program also still accepts an ascii file as input, which is what the original version of the dumper outputted through the serial connection and required to be converted too. This is no longer used by the latest version)
    As you can notice by looking at the source, I'm not a programmer...
     
    In case someone wants to code a better converter utility, details of the audio format can be found in the comments in the asm source above.
     
    This is a command line program. Just specify the input and output filenames. If you omit the latter, it will be named "out.bin".
    e.g.:
    2600dumper inputfile.wav outputfile.bin  
     
    Source:
    2600dumper.c
     
    Windows executable (32 bit). I use Linux and don't have any Windows machine, so I only tested this in wine, and it seems to work.
    2600dumper.exe
     
     
     
     
  2. alex_79
    I originally posted this in the forums quite a few years ago:
    When, more recently, I revisited it to strip it down into separate roms each hard-coded for a single bankswitching type and transfer method, I also updated the original a bit.
    The source is quite a mess, as I really have very little programming skills in general, and this one was actually one of my first attempts at coding in assembly, after learning it by reading the tutorials and programming threads here on AtariAge. Since I didn't really want to try to understand what my old messy menu code is doing, nor to redo it from scratch, I only hacked in a few changes and called it a day! ?
     
    Most relevant changes (more details can be found in the source):
    - removed a couple of bankswitching methods because, with the better knowledge I now have after over a decade on AA, I realized my original implementation for those couldn't actually work (I only have a small collection of carts, so I couldn't test all types).
    - updated the serial output: I increased the baudrate, and also changed it to output raw binary data (previously it outputted ascii code that needed further conversion using an utility program). Now it takes about 1 second to send a 4k dump at the maximum speed (for comparison, using the audio method at the slowest speed, it takes 1 minute and a half!).
    - added an output signal on the right controller port that can be used to automate the cart switching. The picture below shows the dumper I originally built (a pass-through eprom cartridge) modified with an additional 3.5mm jack: by connecting a standard male to male audio cable between it and with the matching jack on my Serial adapter/level converter (which in turn plugs into the right controller port), the dumper automatically enables the cartridge when needed. When nothing is plugged in the jack, I manually select the dumper or the cart using the switch on the side.

     
    The menu is still the same flickering mess, with only minor changes. You're not supposed to look at it for very long, anyway, so I guess it's fine. You navigate the menu using the console switches and, optionally, a keyboard controller which is useful in "custom" mode to enter hex values directly. It used to support also a joystick controller, but I removed that when fixing the "debounce" of the switches which didn't work very well.
     
    Here is the latest binary and the source.
    2600dumper.bin
    2600dumper.asm
    And a pdf with basic instructions that I quickly put together:
    2600dumper_instructions.pdf
     
    Basically, after selecting the options using the menu, it works exactly like the separate versions posted in the previous blog entry. The conversion utility is the same too.
     
     
     
     
  3. alex_79
    I inaugurate my blog to show this little silly project of mine (mostly because I'm not sure in which forum would make more sense to post it...)
     
    Every once in a while I cherish the idea of building a routed track and buy a few slot cars to play with, and so I browse some websites and forums on the subject, looking for examples, construction techniques and wiring schemes.
     
    One of the aspects that increases the fun is a lap counter/timing system which also allows to play alone "against the clock". Other than commercial ready to use systems, there are a lot of DIY solutions from software running on a PC to standalone devices built using an arduino or other microcontroller. After looking at some of these examples, I thought that the Atari 2600 would serve the purpose just fine: it has several I/O pins available on the controller ports to read the sensors and also, for example, controlling a starting light and a relay to automatically power on/off to the track, and a video output to display the data. Moreover, in my scrap-parts bin, I had an old 5" B&W CRT surveillance monitor with some burn-in and geometry issues, but otherwise working and that would be ok for just displaying some numeric values, and a board from a 6-switch 2600 which only display in B&W (That's actually the console I mentioned in my very first post here, many years ago...)
     
    So after a few weeks, I came up with this:


     
    The thing is entirely made out of recycled parts (even switches, leds and connectors were scavenged from old electronics), because I'm cheap I care about the environment.
    I also mounted a practical handle for transportation.?
    The monitor has a few dents and scratches, which gives it a worn look. I like it this way.
     
    The software manages tracks with up to 4 lanes, displays lap times and gaps with 0.01s resolution  and it's extremely simple to use as there's no configuration and the only option is to set the time and number of laps for race duration.
    The display shows rather simple graphics (sufficient for this application), the digits are flicker free and easy to read (at least with up to 3 lanes. With 4 lanes, the resulting 13 rows of text are quite a bit compressed vertically), and there are enough cycles free to check the inputs often enough (5 scanlines is the maximum time between two consecutive polls of the sensors. That is, if I counted cycles correctly).

    Among the features there's the ability to control an external starting light and/or a relay for power and the transmission of the lap times to a PC through a serial connection.

    Here are some pictures of the inside.

     
    To free some room, I removed the power supply section of the monitor, so now it's powered by an external regulated 12V power supply rather than directly by the 220v mains. I had to shorten the Atari board to make it fit inside the metal case, mounted vertically on one side of the tube, and then restore some of the tracks that were cut with jumpers. I also removed all the components which were not needed, like those for the color generation circuit, including the extra PAL oscillator, and also had to relocate some components (the quartz crystal interfered with the CRT tube). I used a bare cartridge board to mount the eprom with the custom program and modified the cart connector so that it ends being parallel to the main board.
    Still, I need to loosen and rotate the yoke around the CRT neck, if I want to unplug the board (I had to do that a couple of times to reprogram the eprom because of late bug-fixes)

     
    Finally I wired the connectors and switches I needed to the corresponding RIOT and TIA I/O pins. I used a single 9 pin male socket for connection to the track. There are 4 (RIOT) pins used as inputs from the sensors, 1 (TIA) input to select polarity of the pulses, and 2 (RIOT) pins as outputs to drive a starting light and/or a relay. The female 9 pin connector is RS232 serial port to optionally transmit data to a PC. The port includes a TTL to RS232 kevel converter circuit built using discrete (recycled of course) components. I also added a small audio driver for a speaker, with volume pot and on/off switch (a bit overkill, as the sounds only consist in a few beeps...). Finally there are 3 push buttons to control the software: two on the front for the main functions (wired like the SELECT and RESET switches on a full console, but with inverted logic, because the switches I used are normally closed) and a smaller one, mounted on the rear panel wired to the pin normally used for the right difficulty switch, which is rarely needed (it's used to abort a race, to skip the starting procedure, or to reboot the software).
     

     
    I still had the old plastic 1/43 scale track from when I was a kid in the attic, and used that to test the thing.
    I decided to go with optical sensors, consisting in IR emitters mounted on a "bridge" positioned over the track (which also holds the starting lights) and photodiodes mounted under the surface.
    Again I used scrap parts: a small piece of aluminum square tube, and some sheet plastic cut and glued together.
    The IR emitters are from a couple of old remotes, while the photodiodes are scavenged from "dusk to dawn" sensor light bulbs.
    here a few pictures.

    You can see the two sensors mounted on the base, the track section where the bridge is positioned has two corresponding holes drilled.

    Here are the IR emitters, on the bottom of the bridge

     

    In this video you can see a short 5 laps race test (I found impossible to control both cars at the same time, so I just run them at reduced speed to shot the video). The laptop on the left is connected through the serial port (actually an usb to serial adapter), and you can see the lap times displayed in the terminal window on each pass. The system seems to work reliably, with no missed laps in my tests.
     
     
    I also made a version of the software that works on a standard console, so that I could quickly test it in Stella and on real hardware with an Harmony cart.
    Apart for the slightly difference in managing the console switches, this version is in color (?), and can optionally display a (blocky!) starting light on screen.
     


    Here are the roms (for different TV systems), in the unlikely case someone wants to give it a try (You can simulate the car passing over the sensors by connecting a joystick to the right controller port. the 4 lanes correspond to UP,DOWN,LEFT and RIGHT directions).
    laptimer2k6.zip
    Here's the manual (in Italian or Poor English...).
    laptimer2k6_docs.zip
     
    P.S. if you can't find an opponent to race against, a TI 99/4A computer can act as a substitute!
     
     
     
     
     
     
     
     
×
×
  • Create New...