Jump to content
IGNORED

DIY 2600+ flash cart with a Raspberry Pico


karri

Recommended Posts

As I don't happen to own any 2600 compatible flash carts I tried to make something simple. Google told me that this idea has failed before. But that may be because of speed considerations. As the 2600+ just dumps the cart my guess is that it is better suited for a Pico approach.

 

The image tells it all: glue a Pico on a PCB that has a 2600+ connector.

IMG_20231129_181914.thumb.jpg.6a27af8e3a670c1085165f68d5f08962.jpg

 

After that solder the wires to correct places on the pcb.

 

Pico2600.thumb.jpg.adfa168dc7f0acdab84323bec8e9a530.jpg

 

Once I get the soldering done I will try to copy relevant code from nickbild/picoROM: Emulate ROM chips with a Raspberry Pi Pico. (github.com) and see it I can get this to work with 2600+ dumper. The goal is to program a 4k game into RAM and when it is ready I switch the ROM emulation on and the dumper would read the cart image from the Pico's RAM.

  • Like 6
Link to comment
Share on other sites

The wiring is done!

IMG_20231130_120247.thumb.jpg.47adcaa32f8870cfa0ab3967b2cfdc03.jpg

 

Unfortunately I have some family-duties today. The software for this USB flashcart that can hold one game only will be written later.

 

There are some dangers in this design:

- pico is a 3.3V device that can run at 5V - but breaks at 5.5V. So we are very close to the edge.

- pico will be overclocked to 400MHz to run everything in RAM. Hopefully it works.

- don't connect usb power to pico if the cart is in the  console.

 

Advantages:

- pico is cheap. About €4.

- it is fun to do.

 

Thoughts:

- if I disconnect the line going from pico VSYS to 5V I should be able to power the pico while it is in the console. This would allow me to monitor the traffic generated by the dumper.

- I might add a resistor between pico VSYS and 5V from the console to protect pico.

  • Like 3
Link to comment
Share on other sites

On 11/30/2023 at 12:24 PM, MittyOz said:

If this works you will sell a million of them.  Well, maybe not a million.  

Lol. I am not in the business to sell anything. I am a developer. 😁

Besides... Soldering the wires took at least an hour for me.

 

But if someone is interested I have a bunch of left-over pcb's that I can give away for the postage.

These pcb's are gone already.

  • Like 1
Link to comment
Share on other sites

2 hours ago, Dionoid said:

With a 2600+ that might not be a problem.

That is what I am counting on. There is also another advantage in the 2600+. When the contents change the 2600+ will start loading the cart again. So I might be able to transfer new content to the cart using a 133MHz clock and code it in the flash. When the cart is populated in RAM I could jump there, turn on 400MHz overclocking and release the data for the 2600+. And turn on a led.

 

But I am busy with the traditional XMas jam that ends on the 17th of December. It is a 3 week jam to create a new game within some restrictions. This year I try to make a dual release for the Lynx and the 7800.

 

After the jam there is time for this project again.

 

PS. if this works I could create blank pcb boards with a place for a socketed Pico. My guess is that the pcb would only cost about 3€ with gold immersion for decent edge connectors.

 

1) There is one thing I don't know about the 2600+. Is it possible to have the extra two connectors on both sides of the 2600 connector and still play 2600 games? Or do the extra connectors get sensed somehow and allow only 7800 games?

 

2) Would it make sense to create a pcb with two connectors? One 2600 connector on one end and a 7800 connector on the other end. Then you could use it on real 2600 and 7800 hw too.

 

3) What about a power source on the cart to overcome the start delay? Perhaps a diode on the pcb that allows you to power the pico over usb even when it is in the console?

 

4) There is a wifi pico version that costs €12. The normal pico is about €5. This might allow you to beam over games wirelessly to the cart.

  • Like 2
Link to comment
Share on other sites

I always admire proper hardware modders. Mainly because I know a lot more about hardware than software, albeit lacking technical skill... which ironically makes me deathly afraid to screw with Hardware.

If I were trained, ignorant, or arrogant enough I would, but the amount of ways to easily destroy hardware without even trying makes me terrified to pick up an iron and try it. Same reason I still buy prebuilts even though I know full-well how to build a PC. The amount of borderline arbitrary things that can completely destroy a piece of tech puts the fear of god in me. You can reinstall corrupted software, you can't "unfry" hardware.

 

Granted, <$10 is a fun experiment. Best of luck. You are braver than me.

Not that I think this'll break a 2600+, but I'm not willing to find out on my own. lol.

Edited by Warboss Gegguz
Link to comment
Share on other sites

Today I was chilling after my evening sauna and decided to write Air-Sea Battle as a first test. The first thing is that it is a 2k game only. As one address pin is missing I assume that I have to write the binary twice in RAM. I don't know where the 2600 expects to find the code...

Writing the code and compiling it took about 45 minutes. Not bad as it was my first encounter with the Raspberry Pico. (And pretty much with the 2600 too...)

 

