Jump to content
IGNORED

DIY 2600+ flash cart with a Raspberry Pico


karri

Recommended Posts

For simplicity and easy availability I chose a voltage divider instead of an active chip to protect the GPIO_ADC pins. According to the forum simple serial resistors do not protect enough.

 

Pico2600.thumb.png.2098d852d15c67d1e89266bf09fcfabe.png

 

I also removed the solder bridge to replace the diode. But as the Pico is not ok with 5.5V I thought that the voltage drop by the diode is a good thing. It also prevents the usb to power up the console in case you forgot the usb cable on.

 

Today I play in a gig. And the deadline of my Xmas jam is in 3 days so I take a short break from the pico. Please give your comments if you find something wrong with this. The layout does not yet reflect the changes in the schematic. I might also make the left edge straight and leave the usb side as it is. This would force you to put the cart in the right way in the 3D printed enclosure.

Pico2600f.thumb.png.d0629665c4da1c52c239d79b19ca49dd.png

  • Like 4
Link to comment
Share on other sites

I could not help to think about the access to the USB connector. So I shaved the board to match the connector.

Pico2600f.thumb.png.01eeed79c380fa7abdb1e56002fd2a05.png

For the silk screen I thought of using logical names like Halt, Exaudio, A15 instead of component values. And add a SMT footprint for the diode so you can mount whatever you find.

 

You also need to be able to push the white button when flashing a new game. Perhaps the easiest way would by to leave a hole in the enclosure so you can keep the button pressed when you connect the pico to your laptop. This is needed to set it in usb memory stick mode. So you can drag a file to it.

  • Like 2
Link to comment
Share on other sites

On 12/12/2023 at 11:25 PM, bsteux said:

Probably a PWM output with a serial resistor should be enough to get Pokey like sound. It's not hifi after all..

If the goal is just to make it for the 2600+ you can save yourself the trouble. The audio pin on the 2600+ connector is not connected to anything (other than a test pad). All external sound (hardware) needs to be emulated

 

 

Link to comment
Share on other sites

On 12/15/2023 at 2:25 PM, Blinky said:

If the goal is just to make it for the 2600+ you can save yourself the trouble. The audio pin on the 2600+ connector is not connected to anything (other than a test pad). All external sound (hardware) needs to be emulated

 

 

I have a real 7800 also and of course I hope to be able to use the pico for that too. The reason of the 2600 connector is to try to run pico on a real 2600 too. But this is more like a test run to see how well it works.

 

On the 2600+ I am interested to see if it can recognize the simulation on pico and possibly emulate it correctly on the 2600+.

 

I just sent in the gerbers to get this manufactured. So I should have the boards in 2023.

Pico2600f.thumb.png.1163bfe4d4d6831688812f313c28a6bf.pngPico2600b.thumb.png.37893abdbbe77e7a480e4cff9ddb1cea.png

For creating the enclosure I have the measurements of the pcb. The board thickness is 1.6mm.

The box should be 18mm longer than the pcb. So there should be 9mm air before the edge connector starts.

Obviously the center of the connectors are exactly at the center of the box. The pcb is not symmetrical.

measurements.thumb.png.1837edb39996cdf53ce461a3e2647894.png

 

And I forgot to add the message to the back side silkscreen:

"If you can read this message you have inserted the cart correctly in your console"

 

So always insert the cart so that the Pico is towards the back side of the console.

  • Like 4
Link to comment
Share on other sites

I just got the message that my new pcb's will arrive after Christmas on the 27th. So with good luck with customs and holidays I may still be able to test the final flash cart during 2023 :) 

 

The whole point is to make my own library of silly games I have written for the 7800. And having pico-based carts with 3D printed enclosures is the way to go.

 

I do not plan to manufacture these carts. But if this works I can share my pcb design so you can order pcb's from pcbway directly.

 

PS. I studied the test points under the Pico. The pretty large pad TP5 goes to the on-board LED. By removing the LED and soldering a wire to TP5 we could have the R/W signal to the cart also. That allows RAM and sound chip register writes! But I have to de-solder the LED.

 

PPS. The system appears to be too slow for a real 7800 and a real 2600.

 

