derekfountain / zx-spectrum-pico-rom

A Raspberry Pi Pico based device to emulate a ROM on a ZX Spectrum
GNU General Public License v2.0
29 stars 6 forks source link

suggestion to retarget tje board #1

Open aldolo69 opened 4 months ago

aldolo69 commented 4 months ago

hi. don't know how to write to you in another way. in your opinion is possible to build a .z80 loader? for the porpuse maybe only 512bytes of the initial rom could be enough so you can freeup some pins for the sd card and buttons. you can makup the rom in chunks of LD command to fill the RAM and then release the z80 and the original ROM. i'm too lazy to start such a project now... seems doable.

derekfountain commented 4 months ago

I think the approach could be made to work with enough effort. The issue, as ever with the Pico, is the number of GPIOs available.

If you re-purposed the GPIO which currently connects the /M1 line (as part of the IF1 experimentation I was doing), you could emulate a 1024b ROM with 4 GPIOs free. Those GPIOs could drive an SD card reader (MISI, MISO, CLK and SLAVE_ENABLE), the contents of which could be moved into Spectrum RAM in chunks as you suggest.

Hmmm, but then when your game is loaded and started you wouldn't have the original ROM in place, and that code is used by lots of games. So you'd need the ability to turn the device off which you could do by driving /ROMCS, but that would need another GPIO. You could re-purpose another address line and go down to a 512b ROM, which would probably still be enough for the Z80 program. So I think that bit would work. You wouldn't have any free GPIOs for user interface buttons though.

To be honest, if I were going to design such a project, I'm not sure I'd start with this one!