Jump to content

Photo

UnoCart-2600 : a DIY SD multi-cart for the 2600

2600 sd card multicart stm32f4

85 replies to this topic

#1 electrotrains OFFLINE  

electrotrains

    Moonsweeper

  • 290 posts
  • Location:Scotland

Posted Sat Jan 27, 2018 7:04 AM

Hi All,

 

Some of you may know me from the Atari 8-bit forum - I've designed a couple of open-source multi-carts for the Atari 8-bit (the UnoCart and UltimateCart).

 

The Atari 8-bit was my childhood home computer, but I picked up a 2600 jr on ebay at xmas, since I fondly remembered playing Combat on a friend's Atari VCS after school. However I thought it would be nice to play some other games and try some of the more recent homebrew creations, and so...

 

Over the last couple of weeks, I've been busy building a version of the UnoCart for the Atari 2600 - The UnoCart-2600.

The video below shows it in action (code from a week or so ago - I've renamed it since then!)

 

 

Like the UnoCart, this is something you can build yourself with minimal soldering. It just requires an off-the-shelf STM32F4-DISCOVERY board, an SD-card breakout board, and a breakout board for the Atari 2600 cartridge slot. Everything can be hooked up with jumper wires.

 

The source code, firmware, breakout-PCB design and (very rough) building instructions are on a new github page for the project:

https://github.com/r...ds/UnoCart-2600

 

The cartridge successfully auto-detects and emulates pretty much all the ROM dumps available on AtariMania (with the exception of Pitfall II, since I'm not emulating the DSP stuff).

 

So far, this has just been tested on my Atari 2600 jr - would anybody else be interested in building one and helping me find any remaining bugs in the cartridge emulation?

 

I've got a few cartridge breakout PCBs spare, since that is the only part that is hard to obtain. PM me if interested?

 

Robin



#2 ls650 OFFLINE  

ls650

    Quadrunner

  • 7,137 posts
  • Atari rocks!
  • Location:British Columbia

Posted Sat Jan 27, 2018 10:09 AM

That's cool!



#3 SS OFFLINE  

SS

    Quadrunner

  • 5,866 posts
  • Location:Lehigh Valley, Pennsylvania

Posted Sat Jan 27, 2018 11:57 AM

Very interesting.  Are you thinking about making it Melody Board compatible?  



#4 electrotrains OFFLINE  

electrotrains

    Moonsweeper

  • Topic Starter
  • 290 posts
  • Location:Scotland

Posted Sat Jan 27, 2018 12:06 PM

Very interesting.  Are you thinking about making it Melody Board compatible?  

 

I'm not 100% sure of the details of the Melody board, but the UnoCart-2600 supports all the standard bankswitching methods so should be generally compatible with games designed for the melody I would guess.

 

However, it doesn't support any of the DPC or DPC+ stuff though (which as far as I know is not open source) though I guess could maybe be reverse engineered from the Stella source code?

 

Robin


Edited by electrotrains, Sat Jan 27, 2018 12:07 PM.


#5 electrotrains OFFLINE  

electrotrains

    Moonsweeper

  • Topic Starter
  • 290 posts
  • Location:Scotland

Posted Sun Jan 28, 2018 6:46 AM

I've started to write up the documentation for the project, but thought it would be useful to post a list of all the cartridge types emulated by the current firmware. I've tested at least one example of all the cartridge types below, but if anybody has anything unusual or hard to find, I'd appreciate a copy.

 

The cartridge uses the detection signatures from Stella to auto-detect the types below from a .BIN, .ROM or .A26 file.

 

Supported Cartridge Types

  • 2K
  • 4K
  • F8 (8K)
  • F8 SC (8K+128 bytes RAM)
  • F6 (16K)
  • F6 SC (16K+128 bytes RAM)
  • F4 (32K)
  • F4 SC (32K+128 bytes RAM)
  • FE (Activision 8K)
  • 3F (Tigervision, up to 64K ROM)
  • 3E (up to 64K ROM, up to 32K RAM)
  • E0 (Parker Bros, 8K)
  • 0840 (8K)
  • CV (CommaVid, 2K + 1K RAM)
  • EF (64K)
  • EF SC (64K+128 bytes RAM)
  • F0 (64K)
  • FA (CBS RAM Plus, 12K + 256 bytes RAM)
  • E7 (M-Network, 16K + 2K RAM)

Cartridge types not supported - Activision DSP used by Pitfall 2.

 



#6 Coolcrab OFFLINE  

Coolcrab

    Chopper Commander

  • 174 posts
  • Location:Stockholm

Posted Sun Jan 28, 2018 7:49 AM

Very cool! Got a picture of the board/cart? 



#7 electrotrains OFFLINE  

electrotrains

    Moonsweeper

  • Topic Starter
  • 290 posts
  • Location:Scotland

Posted Sun Jan 28, 2018 8:25 AM

Very cool! Got a picture of the board/cart? 

 

There's a picture on the github page, which I'll be keeping updated with progress:

https://github.com/r...ds/UnoCart-2600

 

I've designed a proper self-contained cartridge PCB too, waiting for them to arrive in the post.



#8 SS OFFLINE  

SS

    Quadrunner

  • 5,866 posts
  • Location:Lehigh Valley, Pennsylvania

Posted Sun Jan 28, 2018 9:24 AM

What if the UNO cannot determine the cartridge type from the file? Like maybe a previously undumped game or new homebrew? Will it "guess" or will it crash?

#9 electrotrains OFFLINE  

electrotrains

    Moonsweeper

  • Topic Starter
  • 290 posts
  • Location:Scotland

Posted Sun Jan 28, 2018 10:45 AM

Well, it will have much the same reaction as Stella would to a new homebrew, since they are using much the same code.

 

But most of the "signatures" in Stella are to do with the actual bankswitch instructions, rather than say checksums of a bunch of ROMs. So in general, Stella will guess right, even if its a new title.

 

However, I've put in an override mechanism by file extension, so if you rename something to CART.F8, then it will always use F8 bankswitching, rather than the auto-detected type.

 

Robin



#10 stephena OFFLINE  

stephena

    River Patroller

  • 3,119 posts
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Sun Jan 28, 2018 11:33 AM

However, I've put in an override mechanism by file extension, so if you rename something to CART.F8, then it will always use F8 bankswitching, rather than the auto-detected type.

 

This change is actually coming to Stella too; I just haven't gotten around to it yet.



#11 RamrodHare OFFLINE  

RamrodHare

    Dragonstomper

  • 584 posts
  • Lost in Time.
  • Location:Greeneville TN, USA

Posted Sun Jan 28, 2018 10:14 PM

This is interesting. My question is, How does this compare to the Harmony Encore, as far as cost?

 I can see this being a fun project to build, but cost would be a major factor. 

The Harmony Encore comes ready to use, where this requires some work.

If you could create the same thing for the 7800, That would indeed be VERY interesting.



#12 CPUWIZ OFFLINE  

CPUWIZ

    Commander

  • 33,948 posts
  • I am the one who knocks!
  • Location:SoCal

Posted Sun Jan 28, 2018 10:24 PM

Cool, where is the source? ;)



#13 RamrodHare OFFLINE  

RamrodHare

    Dragonstomper

  • 584 posts
  • Lost in Time.
  • Location:Greeneville TN, USA

Posted Sun Jan 28, 2018 11:00 PM

Cool, where is the source? ;)