Anyway the source is included in case some more experienced wants to share some advice.

 

I have not tested the cart yet. Perhaps tomorrow...

 

The code compiled nicely and created a file that I can drag to the pico over the USB.

 

There is also the buildrom.py that creates the code from a a26 file. Only 2k/4k so far.

 

rom.c

pico_rom.uf2

buildrom.py

  • Like 6
Link to comment
Share on other sites

Loading game failed...

(I already fixed the bug in missing address lines in my code)

 

I have no time to dig into this before Xmas...

 

Perhaps I need to add real data bus buffers that get controlled by A12. Then I could speed up the rom emulation when I don't have to flip the pins between input and output.

 

But this means creating a pcb...

  • Like 2
Link to comment
Share on other sites

As I am more experienced with 7800 I decided to try to use the Pico for running a 7800 game. It worked! At the 1st time.

Here is the script for generating the rom.c that you need to run through the Pico compiler. It will populate the rom content in the Pico flash.

 

build78rom16k.py

 

And the output file to drag into the Pico to program it.

 

centipede.uf2

 

Now when I know that the hw is ok I just have to study the 2600 a bit to write the right stuff on the Pico.

 

My next task is to write Happybird for the 2600 on the Pico card. It is a nice game by @bsteux. I just compiled his sources for this game. The challenge is in implementing the F6 bankswitching in the Pico in software.

 

  • Like 8
Link to comment
Share on other sites

For some strange reason I can create 7800 games to load from the cart. But not 2600 games. Perhaps the 7800 edge connector has something to do with it?

 

So I decided to solder another Pico on a cart where I snapped away the extra parts to make it a 2600 connector :) 

IMG_20231211_133042.thumb.jpg.2b952c5f45bdd410d4b5455f58a983de.jpg

Link to comment
Share on other sites

This is overcool. I never had a look at the Pico before. It's really cool : dual core ? which means we could manage the bus on one core and emulate a Pokey on the second one ? Wouah, I think you've had a great idea. Don't forget to route the HALT line and the sound line if you make a 7800 cart PCB 🙂. And thanks for choosing Paul's Happybird ! Implementing the save score feature and the PlusROM data transmission would be awesome. I'll have a look at it when I'll have a little time ahead. It really worked out of the box ? Didn't think the GPIOs would be 5V tolerant... That's great.

  • Thanks 1
Link to comment
Share on other sites

35 minutes ago, karri said:

Great idea! I happen to have the design in KiCad already. Perhaps there is some suitable analogie or pcm pins for the audio?

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

  • Like 1
Link to comment
Share on other sites

16 hours ago, bsteux said:

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

The number of pins on the Pico is almost used up. There is still 4 pins that are in use on the Pico board itself so in case of real need you could use thin wires and remove parts from the board to get all the pins to the connector.

Pico2600.thumb.png.cf8770105c5535dfa5da38a1af1b9419.png

The last address A15 is not in a logical place GPIO15 as the data pins need to be next to each other GPIO15-GPIO22. So unfortunately you need special code to check for A15.

 

Some pins are not available at the pico edges:

Pins GPIO23 -  Controls the on-board SMPS Power Save pin

GPIO24 - VBUS sense

GPIO25 - LED control

GPIO29 - in ADC mode (ADC3), used to measure VSYS/3

 

Some pins from the header do not have a suitable pin on the pico. So I added them to a pin header for easier hacking in the future.

 

But I already added Halt and Exaudio as seen in the schematics above.

 

I still have to test some larger games to see how they work with the A15 pin.

 

Once I get the pcb design done I plan to make a small order of this design to see where it takes us. If someone is interested to try this out drop me a line so I know how many protos to order. I do send complimentary copies to @bsteux and a few for myself.

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

I've ordered a kit on my side to start developing on the RPi Pico. It really looks like a perfect solution for making low cost cartridges, especially if it is 5V tolerant (it's out of specs apparently, but when looking around on the web, it looks like it's rugged enough to support this over-voltage). The chip itself is 0.75€ on Mouser. And the Rust support is OK, which is big plus (to me at least) ! Very nice work, thanks.

Link to comment
Share on other sites

Have you tried your design with A15 on GPIO26_ADC0 ? It looks from the PICO datasheet that ADC pints don't like 5V :

"One thing to note is that the ADC capable GPIO26-29 have an internal reverse diode to the VDDIO (3V3) rail and so the
input voltage must not exceed VDDIO plus about 300mV. Also, if the RP2040 is unpowered, applying a voltage to these
GPIO pins will 'leak' through the diode into the VDDIO rail. Normal digital GPIO pins 0-25 (and also the debug pins) do
not have this restriction and therefore voltage can safely be applied to these pins when RP2040 is unpowered." (p.17).

This is confirmed by:

https://hackaday.com/2023/04/05/rp2040-and-5v-logic-best-friends-this-fx9000p-confirms/

Maybe some level shifters for these few pins would protect them ?

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...