PPPS. The 133 MHz is too slow even for 2600+. The best result is from running up to 428 MHz from RAM. Running from flash works at 291 MHz.

  • Like 4
Link to comment
Share on other sites

I just got the Atari 7800 to run happybird on the Pico cart.

 

The trick was to cut the power intake from the Atari 7800 and instead feed the cart from an USB powerbank. This makes the cart contain everything in RAM when you turn on the console. :) 

IMG_20231221_210519.thumb.jpg.c7acd287074a4e3e28a447445976e158.jpg

 

It did not work with the 291MHz clock running the cart from flash. But with 400MHz running from RAM it was happy.

 

So this brings hope that the Pico flash cart could be usable for the original consoles as well! Time to start thinking about Pokey emulation on the 2nd core of the Pico.

 

The happybird Atari 2600 game is a 16k game with F6 bankswitching implemented in Pico's software.

 

There were no colours so I assume that this is not a PAL release?

 

Edit: I just realized that by adding a 100uF capacitor I could probably keep the Pico powered long enough to restart the console. So I could start the console once to load the capacitor. And then turn it off/on for the 2nd run. At the 2nd start the code would be running on the Pico already. So for a real console I put in the cart and start the console twice. No powerbank needed. The schottky diode prevents the 100uF capacitor to discharge while the power of the console is off.

  • Like 5
Link to comment
Share on other sites

On 12/11/2023 at 9:24 AM, karri said:

Perhaps something like this would be cool for a cheap single-game cart?

Pico2600.thumb.png.ffaf097d61a8fac5beae12ea9044af30.png

 

You could plug it as a 7800 game one way and as a 2600 game the other way. :) 

And when you have something new you can just flash it over the old one.

 

I would definitely be interested in something like this. I think it would be super cool. If you offer something like this (just the board), I'd definitely be interested in it. I can solder pretty well... just not sure I'd want that spaghetti monster you've got for your test mule... haha.

 

Thanks!

Link to comment
Share on other sites

7 hours ago, 82-T/A said:

 

I would definitely be interested in something like this. I think it would be super cool. If you offer something like this (just the board), I'd definitely be interested in it. I can solder pretty well... just not sure I'd want that spaghetti monster you've got for your test mule... haha.

 

Thanks!

Yes, I do have a few extra boards and probably some minor parts like chip resistors and a schottky diode. Sending them as a letter should be fairly cheap. I just have to do the math to get the resistor values.

 

The high voltage should be above 2.7V from the sender and that should deliver 2.0V to the Pico. So the R6 should be around 3.9k and R4 10k.

If the input is 5V the Pico would see 3.6V which is also ok.

 

For the exaudio we probably aim for 0.5V. So R1 10k, R2 1k. Just wild guessing. Or R1 47k and leave out the R2.

Pico2600.thumb.jpg.c2a125f6bb1aa9d72046558eab252406.jpg

The weight is below 50g so to the US the cart, resistors, diode + priority letter is €20. For EU €15. Send PM if interested. This is just the loose parts without a Pico.

  • Like 1
Link to comment
Share on other sites

There is a risk that you plug in the cart backwards in the cart socket. I also realized that you can easily fit Pico upside down in an enclosure. The way to make an enclosure is to put some extra obstacles in the box so that the Pico cannot be inserted upside down.

Nyttkuva2023-12-24184303.thumb.png.d4ac07d50047c1e789dcbdd5d0417328.png

The USB socket is also pretty deep inside the enclosure. That is why there is a big cut in one side.

 

  • Like 5
Link to comment
Share on other sites

I just got the PCB's from DHL. It is just beautiful. Golden fingers and 30 degree slopes at the edges milled away in order to protect the cart connector.

IMG_20231228_152258.thumb.jpg.7f9d110e0754a8da4ce841c4f752620c.jpg

I was thinking about naming the cart "Otaku Flash". I kind of like to pick a name that describes a nerd in Japanese. If someone who really knows Japanese and thinks this name in not ok - please tell me.

 

In the beginning of 2024 I plan to make a small 40 carts release of my Rainbow game on this. The game has low replay value. Is it more like a small novel. So you can then flash something else on the cart after playing the game.

 