https://github.com/r...e/master/source



#14 electrotrains OFFLINE  

electrotrains

    Moonsweeper

  • Topic Starter
  • 290 posts
  • Location:Scotland

Posted Mon Jan 29, 2018 12:44 AM

This is interesting. My question is, How does this compare to the Harmony Encore, as far as cost?

 I can see this being a fun project to build, but cost would be a major factor. 

The Harmony Encore comes ready to use, where this requires some work.

If you could create the same thing for the 7800, That would indeed be VERY interesting.

 

The STM32F407 DISCO board is available in the UK for about £15. A SD card breakout board is about £5. The only other thing needed is the 2600 breakout board - I got a bunch made for £10. So the total cost of the hardware is about £30 (probably about $35).

 

But its more about the fun of building something, and having access to the source code so you can change it or improve it.

 

Robin



#15 RamrodHare OFFLINE  

RamrodHare

    Dragonstomper

  • 584 posts
  • Lost in Time.
  • Location:Greeneville TN, USA

Posted Mon Jan 29, 2018 3:03 AM

 

 So the total cost of the hardware is about £30 (probably about $35).

 

It's closer to $43, but that's still not that expensive, unless these same pasts can't be sourced in other parts of the world. Shipping would quickly become cost prohibitive. Still, I'm really happy that you've created this. As I mentioned before, if you ever decide to make a version for the 7800, I'm sure there will be a lot of us building them! :-D



