Jump to content
IGNORED

DIY 2600+ flash cart with a Raspberry Pico


karri

Recommended Posts

35 minutes ago, karri said:

Difficult to say. You could give the commands:

cd ~/raspberry-pi-pico/pico/pico-examples/build/pico_rom

make clean

make VERBOSE=1

 

and compare the output to my output.

 

My guess is that there is no call to:

elf2uf2 pico_rom.elf pico_rom.uf2

 

huu.txt 385.14 kB · 0 downloads

 

I don't remember if there was some additional steps for installing the sdk? The first link had some tutorial I just followed as Pico was new for me.

The Clean command did the trick for me, thank you.  After that I ran the build26 command with my rom file.  It looks like there may have been a move error, I am wondering if it could be where I installed the Otaku repository.  here is the output from the build26

 

~/raspberry-pi-pico/pico/pico-examples/Otaku-flash/Otaku-flash$ ./build26 Roms/Atari-2600/Activision\ Decathlon\,\ The\ \(USA\).a26
b'FE*' not supported, yet
mv: cannot stat 'rom.c': No such file or directory

~/raspberry-pi-pico/pico/pico-examples/build ~/raspberry-pi-pico/pico/pico-examples/Otaku-flash/Otaku-flash
[  2%] Built target bs2_default
[  3%] Performing build step for 'PioasmBuild'
[100%] Built target pioasm
[  4%] No install step for 'PioasmBuild'
[  5%] Completed 'PioasmBuild'
[ 11%] Built target PioasmBuild
[ 13%] Built target slower_boot2
[ 15%] Built target slower_boot2_padded_checksummed_asm
[ 16%] Performing build step for 'ELF2UF2Build'
[100%] Built target elf2uf2
[ 17%] No install step for 'ELF2UF2Build'
[ 17%] Completed 'ELF2UF2Build'
[ 23%] Built target ELF2UF2Build
Consolidate compiler generated dependencies of target pico_rom
[100%] Built target pico_rom
~/raspberry-pi-pico/pico/pico-examples/Otaku-flash/Otaku-flash
  Cart Name:       Decathlon (1983) (Activision) [fixed]
  Cart MD5:        525f2dfc8b21b0186cff2568e0509bfc
  Controller 0:    Joystick in left port
  Controller 1:    Paddles in right port
  Display Format:  NTSC*
  Bankswitch Type: FE* (8K)

 

Just wondering if the bolded text above is normal for the output of the script.

 

 

Link to comment
Share on other sites

I did have a look at the FE bankswitch. It is really weird. You need to make a JSR at the top level of the code. By monitoring the stack address (push return address to 01ff) you do a bank switch based on the contents of the 3 most significant data bus bits one clock cycle after the push to the stack. The same timing just happens to work on the rts command also.

 

My guess is that you just flip the data bus to input and keep reading the pins until the address is no longer $01fe.

Link to comment
Share on other sites

On 1/23/2024 at 11:20 AM, karri said:

The next step could be POKEY emulation.

 

The two resistors I added was not a great idea. The proper circuit is more like this:

circuit-diagram.thumb.png.e917b5c89b304feb125c4c12a5c19700.png

So I have to figure out how to modify Otaku for audio... It may be easier to work with small components with leads instead of SMD chip components.

POKEY emulation on a Pico is an exciting thought!

 

I was thinking about POKEY audio emulation on a Pico to get stereo POKEY on Atari 8-bit without needing a real second POKEY IC. My plan was to use the PIO/DMA to handle the registers and to create a phi2-driven counter that the free running software could use to pace the audio circuit emulation. For PWM output, I did some calculations and think one can get 11-bit effective resolution at 61-kHz sampling rate derived from the 125 MHz system clock. I think this should be enough to emulate the compressive behavior of a summation of POKEY 4-bit DACs. The PWM peripheral also supports clock driven DMA, so the emulation could run in software and its output automatically pushed to the PWM circuit. What sparked this idea was proving out a USB keyboard adapter that piggybacks the POKEY. 

 

If you're actively working this, i'm happy to share my notes and to collaborate. 

 

Here's my USB keyboard POKEY code: https://github.com/jeffpiep/pokeyusb

  • Like 1
Link to comment
Share on other sites

