fruit-bat / pico-zxspectrum

ZX Spectrum for Raspberry Pico Pi RP2040
487 stars 54 forks source link

PicoMiteVGA-To Enable STEM Project #101

Open waterfallm opened 1 year ago

waterfallm commented 1 year ago

I'm looking at the PicoMiteVGA board to make a STEM project with a museum i volenteer at. Would be get to have a config that we coulpd switch between to allow a bit of fun after a session doing some Basic programming.

fruit-bat commented 1 year ago

I think the answer is 'sort of'. I don't think the PicoMiteVGA can make the same colours as a spectrum... from looking at what I think is the circuit diagram. Also, I couldn't see an obvious output for sound.

Do you know what boards you are using?

waterfallm commented 1 year ago

yeap i have the circuit here.

14A Circuit diagram.pdf

waterfallm commented 1 year ago

i'll get the toolk chain sorted and satrt to play with the baord def and build

fruit-bat commented 1 year ago

I've had a look at the circuit diagram and most things are there, including a ps/2 keyboard and sound channels 😀.

The spectrum has a set of bright colours that will end up being extra green.

Might need some extra code to read the joystick pins.

fruit-bat commented 1 year ago

I've added an empty branch for changes to go into. If you work in this branch then it's easier to collaborate without disturbing the main code base. I'll have a think about which is the best existing target to start working from.

fruit-bat commented 1 year ago

Very early attempt at changes here:

https://github.com/fruit-bat/pico-zxspectrum/pull/105/files

Binary here (you need to unzip it):-

ZxSpectrumPicoMiteVGA.uf2.zip

Obviously, virtually no chance it will work but give it a go :-)

The new target is 'ZxSpectrumPicoMiteVGA'

waterfallm commented 1 year ago

Great start to help me understand how to get going.

As you predicted no joy :) no VGA output.

How can i go about debuging?

fruit-bat commented 1 year ago

In theory, the serial port will be talking on gp0 & gp1. Those get brought out to one of the db9 connectors. You would need a 3.3v ttl serial to usb adapter to monitor it.

If you have a scope, might be worth seeing if any of the vga lines are active.

I think I sent the c-sync signal to v-sync instead of h-sync by mistake. I will swap that over when I get a moment and put another build up.

waterfallm commented 1 year ago

Thank for all your help so far.. Once i get the toolchain setup properly i can actually start to itteriate through the config changes myself.

Do you have a git_action that scripts out the build process?

waterfallm commented 1 year ago

so the only debug output i'm getting is

"Core 1 Running" image

fruit-bat commented 1 year ago

Well, that's actually rather promising... it says 'panic' when something bad has happened!

Here is a build with c-sync sent to the h-sync line:-

ZxSpectrumPicoMiteVGA.uf2.zip

No git actions I'm afraid. If you are a wiz at setting them up, advice would be appreciated; I just develop and build on a Pi 4.

waterfallm commented 1 year ago

Yeap I think a git_action can be my gift to the project.

waterfallm commented 1 year ago

and we have progress. Best i finish soldering up the audio,sd card and keyboard :)

image

fruit-bat commented 1 year ago

Yeap I think a git_action can be my gift to the project.

That would be very much appreciated 🙂

fruit-bat commented 1 year ago

and we have progress. Best i finish soldering up the audio,sd card and keyboard :)

image

The RGBY is in the wrong order and sorting it needs a little thought... but in the meantime at least you can see what is going on.

If you have an otg adapter you should be able to connect a USB keyboard and/or joysticks (the ps/2 keyboard should work too).

fruit-bat commented 1 year ago

This has the VGA colours output BGYR (possibly?), which may be a bit better; afraid it will never be perfect without a different VGA circuit. If this is terrible, we could try BYGR instead.

ZxSpectrumPicoMiteVGA.uf2.zip

waterfallm commented 1 year ago

If you have an otg adapter you should be able to connect a USB keyboard and/or joysticks (the ps/2 keyboard should work too). I'm a couple of transistors from getting PS2 keyboard running and a 2r2 resistor for SD Card but they arrive tomorrow so should be up and running then.

RGYR gives me much better in the menu but magenta background. I've got 10 boards now to make up for the STEM elelment and the colors are ok for that the main need is to get MM Basic running with some fun maybe getting the Spectrum up and running.