News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

CPC ROM emulator using a Raspberry Pi Pico

Started by matronica, 07:37, 19 April 23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

matronica

Hi,
I've been working on a project which I thought might be of interest. It's a ROM emulator using a Raspberry Pi Pico https://hackaday.io/project/190630-cpc-pico-rom-emulator
I've been using it with my 464, but it hasn't been tested on anything else. It's easy to build and my prototype is hand wired on a proto board. There are no active components other than the Pico.
Interested to see what others think of it.

Matt


Gryzor

Oh so that's what it is 😁

Why "emulator" and not "manager"?

matronica

Quote from: Gryzor on 08:14, 19 April 23Why "emulator" and not "manager"?
because it emulates the lower ROM and 8 upper ROMS using the RAM in the Pico
So it's like a ROM board

Gryzor

My memory is a bit fogged from illness and sleep deprivation, are the other boards called emulators? Maybe I'm having a mini stroke, just don't remember seeing the term used 😁

reidrac

"The Pico is overclocked to 225 MHZ, with one core providing ROM emulation whilst the other handles ROM switching and processing commands from the CPC (with the help of a PIO state machine)"

LOL 225 MHz!
Released The Return of Traxtor, Golden Tail, Magica, The Dawn of Kernel, Kitsune`s Curse, Brick Rick and Hyperdrive for the CPC.

If you like my games and want to show some appreciation, you can always buy me a coffee.

eto

This is really, really interesting.

If that turns out to be a general case, the Pico might be a great choice for other projects too, e.g. a graphics card.

andycadley

Quote from: Gryzor on 09:02, 19 April 23My memory is a bit fogged from illness and sleep deprivation, are the other boards called emulators? Maybe I'm having a mini stroke, just don't remember seeing the term used 😁
I think they usually just map ROM access onto some actual memory via hardware, whereas this is actually running code quickly enough that it can pretend to be a ROM device. 

matronica

Quote from: Gryzor on 09:02, 19 April 23My memory is a bit fogged from illness and sleep deprivation, are the other boards called emulators? Maybe I'm having a mini stroke, just don't remember seeing the term used 😁
They are probably not called emulators. The reason I call this an emulator is that the pico is emulating the rom chips that would normally be used.

matronica

Quote from: reidrac on 09:08, 19 April 23"The Pico is overclocked to 225 MHZ, with one core providing ROM emulation whilst the other handles ROM switching and processing commands from the CPC (with the help of a PIO state machine)"

LOL 225 MHz!
Yes it's a bit crazy isn't it? A 225 mhz dual core processor to service a 4mhz z80. But the pico is cheap.

matronica

#9
Quote from: eto on 09:25, 19 April 23This is really, really interesting.

If that turns out to be a general case, the Pico might be a great choice for other projects too, e.g. a graphics card.
That could be possible.  The main limitation is the number of available io pins. I'm going to try creating some form of mass storage device next. (Using a second pico)

pelrun

Quote from: Gryzor on 09:02, 19 April 23My memory is a bit fogged from illness and sleep deprivation, are the other boards called emulators?

It's the correct term in the electronics/digital design space, we just don't tend to use it that way here. But yes, the M4/usifac/other peripheral that pretends to be ROM even though it's not actually physical EEPROMs are all ROM emulators.

Nice to see the Pico doesn't completely go up in flames when connected to the bus directly; it'd be nice to get rid of the level shifters on my current boards. Although there are some significant caveats (can't go above 5.000v flat *at all* etc etc). Although I've yet to see more than about 4.7V on the bus even when I'm feeding in 5.3v :D

HAL6128

Quote from: eto on 09:25, 19 April 23This is really, really interesting.

If that turns out to be a general case, the Pico might be a great choice for other projects too, e.g. a graphics card.
There's already a display driver existing for other systems (to VGA). Can't remember which.
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX


abalore

Quote from: matronica on 07:37, 19 April 23Hi,
I've been working on a project which I thought might be of interest. It's a ROM emulator using a Raspberry Pi Pico https://hackaday.io/project/190630-cpc-pico-rom-emulator
I've been using it with my 464, but it hasn't been tested on anything else. It's easy to build and my prototype is hand wired on a proto board. There are no active components other than the Pico.
Interested to see what others think of it.

Matt



Do you plan to make a PCB with a socket for the Pico ?

genesis8

#14
Pico to VGA

Personnally I am using a Pico Explorer for a CO2 detector with the SCD41
____________
Amstrad news site at Genesis8 Amstrad Page

Ynot.zer0

#15
the Pico is a pretty powerful board, I was playing around with it over xmas. GitHub repo here

whilst this is showing the MCUME loading and playing an Atari 800 XL game via VGA through the Pico Display board, you can also run the CPC emulator instead and output it via the VGA.  I might give it a re-compile and see if I can output the CPC ready screen. ;D

the problem I found was handling the wrapper for the keyboard processing.  and of course someone has the Speccie running on a Pico (actually it works well, and the VGA output is really clear and has all the colours!)


As to the OP, it is pretty awesome what you've done with a Pico & you are right, they are dirt cheap (<£10) and they are VERY powerful, just have to figure out the best way to use them.  I'm looking forward to see what you do next.

ajcasado

There is a ready to use library called PicoVGA with a lot of cool features that could be the base for a nice V9990 alternative.

PicoVGA library features
  • 1 base layer and 3 overlay layers with transparency, using the PIO0 module
  • 8-bit output in R3G3B2 format
  • VGA monitor output in 256x192 to 1280x960 resolution
  • output to a TV in PAL or NTSC interlaced mode at resolutions up to 1024x576 or 848x480
  • nearly 30 frame buffer formats: 8/4/2/1 bit graphics, tiles, text, special formats (charts)
  • colour palettes for text modes and graphics formats with limited bit depth
  • frame buffers of different formats can be combined together in strips and segments in the image
  • RLE image compression (suitable for drawings)
  • transparency modes with selectable key colour
  • hardware sprites in overlay layers
  • layer output only to designated output pins (color planes)
  • automatic configuration of the video mode according to the specified resolution and timing
  • automatic overclocking of the processor according to the desired resolution
  • the library uses the 2nd core of the processor, the 1st core is reserved for the main program
  • additional PWM audio output (not required)

See more details here:  PicoVGA - VGA/TV display on Raspberry Pico (breatharian.eu)

I guess that it also could be modified to drive a RGB output to use the amstrad monitor.
CPC 664

Empiezas a envejecer cuando dejas de aprender.
You start to get old when you stop learning.

matronica

Quote from: abalore on 13:57, 19 April 23Do you plan to make a PCB with a socket for the Pico ?
No plans at the moment, but I might do in the future

zhulien

soon we'll have a CPC with 8 Raspberry Pis on it, 1 for ram/rom, 1 for sounds, 1 for gfx, 1 for ... 

pollito

@matronica thank you so much for your hard work on this. I'm very new at electronics, but I would really love to revive my CPC 464, have always wanted to make a ROM board, and your project looks perfect. So, I am going to try to build it.  :D

I have a few questions (I hope you don't mind):

1. I was looking at your components list - for the 50 pin edge connector does it need to be a special one? There is a gap between pins 21/22 and 23/24 on the CPC so I'm wondering if an off-the-shelf connector would fit?

2. You mention an optional resistor, and I would like to add one for safety. What type of resistor should it be, and where should it go? What about the LED?

3. In the picture on Hackaday there is a dip switch, which is not listed in the parts list (although it doesn't appear to be connected unless it is connected on the reverse). There are also 3 push button switches rather than the 2 in the list. Are these extra parts no longer necessary?

4. I have a GroundStudio Marble Pico with 8MB QSPI flash and a built in microSD card. Could these be used to store more ROMs?

5. Do you have this drawn up in KiCad or Gerber format? I'm worried that I might permanently damage my CPC so the more obvious everything can be, the better for me!  ;)

Many thanks in advance,
Nick

matronica

Hi Nick,
Thanks for your interest in the project. I suggest you wait a bit, I have designed a PCB (as PCBWay offered to make some for me). So that will make construction easier. Once I've validated the board, I will add the schematic and gerbers to github.
In answer to your specific questions:
1 - I think any 2x25 pin 0.1inch edge connector will work. The gaps on the CPC board do not matter (although they would help with alignment)
2 - My prototype has a power LED which uses a resistor. Value it not too critical, something around 1K would be fine. Note: there is no LED on the PCB
3 - The DIP switch is used to switch ROMDIS on and off. This allows your to disable the Pico without removing the board. 3rd push button is not used
4 - I don't think you'll be able to use that Pico. All of the standard GPIOs are used. The Marble Pico seems to use some for I2C (with pullups) and microSD card. This will probably interfere with the operation.
5 - see above - a PCB and schematic is on the way.

Matt

pollito

@matronica thank you very much for your answers. I am eagerly watching the GitHub repo!  :)  

Devlin

Quote from: matronica on 11:01, 08 May 23Hi Nick,
Thanks for your interest in the project. I suggest you wait a bit, I have designed a PCB (as PCBWay offered to make some for me). So that will make construction easier. Once I've validated the board, I will add the schematic and gerbers to github.
In answer to your specific questions:
1 - I think any 2x25 pin 0.1inch edge connector will work. The gaps on the CPC board do not matter (although they would help with alignment)
2 - My prototype has a power LED which uses a resistor. Value it not too critical, something around 1K would be fine. Note: there is no LED on the PCB
3 - The DIP switch is used to switch ROMDIS on and off. This allows your to disable the Pico without removing the board. 3rd push button is not used
4 - I don't think you'll be able to use that Pico. All of the standard GPIOs are used. The Marble Pico seems to use some for I2C (with pullups) and microSD card. This will probably interfere with the operation.
5 - see above - a PCB and schematic is on the way.

Matt

Are boards available, or compiled code if I want to build one of my own?
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

matronica

I've (finally) uploaded the PCB and schematics to github. https://github.com/mattcallow/CPC_PICOROM/
I do not plan to sell boards, but if you are in Australia, I have a few spares that I can send out for the cost of postage.
Regarding compiled code. I'm not sure if I can do that, since the image will include possibly copyrighted ROMs. Ideally, I'd like to develop a way to upload ROM images via USB, but don't know if I'll have the time to do that.


Powered by SMFPacks Menu Editor Mod