6 hours ago, jeffpiep said:

POKEY emulation on a Pico is an exciting thought!

 

I was thinking about POKEY audio emulation on a Pico to get stereo POKEY on Atari 8-bit without needing a real second POKEY IC. My plan was to use the PIO/DMA to handle the registers and to create a phi2-driven counter that the free running software could use to pace the audio circuit emulation. For PWM output, I did some calculations and think one can get 11-bit effective resolution at 61-kHz sampling rate derived from the 125 MHz system clock. I think this should be enough to emulate the compressive behavior of a summation of POKEY 4-bit DACs. The PWM peripheral also supports clock driven DMA, so the emulation could run in software and its output automatically pushed to the PWM circuit. What sparked this idea was proving out a USB keyboard adapter that piggybacks the POKEY. 

 

If you're actively working this, i'm happy to share my notes and to collaborate. 

 

Here's my USB keyboard POKEY code: https://github.com/jeffpiep/pokeyusb

Wow! You are much further in your thoughts than me. I am interested in POKEY and Yamaha 2151 sound emulation.

- these chips are common in flash cards

- the Atari 2600+ emulates them in software

- they are both supported by Furnace Tracker

- there is fpga cores available for both chips

Having the Pico supporting these chips would be great! It would open emulation of modern homebrews.

 

I really love the idea to use the DMA and the PIO engine for creating this functionality. So I am in! Could we do it in this Otaku github?

  • Like 2
Link to comment
Share on other sites

On 2/8/2024 at 7:10 PM, jeffpiep said:

POKEY emulation on a Pico is an exciting thought!

 

I was thinking about POKEY audio emulation on a Pico to get stereo POKEY on Atari 8-bit without needing a real second POKEY IC. My plan was to use the PIO/DMA to handle the registers and to create a phi2-driven counter that the free running software could use to pace the audio circuit emulation. For PWM output, I did some calculations and think one can get 11-bit effective resolution at 61-kHz sampling rate derived from the 125 MHz system clock. I think this should be enough to emulate the compressive behavior of a summation of POKEY 4-bit DACs. The PWM peripheral also supports clock driven DMA, so the emulation could run in software and its output automatically pushed to the PWM circuit. What sparked this idea was proving out a USB keyboard adapter that piggybacks the POKEY. 

 

If you're actively working this, i'm happy to share my notes and to collaborate. 

 

Here's my USB keyboard POKEY code: https://github.com/jeffpiep/pokeyusb

Pokey emulation would be useless on that board, since it does not have the extra pins for the 7800.

Link to comment
Share on other sites

4 hours ago, John Stamos Mullet said:

Pokey emulation would be useless on that board, since it does not have the extra pins for the 7800.

The Otaku board has 7800 pins. And exaudio is connected. Or do you comment on some other board in this thread?

Link to comment
Share on other sites

I should probably clear my project out of this thread so readers don't get confused by the projects.  btw.  Circuit boards work great!  The card supports Pico and Pico-W.  I added an IR bulb so I can change carts with a remote, and if you use a Pico-W, then MQTT is enabled to transfer roms via WIFI.   Next up is fitting a case.  I'll probably cut some acrylic to get started. 

Link to comment
Share on other sites

I made a new GitHub page with updated codes, gerbers, schematics and build instructions: https://github.com/jasonfrowe/2600MultiCart

 

I also have 3 left-over prototype boards.  They are slightly different than the Gerber's on the GitHub page (PCB is a bit longer and uses an IR photo-diode instead of a simple led/resister pair).    But if someone wants one, I'm happy to drop one in the snail-mail for you. 

Edited by astroguy
speeling mitsakes
  • Like 2
Link to comment
Share on other sites

I have a habit of ordering enough boards for a small hobby release. Usually 40 or 50 boards is ok. The price difference between just ordering a few boards is not big as DHL from China costs the same anyway. It is also nice to have one physical copy of every homebrew release I have done so I may have use for a few boards myself. The rest are available...

  • Like 1
Link to comment
Share on other sites

6 hours ago, karri said:

I have a habit of ordering enough boards for a small hobby release. Usually 40 or 50 boards is ok. The price difference between just ordering a few boards is not big as DHL from China costs the same anyway. It is also nice to have one physical copy of every homebrew release I have done so I may have use for a few boards myself. The rest are available...