#16 alex_79 OFFLINE  

alex_79

    Stargunner

  • 1,102 posts
  • Location:Italy

Posted Mon Jan 29, 2018 3:37 AM

Cool project!
I have an Harmony cart, but I also like diy projects like this and I might give it a try in the future. Thanks for sharing!
 

The STM32F407 DISCO board is available in the UK for about £15. A SD card breakout board is about £5. The only other thing needed is the 2600 breakout board - I got a bunch made for £10. So the total cost of the hardware is about £30 (probably about $35).


You could just remove the rom chip from a common game and use that as the breakout board.

#17 towmater OFFLINE  

towmater

    Dragonstomper

  • 522 posts

Posted Mon Jan 29, 2018 10:18 AM

Do you think an STMF3 would suffice? And... (I know I'm pushing it) what would it take to make this 7800 compatible?



#18 electrotrains OFFLINE  

electrotrains

    Moonsweeper

  • Topic Starter
  • 290 posts
  • Location:Scotland

Posted Mon Jan 29, 2018 10:34 AM

Do you think an STMF3 would suffice? And... (I know I'm pushing it) what would it take to make this 7800 compatible?

 

An STMF3 would probably suffice for the 2600, however you'd need a chip with enough RAM, which pushes you up the range a bit. I'm supporting up to 32k of cartridge RAM, though as far as I know only the boulderdash demo uses 16k, and nothing uses 32k yet. The STM32F4 could support up to 128k RAM maybe more, if I shifted the ROM storage over to the internal flash (its also running from RAM at the moment).

 

Mainly, I used a STM32F4 because I was already familiar with it (having used it for the Atari 8-bit, where a STM32F3 would almost certainly not do).

 

Plus, you can buy a STM32F407 from ebay for less than £4, which makes producing this as a stand-alone cartridge pretty cost effective anyway.

 

EDIT - oops forgot to answer the question about the 7800....

 

The 7800 wasn't really a thing in the UK - I don't remember ever seeing one anyway, and I've only been developing mulit-carts for systems that I have some connection with. Having said that, if somebody in PAL land wants to donate me a 7800, I could see what I could do! :)

 

Robin


Edited by electrotrains, Mon Jan 29, 2018 10:36 AM.


#19 electrotrains OFFLINE  

electrotrains

    Moonsweeper

  • Topic Starter
  • 290 posts
  • Location:Scotland

Posted Mon Jan 29, 2018 10:46 AM

Actually, reading up a bit more on the 7800, it seems I'd need to emulate pokey for it to be a decent multi-cart.

 

The probably means I'd want to use an FPGA, rather than a MCU, so I'd probably base a 7800 multi-cart on my Ultimate Cart design, rather than the UnoCart.

I've already tried using foft's VHDL pokey in the Ultimate Cart, and it works very well - see:

https://atariage.com...-ultimate-cart/

 

But FPGA carts are a lot of work - the Ultimate Cart took over my life for several months, so I think I'll probably leave this one for someone else (though happy to help out along the way).

 

Robin



#20 electrotrains OFFLINE  

electrotrains

    Moonsweeper

  • Topic Starter
  • 290 posts
  • Location:Scotland

Posted Thu Feb 1, 2018 3:15 PM

Hi all,

 

My PCBs arrived this lunchtime, so I took the afternoon off to solder the bits on and see if the design worked. Happy to say it does :). So I can enjoy playing games on the 2600 without worrying the kids are going to knock one of the wires off the development/breakout board version.

 

I've got some spare PCBs (HASL coated, so not for long term use - HASL isn't very durable for edge connections), which I can build up into cartridges, if anybody is interested in helping me test and doesn't mind covering the cost of the board/parts (about £15).

 

