Jump to content
IGNORED

DIY 2600+ flash cart with a Raspberry Pico


karri

Recommended Posts

19 minutes ago, astroguy said:

Now I need to find some time to convert my spaghetti wiring into a nice circuit board.

If you do make some boards, I can do 3D printed cases for them. I've done them for many projects including AtariAge and Commodore 64 projects.

  • Like 2
Link to comment
Share on other sites

2 hours ago, astroguy said:

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.

I might help with that :) 

 

I have a KiCad 7 project with schematics and board layout at my Otaku-flash repository. Just download the Otaku subdirectory. It contains the entire board design.

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

 

  • Like 1
Link to comment
Share on other sites

Here's a first draft for PCB and updated schematic for KiCad.  Feedback is welcome: dimensions, shape, etc...   I don't have much experience with SMB so sticking with THT.    I have one free GPIO which might be nice to hook up to a led to show power.

Screenshot 2024-01-10 at 11.09.45 PM.png

Screenshot 2024-01-10 at 11.12.15 PM.png

  • Like 1
Link to comment
Share on other sites

i am looking for a solution where my kids can play 2600 and 7800 homebrews on the 2600+ by themselves

 

so without any technical computer skills whatsoever

 

i am imagining something like a Harmony cartridge, with a simple menu

 

is this perhaps feasible with the Otaku board?

 

 

Link to comment
Share on other sites

8 hours ago, astroguy said:

Here's a first draft for PCB and updated schematic for KiCad.  Feedback is welcome: dimensions, shape, etc...   I don't have much experience with SMB so sticking with THT.    I have one free GPIO which might be nice to hook up to a led to show power.

Screenshot 2024-01-10 at 11.09.45 PM.png

Screenshot 2024-01-10 at 11.12.15 PM.png

Nice design: You should be able to use flash for all your games and fit them at 291MHz.

Link to comment
Share on other sites

33 minutes ago, Stechmann said:

i am looking for a solution where my kids can play 2600 and 7800 homebrews on the 2600+ by themselves

 

so without any technical computer skills whatsoever

 

i am imagining something like a Harmony cartridge, with a simple menu

 

is this perhaps feasible with the Otaku board?

 

 

Yes. But the Otaku board can only hold one game at a time just like a normal cart. The build scripts are still WIP so I don't have scripts for any complex games.

 

The idea was to share the build instructions to allow skilled hobbyists to create the carts locally. There is a prototype of a 3D printed cart shell on my github site. But I am hoping that @ChrisKewl has time to fine tune the cart shell soon.

 

For me it is easiest to just ship bare boards or bare boards with a Pico. Even a soldered board is possible if you really cannot do it yourself for en extra €5. But I don't want to send out anything that does not fit into a small envelope. The point is to have fun - not make the post office rich. The price is significantly lower for envelopes up to 50g.

 

Programming the board is pretty easy if you have a PC. Push the button, insert the usb cable, drag the file to the popped up folder.

NOTE: the files you drag to the cart are NOT game files. You need to drag files with the uf2 extension as they contain also the hardware logic for the Pico. It emulates real carts.

 

Using the board in a 2600+ is just like using a cart. Plug in the cart, play the game.

 

So if the kids want to play a homebrew without computer skills it is one homebrew per day as an adult has to re-program the cart. This is not a multicart.

  • Like 1
Link to comment
Share on other sites

Status info.

 

The 2600 games can be run on a real Atari 7800 at 291MHz from the flash. I did update all my build scripts for the 2600 games.

 

The 7800 games cause lots on artefacts on the screen when run at 291MHz. So unfortunately all the 7800 games will be run from RAM at 400MHz.

Link to comment
Share on other sites

19 minutes ago, karri said:

NOTE: the files you drag to the cart are NOT game files. You need to drag files with the uf2 extension as they contain also the hardware logic for the Pico. It emulates real carts.

Wow, I really don’t know what this means, and after trying a bit…I’m not even sure how to google it. 
 

How does it play the game without the game file? And searching for “Atari 2600 files with uf2 extension” is not really finding me anything useful.

Edited by Glorkbot
Link to comment
Share on other sites

Just now, Glorkbot said:

Wow, I really don’t know what this means, and after trying a bit…I’m not even sure how to google it. 

The thing is that the Pico is a small computer that can run programs. The programs for the Pico end in .uf2

 

So in order to create a program to run for pico you need to create a source file and compile it.

 

I do have scripts for creating the source file like:

 

build26rom2k.py

 

To use this you need to run it through a Python interpreter like

 

python3 build26rom2k.py Basketball\ \(1978\)\ \(Atari\).a26

 

this will create a file called rom.c. It contains the game and also the code to emulate a cart.

 

The next step is to compile rom.c by copying the rom.c into ~/raspberry-pi-pico/pico/pico-examples/pico_rom