I have a habit of submitting a design and it starts it's production, and I find some issue with either the silkscreen, or other improvement that I wish to make.. and end up having multiple revisions in production at the same time!

 

I've stopped doing the 50 boards at time, because for me in the USA, those shipping charges double. Plus, I am pretty sure I'll always do another revision, so those extra boards won't be worth much to me.

  • Like 1
Link to comment
Share on other sites

47 minutes ago, selgus said:

I have a habit of submitting a design and it starts it's production, and I find some issue with either the silkscreen, or other improvement that I wish to make.. and end up having multiple revisions in production at the same time!

 

I've stopped doing the 50 boards at time, because for me in the USA, those shipping charges double. Plus, I am pretty sure I'll always do another revision, so those extra boards won't be worth much to me.

My first 50-board series lacked a critical component so it became the target of my wired spaghetti design. The rest of the boards got donated to hobbyists.

 

But this 2nd design was ok. It is also the last design ;)

 

Perhaps I need to cut down on initial orders. I still have 50 multicart boards for the 7800 that are still waiting for suitable software... But this is just a hobby. Cheaper than sitting in a pub :) . 

  • Like 1
Link to comment
Share on other sites

4 minutes ago, karri said:

My first 50-board series lacked a critical component so it became the target of my wired spaghetti design. The rest of the boards got donated to hobbyists.

 

But this 2nd design was ok. It is also the last design ;)

 

Perhaps I need to cut down on initial orders. I still have 50 multicart boards for the 7800 that are still waiting for suitable software... But this is just a hobby. Cheaper than sitting in a pub :) . 

What I have been doing recently is doing panels that I change the production options on how many rows/columns there are, and see how it affects the shipping price. When it bumps up above what I'm willing to pay, that's how many boards a make in an order.

  • Like 1
Link to comment
Share on other sites

I am interested in trying my wings with Wizzy at some point in time.

 

But I may want a board with fpga emulation of POKEY and YM2151 plus 32k of RAM. This should work on the 2600+ also.

 

My desire is to make something enjoyable with free downloads. And make a small run of real carts for myself to show/sell/give at retro events. Selling stuff is just tedious work - so I am not interested in that.

  • Like 1
Link to comment
Share on other sites

2 minutes ago, karri said:

I am interested in trying my wings with Wizzy at some point in time.

 

But I may want a board with fpga emulation of POKEY and YM2151 plus 32k of RAM. This should work on the 2600+ also.

 

My desire is to make something enjoyable with free downloads. And make a small run of real carts for myself to show/sell/give at retro events. Selling stuff is just tedious work - so I am not interested in that.

It would be great, if you could document all the steps at some point, such that it would allow to reproduce what you did. You did fantastic job. 

  • Like 1
Link to comment
Share on other sites

4 minutes ago, karri said:

But I may want a board with fpga emulation of POKEY and YM2151 plus 32k of RAM. This should work on the 2600+ also.

Both the YM and POKEY in use at the same time? I did a 7800 PCB design that has ROM/RAM and either a real POKEY or YM2413 installed on it.. but not both. I never really thought about the option of a cartridge with both.

Link to comment
Share on other sites

1 hour ago, selgus said:

Both the YM and POKEY in use at the same time? I did a 7800 PCB design that has ROM/RAM and either a real POKEY or YM2413 installed on it.. but not both. I never really thought about the option of a cartridge with both.

The YM2151 gives very cool FM kind of tunes. Like these:

I also like the square wave plus noise from a sn7 chip like these:

I believe that 3 channels FM, 2 square wave channels and one noise channel would create a pretty nice band.
Unfortunately I have no experience of POKEY yet.

 

And then I could also use TIA.

 

 

If I do a fpga that emulates POKEY and YM2151 then I could as well use both on most flash carts and on the 2600+.

  • Like 2
Link to comment
Share on other sites

I finally decided to update the firmware to 1.1rev2 and I've noticed that F4 bankswitching (32K roms) seems to be no-longer working.  Is the case for others?  I've fiddled with the code and tried different clock speeds but F4 always loads junk.  F8, F6 and everything else seems to be fine. 

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