+karri Posted November 29, 2023 Share Posted November 29, 2023 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. After that solder the wires to correct places on the pcb. 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. 6 Quote Link to comment Share on other sites More sharing options...
tradyblix Posted November 29, 2023 Share Posted November 29, 2023 Oh this is so cool ! 😎 keep us posted 1 Quote Link to comment Share on other sites More sharing options...
+karri Posted November 30, 2023 Author Share Posted November 30, 2023 The wiring is done! 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. 3 Quote Link to comment Share on other sites More sharing options...
MittyOz Posted November 30, 2023 Share Posted November 30, 2023 If this works you will sell a million of them. Well, maybe not a million. Quote Link to comment Share on other sites More sharing options...
+karri Posted November 30, 2023 Author Share Posted November 30, 2023 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. 1 Quote Link to comment Share on other sites More sharing options...
Dionoid Posted December 6, 2023 Share Posted December 6, 2023 Cool project! Looks similar to this: I remember that project is on hold, as there were timing issues with the Pico taking a few ms too long to initialize. With a 2600+ that might not be a problem. 3 Quote Link to comment Share on other sites More sharing options...
+karri Posted December 6, 2023 Author Share Posted December 6, 2023 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. 2 Quote Link to comment Share on other sites More sharing options...
+mksmith Posted December 6, 2023 Share Posted December 6, 2023 Good luck!! Quote Link to comment Share on other sites More sharing options...
Warboss Gegguz Posted December 6, 2023 Share Posted December 6, 2023 (edited) 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 December 6, 2023 by Warboss Gegguz Quote Link to comment Share on other sites More sharing options...
+karri Posted December 7, 2023 Author Share Posted December 7, 2023 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 6 Quote Link to comment Share on other sites More sharing options...
+karri Posted December 8, 2023 Author Share Posted December 8, 2023 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... 2 Quote Link to comment Share on other sites More sharing options...
+karri Posted December 10, 2023 Author Share Posted December 10, 2023 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. VID_20231210_184150.mp4 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. 8 Quote Link to comment Share on other sites More sharing options...
+karri Posted December 11, 2023 Author Share Posted December 11, 2023 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 Quote Link to comment Share on other sites More sharing options...
+karri Posted December 11, 2023 Author Share Posted December 11, 2023 Perhaps something like this would be cool for a cheap single-game cart? 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. 5 Quote Link to comment Share on other sites More sharing options...
+karri Posted December 12, 2023 Author Share Posted December 12, 2023 My new cart with the 2600 connector works perfectly When time permits I may try to figure out why my cart with the 7800 connector did not work. Most likely I had something wrong in the hw or sw... build26rom4k.py 6 Quote Link to comment Share on other sites More sharing options...
+karri Posted December 12, 2023 Author Share Posted December 12, 2023 And finally @bsteux new game Happybird. VID_20231221_122007.mp4 And the script for creating a F6 bankswitched game to the Pico. build26rom16k.py and the Pico download. happybird.uf2 1 2 Quote Link to comment Share on other sites More sharing options...
+bsteux Posted December 12, 2023 Share Posted December 12, 2023 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. 1 Quote Link to comment Share on other sites More sharing options...
+karri Posted December 12, 2023 Author Share Posted December 12, 2023 Great idea! I happen to have the design in KiCad already. Perhaps there is some suitable analogie or pcm pins for the audio? Quote Link to comment Share on other sites More sharing options...
ChrisKewl Posted December 12, 2023 Share Posted December 12, 2023 Maybe you could have a few games on here and a screen to tell you which game you have loaded along with a selection button? This way you could flash a handful of games you want to test, a button or two to cycle through and then it'd work native with the 2600+ since all you are doing is changing games. Quote Link to comment Share on other sites More sharing options...
+bsteux Posted December 12, 2023 Share Posted December 12, 2023 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.. 1 Quote Link to comment Share on other sites More sharing options...
+karri Posted December 13, 2023 Author Share Posted December 13, 2023 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. 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. 1 1 Quote Link to comment Share on other sites More sharing options...
+bsteux Posted December 13, 2023 Share Posted December 13, 2023 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. Quote Link to comment Share on other sites More sharing options...
+karri Posted December 13, 2023 Author Share Posted December 13, 2023 And the wiring is done! It still looks terrible but I clean it up another day. Party time! 3 Quote Link to comment Share on other sites More sharing options...
+bsteux Posted December 13, 2023 Share Posted December 13, 2023 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 ? Quote Link to comment Share on other sites More sharing options...
ChrisKewl Posted December 13, 2023 Share Posted December 13, 2023 1 hour ago, karri said: And the wiring is done! It still looks terrible but I clean it up another day. Party time! Have you thought about 3D printed case for these? If you send me a completed unit I could possibly come up with a case for it. I've made plenty of cases including the Lock-On 2600. 1 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.