When I designed the cart I was not sure if I need more I/O pins than the obvious ones that are available on the Pico. So I left some clean space under the test points. The TP5 is connected to GP25 that controls the LED. I did drill a 2mm hole in the PCB in case I need to add a wire from some signal to it. This may be needed for Pokey emulation or 7800 RAM access. I really don't know.

IMG_20231228_161416.thumb.jpg.e493727cd1e99707b3e1e23eaedf0e37.jpgIMG_20231228_162137.thumb.jpg.f3dc2d44842fdedb24762c93339c9139.jpg

  • Like 5
  • Thanks 2
Link to comment
Share on other sites

And the new PCB design works on a real Atari 7800. Now I also confirmed that the Atari 2600 games work even through the 7800 connector on a real Atari 7800 unit.

And also on the 2600+ through the 7800 connector! So making a dual connector flash cart was not necessary. Unless you want to run 2600 games on a real 2600 console.

 

I believe the lack of colours has to do with TIA somehow. The 7800 games are displayed in nice colours but I probably screwed up something when I did the S-Video mod to my Atari 7800.

 

  • Like 4
Link to comment
Share on other sites

After soldering everything I realized that the HALT line and the EXAUDIO line are not connected to the 2600+. So it would be better to connect some other lines. Well, perhaps I find out what I need when I get some more experience in trying to get games to work from the flash cart.

IMG_20231229_221013.thumb.jpg.5045ebb99bdf562795ebeee00cd9eea2.jpg

  • Like 4
Link to comment
Share on other sites

2 minutes ago, undefinedopcode said:

Following this with excitement. If you ever offer these boards for sale (kit or otherwise), I'd love to get my hands on one. :D 

I have some extra boards at the moment. Easiest for me is to send the parts in an envelope and let you solder them together.

 

An envelope with the pcb, Pico, diode and resistors is below 50g so I could send it as a priority letter for €27. Or if you already have a Pico it would be €20. This is just the current proto series. Send me a PM with your name, address, email or phone for the customs declaration.

  • Like 1
Link to comment
Share on other sites

For the people who want to compile stuff for this cart you need to set up the suitable compiler.

There is a nice step-by-step guide in How to Program Raspberry Pi Pico using C/C++ SDK (circuitdigest.com)

 

Basically use linux and type:

mkdir ~/raspberry-pi-pico
cd ~/raspberry-pi-pico
wget https://raw.githubusercontent.com/raspberrypi/pico-setup/master/pico_setup.sh
chmod +x pico_setup.sh
./pico_setup.sh

This should install everything you need.

 

You can now compile everything by

cd raspberry-pi-pico/pico/pico-examples
mkdir build
cd build
cmake ..

 

At this point I decided to just add a subdirectory for my pico_rom experiments.

 

There is a file at pico-examples/CMakeLists.txt

 

It has several subdirectories. so I just edit the list and add one more subdirectory in the same place where the other subdirectories are mentioned.

 

#Add pico_rom
add_subdirectory(pico_rom)

 

The next step is to create the pico_rom subdirectory.

 

in pico-examples do

 

mkdir pico_rom

 

And copy the attached CMakeLists.txt, pin_definitions.h and rom.c to the pico_rom subdirectory.

CMakeLists.txt

pin_definitions.h

rom.c

 

After this go back to the pico-examples/build directory and type

 

cmake ..

 

This will create a new Makefile that has support for pico_rom.

 

Then just type

 

make

 

and the resulting binary is in build/pico_rom/pico_rom.uf2

 

The next step it to connect your Pico via USB to your PC. Press the white button on the Pico while inserting it into the USB and Pico will pop up a directory showing two files on it. Drag the pico_rom.uf2 file to the folder that Pico popped up and wait a few seconds before removing Pico.

 

When you insert the flash board with the Pico in your console be sure to put the component part away from you. You should only see the empty PCB board. All components are towards the back of the console.

 

This is all you need for the 2600+. It you want to run this on a real 7800 I had to keep the cart powered up by a power bank before I switched on the 7800. Once the game starts you can remove the power bank.

 

The next steps is how to write new versions of rom.c to support other carts. Currently I have a few Python3 scripts that can create rom.c files.

 