Then you need to run "make" in ~/raspberry-pi-pico/pico/pico-examples/build directory

This will produce a program for Pico called pico_rom.uf2

You can then rename it to basketball.uf2 and whenever you want to use the cart for playing Basketball you can drag basketball.uf2 to the cart.

  • Like 1
Link to comment
Share on other sites

5 minutes ago, Stechmann said:

understood. however from what i gathered, this is because of to the software and not the hardware. in theory, with different firmware, couldnt the card behave very much like a Harmony?

All the pins are used up in the cart when you emulate 7800. For making a 2600 cart it can be a multicart. That is exactly what @astroguy is doing.

Link to comment
Share on other sites

46 minutes ago, karri said:

Nice design: You should be able to use flash for all your games and fit them at 291MHz.

Yes.  Currently works at 270MHz directly from flash without issues.  Which is nice as I can also monitor the serial port for debugging. 

 

At the moment I can fit ~192kb of cartridge ROM on the device.  With a bit of code clean up and removal of extra libraries that can probably be increased. 

 

I fixed one trace on the design I wasn't happy with.  I will not let the design sit in my head for a few days and then may order some boards for prototyping. 

Link to comment
Share on other sites

Just now, astroguy said:

they are arbitrary.  Teaching myself how to design a PCB. 

Sounds good. Make sure to lean on @karri when you have questions about that. If your board space is the same footprint (minus the 7800 cart hole side) then possibly could be easy for me to modify the 3D case for that too.

Link to comment
Share on other sites

@karri Could you use a Pico W and load the game through your phone to a website hosted by the cart . You could then use your fat capacitor

trick and restart the Atari with the new game on it. Not sure if the Pico could handle hosting a website and throwing "loading game" on the 2600

then when the game is loaded, "please restart".

  • Like 1
Link to comment
Share on other sites

I did some work with the idea of using a PicoW.  In practice it works with the 2600+

  • You use the EPROM library that provides persistent storage
  • the EPROM contains the current ROM that the 2600+ will load
  • you deliver a new payload via WIFI that the PicoW uses to rewrite the EPROM
  • hit reset and the new ROM is loaded. 

The benefit is that you don't need to wait for the wifi to start up to do anything and you don't need additional power sources, the cartridge 5V rail is sufficient.  I played with a AA battery pack for a while and it works, but it's bulky and you need additional circuits for stable power. 

I've only tested with flash which limits OC to ~270Mhz.  This is fine for the 2600+.

My code for the payload delivery is clunky and needs work.

Link to comment
Share on other sites

5 hours ago, astroguy said:

I did some work with the idea of using a PicoW.  In practice it works with the 2600+

  • You use the EPROM library that provides persistent storage
  • the EPROM contains the current ROM that the 2600+ will load
  • you deliver a new payload via WIFI that the PicoW uses to rewrite the EPROM
  • hit reset and the new ROM is loaded. 

The benefit is that you don't need to wait for the wifi to start up to do anything and you don't need additional power sources, the cartridge 5V rail is sufficient.  I played with a AA battery pack for a while and it works, but it's bulky and you need additional circuits for stable power. 

I've only tested with flash which limits OC to ~270Mhz.  This is fine for the 2600+.

My code for the payload delivery is clunky and needs work.

Thanks for the post. I don't yet have a PicoW but the idea sounds great.

 

Edit: the EEPROM has a maximim size of 4k. So it is not really usable.

Link to comment
Share on other sites

6 hours ago, karri said:

Thanks for the post. I don't yet have a PicoW but the idea sounds great.

 

Edit: the EEPROM has a maximim size of 4k. So it is not really usable.

The EEPROM must be aligned on 4K boundaries, otherwise the only limit is the flash size and the size of your code.  The calls are flash_range_erase() and flash_range_program() specifically.  The erase command works on sectors of 4K size and the program command works on 256 byte blocks.  TO make it work you need look at your compile UF2 and find the __flash_binary_end marker.  This tells you what part of the flash you could use for the EEPROM.  The danger is that if your code gets bigger you can easily have the EEPROM and program code stomp on each other.  I'll fix up my prototype code and share it once it's working better.

Link to comment
Share on other sites

Demo program attached for using a 32K EEPROM in flash.

 

However!!  The problem I ran into is loading WIFI, Flash and interrupts exhausts all ram onboard.  So you'll see in the code that I've disabled lots of normal functions I would use for cart building.  Maybe this can be improved with more reading, but at least the EEPROM read/write works with a 32K block.

flash_wifi.c

Link to comment
Share on other sites

@astroguy are you saying if we wanted wifi we'd have to have a separate power source to handle the additional load? Sure it sounds neat, especially if you gave it a USB-C header and find a nice USB power splitter to split the USB between the Atari 2600 and the cart.  Or am I misunderstanding what you are thinking? Thanks!

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