Next step - a nice 3d printed shell...

 

P1160293.jpg

 

Robin

 



#21 electrotrains OFFLINE  

electrotrains

    Moonsweeper

  • Topic Starter
  • 290 posts
  • Location:Scotland

Posted Thu Feb 1, 2018 3:17 PM

some more pics

P1160310.jpg

 

P1160313.jpg



#22 DirtyHairy OFFLINE  

DirtyHairy

    Moonsweeper

  • 369 posts
  • Location:Germany

Posted Fri Feb 2, 2018 2:07 AM

This is a very cool project! Regarding DPC: Kevin Horton's breakdown of bankswitch schemes is pretty much all that is needed, but I also took a look at Stella's source for some edge cases.The source of my implementation in 6502.ts is here if you need another reference :) As for DPC+ and CDF, there is indeed nothing out there detailed enough for emulation out there other than Stella's source and my implementation (which is modeled after Stella's). The 6502.ts versions are here (CDF) and here (DPC+); my modified version of Thumbulator (the ARM core) is available here. However, those don't cover everything; in particular, interrupt driven audio is committed in the emulation (as the emulated ARM core runs in zero 6502 time), but Spiceware or cd-w could certainly fill you in on those ;)

 

I feel the itch of getting a board and start toying with the firmware and cartridge emulation myself, but I realistically don't have any time left :( However, if you have questions, feel free to drop me a line.


Edited by DirtyHairy, Fri Feb 2, 2018 2:14 AM.


#23 Mr SQL OFFLINE  

Mr SQL

    Stargunner

  • 1,879 posts

Posted Fri Feb 2, 2018 11:24 AM

Awesome project! :)

 

Do you plan to add support for SuperCharger format?

 

The Harmony supports the binaries but not loading them from tape or ipod like the previous multicarts did.

 

I think that would be a great feature to add to a multicart; fun to browse games using your phone as a wired remote. 



#24 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • 23,161 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Sun Feb 11, 2018 6:33 AM

I am late to the party, but this looks like a really cool piece of hardware.

 

I especially like that the menu is not flickering, is that 6507 code running? And what are your plans for navigating through lots and lots of games?


Edited by Thomas Jentzsch, Sun Feb 11, 2018 6:36 AM.


#25 electrotrains OFFLINE  

electrotrains

    Moonsweeper

  • Topic Starter
  • 290 posts
  • Location:Scotland

Posted Sun Feb 11, 2018 7:57 AM

Hi Thomas,

 

Thanks! But the menu is flickering though, its just my TV + camera does a good job of masking it.

 

Joystick up/down moves up and down, left/right pages forwards and back, and of course you can use directories to help arrange things.

 

I love your conversion of Thrust by the way, it is probably my favorite title I played while testing the cart and I'm definitely planning to return to it - I'm sure it is way better than either the ZX Spectrum or Atari 8-bit versions from back in the day.

 

Robin







Also tagged with one or more of these keywords: 2600, sd, card, multicart, stm32f4

2 user(s) are browsing this forum

2 members, 0 guests, 0 anonymous users