For creating 2600 builds from a single 4k ROM

build26rom4k.py

 

For creating 2600 builds from a 16k ROM

build26rom16k.py

 

For creating 7800 builds from a 16k ROM like Centipede

build78rom16k.py

 

This whole project is just experimental playing with the 2600+. There is no guarantees that things work. Have fun.

  • Like 1
Link to comment
Share on other sites

I am slowly moving all my scripts, designs and documents to github for easier access.

 

karrika/Otaku-flash: A single game flash card for Atari 2600, Atari 7800 and Atari 2600+ (github.com)

 

There is also the KiCad 7 files for the card design. Schematics, board layout, board measures.

 

PS. The latest addition is the F4 bankswitching for Atari 2600. I just played the slideboy_final.bin on the Pico. It is a really well made game by @vhzc. Anyway, I do have the game for the 7800 as an original cart and I like it. The 2600 version is not bad either.

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

1 hour ago, Spanner said:

If you think about it this is like the Easy Flash Cartridge on the C64, it could only hold one game on it, its kind of like the same idea... :) The Atari Easy Flash... :)
The best things are always made by users... :) you might be able to get some ideas from it.. :)
https://www.c64-wiki.com/wiki/EasyFlash

At least it fills the gap I had for my Atari 2600 curiosity. As I only had an Atari 7800 I never had the urge to explore what the 2600 is all about. With this flash cart I have tried quite a lot of the modern 2600 homebrews and I am positively surprised.

 

But I hope other users could contribute in writing emulators for the large variety of banking schemes. There is place in the Otaku-flash github repository... And I still have bare pcb boards available.

  • Like 1
Link to comment
Share on other sites

New member here, so first post and a first hello.  So Hello!

 

I've been also working making a PicoROM cart for the 2600+, and I've got a working prototype.  It uses dip switches to select the rom and has a reset switch for hot-swapping on the 2600+.  I don't have a real 2600, but it's working great on the 2600+.  Just adjust the DIPs, hit the reset and new game loads.  I've added bank-switching for 4K, 8K, 16K and 32K ROMS.

 

The proto board uses SN74LVC245AN bus-transceivers to deal with 5V-3.3V logic and capacitor and diode for power protection.  I've a complete novice at this, but it was fun doing the hand-wiring, coding and getting a working project.  Maybe some of the ideas might be useful.  Pictures attached.  Next is figuring out a circuit board and a case!

 

Code and schematic are available here: https://github.com/jasonfrowe/atari2600cart

 

Now I'm off to try all the cool home brews and demos.

IMG_6257.png

IMG_6255.png

IMG_6256.png

  • Like 6
  • Thanks 2
Link to comment
Share on other sites

Some news about the Otaku-flash cart. After some optimizing of the code I found out that I can run the code from the Pico flash as well on a real Atari 7800. So the weird 400MHz RAM trick is no longer needed.

 

This opens up some interesting options for making the cart work with more complex schemes.

 

    while (true) {
        // Set the data on the bus anyway
        addr = gpio_get_all();
        gpio_put_masked(0x7f8000, rom_contents[(addr & ROM_MASK) + bank] << 15);
        // Disable data bus output if it was a ROM access
	new_rom_in_use = (addr & ROM_IN_USE) ? 1 : 0;
        if (new_rom_in_use != rom_in_use) {
            rom_in_use = 1 - rom_in_use;
            if (rom_in_use) {
                gpio_set_dir_out_masked(0x7f8000);
            } else {
                gpio_set_dir_in_masked(0x7f8000);
            }
        }
        // Do bankswitching
        switch (addr & ADDR_MASK) {
        case 0x1ff6:
            bank = 0;
            break;
        case 0x1ff7:
            bank = 4096;
            break;
        case 0x1ff8:
            bank = 8192;
            break;
        case 0x1ff9:
            bank = 12288;
            break;
        default:
            break;
        }
    }

 

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

that's a nice simple solution that mirrors the original picoROM code nicely.  I will have to adopt that scheme as well.  Thank again for all the updates.  It was your code that helped me reach the 'ahah' moment with my project.  Now I need to find some time to convert my spaghetti wiring into a nice circuit board.

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...