Jump to content
IGNORED

DIY 2600+ flash cart with a Raspberry Pico


karri

Recommended Posts

I don't have time to write everything tonight. But the compilation of a 128k RAM buffer and keeping a constant array in flash for the real rom data does not seem to be any problem for the Pico.

 

   text       data        bss        dec        hex    filename
 153456          0     132504     285960      45d08    pico_rom.elf

 

So there is still plenty of memory for the logic.

Link to comment
Share on other sites

Good news.  Wi-Fi cart beaming works great with MQTT.  For fun I setup a script that changes to a random ROM every 5 minutes.  Makes for an interesting play session.  Would be a great party feature. 
 

I need to clean up the code a bit, but it’ll be up on GitHub shortly. Right now the flash cart contains 16 ROMs selectable via DIP switches and can accept OTA ROMs.  Next up is adding the EEPROM flash to keep the OTA transfers persistent after reset.  

  • Like 3
Link to comment
Share on other sites

I added a new method for finding the correct bankswitching mode. Just call Stella and let it sort it out ;) 

import sys
import subprocess
import build26romF6

class rom:
    def __init__(self, fname):
        self.fname = fname

    def carttype(self):
        output = subprocess.check_output(['stella', '-rominfo', self.fname])
        for i in output.splitlines():
            l = i.strip()
            if l.startswith(bytes('Bankswitch Type:', 'utf-8')):
                b = l[16:].strip().split()
                self.type = b[0]

    def createrom(self):
        self.carttype()
        if self.type == b'F6*':
            r = build26romF6.rom(self.fname)
            fname = 'rom.c'
            f = open(fname, 'w')
            r.writedata(f)
            f.close()
        else:
            print(self.type, 'not supported, yet')

if __name__ == '__main__':
    fname=str(sys.argv[len(sys.argv)-1])
    game = rom(fname)
    game.createrom()

 

This pretty much takes away the guessing work of which bankswitch method to use. Just type

 

./build26 gamename.a26

 

and the script chooses the right Python files to do the work.

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

I decided to tackle something easier so I went for F-15 Hornet. It is an obscure 78AB format that only has a single bankswitch address.

 

So my RW pin is working nicely with the LED removed :) 

 

The first bank has the title image and the map.

IMG_20240117_200404.thumb.jpg.8d72b65dbe23ef1c489067bc27f84ab3.jpg

IMG_20240117_200423.thumb.jpg.aeaacd38db073fc78d8b6e6c84b3dbd6.jpg

 

The 2nd bank has the action

IMG_20240117_200436.thumb.jpg.9eb3e029027efe4cc5690509f2b8b5a9.jpg

 

It works nicely on Otaku flash cart on the 2600+ but not on the Atari 7800. Sigh... I wonder what the difference is?

 

Edit: I streamlined the code a little more and slowly the reality hits. The address and data bus changes gradually. So you really have to monitor the pins in a certain sequence in order to prohibit erroneous bank switching. The problematic pin right now is the RW pin. If you read it at the same time with the address pins you will get so many false positives...

  • Like 1
Link to comment
Share on other sites

Latest addition this morning:

 

SuperGame with EXFIX. The games like Crack'ed.

 

I could not find a simple SuperGame yet. They all seem to have extra modifications.

 

This works on the original Atari 7800.

IMG_20240118_1253111.thumb.jpg.23cdbda3a49de6657e74cbc8f93a362a.jpg

  • Like 2
Link to comment
Share on other sites

On 1/15/2024 at 9:11 PM, SuperZapperRecharge said:

Now I finally had time to implement EXRAM also for the SuperGame format. And it appear to work after the 2nd press of RESET. I wonder if the RAM has to be initialized to zero before use?

 

Here is a screenshot of the game playing on a Pico on a real Atari 7800.

IMG_20240118_190829.thumb.jpg.1f6a682211dec823840ff32f3afb6716.jpg

  • Like 3
Link to comment
Share on other sites

5 hours ago, karri said:

Now I finally had time to implement EXRAM also for the SuperGame format. And it appear to work after the 2nd press of RESET. I wonder if the RAM has to be initialized to zero before use?

 

Here is a screenshot of the game playing on a Pico on a real Atari 7800.

IMG_20240118_190829.thumb.jpg.1f6a682211dec823840ff32f3afb6716.jpg

Wow running one of the most recent home brews!

Link to comment
Share on other sites

27 minutes ago, skorphy said:

Got mine up and running. This thing is great. Time to start playing around with the games. Did anyone finish plans for a printable case? Thanks Karri!

PXL_20240119_162520476.MP.jpg

PXL_20240119_162506797.MP.jpg

Great! Really nice soldering btw.

 

I do have a printable case in my github that works. Not the pretties one.

case.thumb.jpg.21e157de2e4c3a47d08d97468e930374.jpg

Otaku-flash/OtakuBottom.stl at main · karrika/Otaku-flash (github.com)

 

Nyttkuva2024-01-19201702.thumb.png.0a3237d7c67f1083a791115f7620d466.png

Nyttkuva2024-01-19201832.thumb.png.2fc23caa00b76bb085f362990425072e.png

Nyttkuva2024-01-19201725.png.deff0775a79dba69137cb61fbd9bb446.png

@ChrisKewl is currently fine tuning it.

Link to comment
Share on other sites

On 1/18/2024 at 11:12 AM, karri said:

Now I finally had time to implement EXRAM also for the SuperGame format. And it appear to work after the 2nd press of RESET. I wonder if the RAM has to be initialized to zero before use?

 

Here is a screenshot of the game playing on a Pico on a real Atari 7800.

IMG_20240118_190829.thumb.jpg.1f6a682211dec823840ff32f3afb6716.jpg

I've always wanted this game on some kind of a cart LOL

Link to comment
Share on other sites

1 hour ago, tradyblix said:

I've always wanted this game on some kind of a cart LOL

The file I put on the cart is not the full game. It was without sound.

 

Using a Pico as a multicart is not a real multicart.

- You need to connect a powerbank to get the Pico going before applying power to your real console

- You need to convert your game to a Pico program (uf2 format)

 

Converting the game to uf2 format.

- use Linux on a PC or Raspberry pi

- have the raspberry-pico toolkit installed

- ./build26 game.a26

- ./build78 game.a78

 

Programming the game.uf2 to the Pico.

- keep the button in Pico pressed while attaching the USB cable to the PC or Raspberry Pi

- drag the game.uf2 to the window opened by Pico

 

What is available?

 

Parts in a bubble envelope. Total weigh less than 50g to keep postal costs decent.

- pcb, diode, resistors €5 (20g)

- Pico €7 (20g)

- posting to EU €10

- posting to US €15

 

As long as parts exist.

 

There may or may not be someone willing to develop this further and actually start manufacturing carts. But for the present this is for people who can use a soldering iron.

Link to comment
Share on other sites

2 hours ago, zezba9000 said:

This is awesome. Could maybe even load a game into ram from PC over USB?

Is POKEY emulation very hard to add in the second core?

I have no idea. But I allocated one pin for exaudio. The pin is capable of PWM output. So basically some kind of sound.

 

Pokey emulation may be possible using the second core. Any takers?

Link to comment
Share on other sites

I got a bit busy with my day-job, but I think I've got my board layout in a good place.  Fixed a few mistakes and tried to simply the traces as much as possible.  So time to order a prototype and see how it goes!  I have firmware for the Pico and Pico-W.  The Pico-W adds the ability to change ROMs via WIFI with MQTT. 

 

If the circuit boards works well then I'm thinking about taking a stab at the 7800, but I may try using a Teensy 4.1.  I have one from another project. 

Screenshot 2024-01-20 at 9.45.42 AM.png

  • Like 1
Link to comment
Share on other sites

It may be a good idea to see if the sound emulation goes anywhere. The Pico did not have enough pins for POKEY IRQ and CLK phase 2. Perhaps some clever support circuitry would allow the Pico to use these signals also?

 

The Toonsy 4.1 is probably a lot better.

Link to comment
Share on other sites

@karri Would there be more GPIO pins if I were to take on the huge task of making a cartridge board with an RP2040 soldered on board?

It's basically designing a a Pico right on the the cartridge PCB. This would be a big effort for me but I have seen a few videos on using the RP 2040.

 

Really not sure if I'm up to it but I'll research some.

Would be great to get that Pokey on the exaudio pin.

I know Pokey audio can be accessed on different addresses and I think this has been a pain for the Concerto cart.

Link to comment
Share on other sites

I tried to play Klax and wrote a new Atari 2600 bankswitching scheme F6SC for it with the 128 bytes of RAM. On my real 7800 it worked, but the colours were difficult to see.

IMG_20240121_153750.thumb.jpg.c1a794e6b5bde61e12df4037b38c530b.jpg

 

So I went upstairs to run it on the 2600+ and to my surprise I just got this screen:

IMG_20240121_153437.thumb.jpg.5ac82c499f9ccc1e6b6518ddd07bfa41.jpg

 

There was no way to actually start the game. Is the 2600 version Klax working with the 2600+ for others?

 

I also tried Millipede - another F6SC game for the 2600. The same thing. It works on the real 7800 but not on the 2600+.

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