Video output with RP2040

Has anyone played around with the Raspberry Pi Pico as a VGA option? I was thinking it might work for the Planck and allow for a more flexible option.

I have actually, but I have not managed to read the signals from the 6502 in time to actually do anything. I think it may have had to do with signal timing on my hastily soldered together prototype. Or maybe the level shifters that are too slow.

I have on my desk a few unpopulated PCBs to give it another go with better signal integrity, but I realized I do not have the correct level shifters. I will order them, anytime now!

I have some code for the Raspberry pi pico though (mostly boilerplate since I could not get it to read the 6502) if anyone wants to give it a try as well.

I’d like to see the code just out of curiosity, if for no other reason!

Here it is: GitHub - jfoucher/pico-vga

Basically, there is a PIO program that reads the 6502 input into a DMA buffer, that is then printed to the console, but the data was wrong so I gave up on it for now…

1 Like

I was watching a video about using the pico as an ISA card, and they were saying ISA at 8 MHz was already pushing the pico as far as it could go. Would the clock stretching give it enough time to respond?

It probably would work, yes. I’m currently soldering components on the PCB I have to try agin soon. What I’ve done on my prototype Planck is put the main oscillator in a socket, so I could change it to a slower one, to see if it works better.

I managed to use the Pico to read data from the 6502 during a write cycle, just incrementing numbers for now, but it was working fine at 12 MHz
I’ll try and output something to a screen now…

1 Like

I managed to make everything work at 640x480, 80 columns text displaying more or less ok as sent from the Planck. I did it with help from this project that allows display of 16 colors at 640x480 with the pico as the GPU. As you can see there are still a few problems, like some writes not coming through, and the first letter of the text never displaying.

Also, the board I had made had reversed connection, so I have to reverse all the bits of every byte I receive from the Planck, which probably slows things down more than necessary.

I also have a 320x240 versions with 256 colors, both text and graphics which seems to work better but still the first character oof the first line is always missing…


Still, looks promising!

Would lowering the system clock to 8 MHz severely impact general forth performance? There might be more stability at a lower clock speed, and 8 MHz is what the Commander X16 uses.

I have tried with a 1.8432 MHz oscillator I had lying around, giving about 900 kHz clock speed, and the stability seems to be about the same. The first letter of the first line is still missing…

I remember taking a look at the specification for the CX16 VERA board when I was trying to implement a GPU on an FPGA, it seemed interesting. I should take a look at it again now, to get inspirtation from the way they do it.

1 Like

This may be way off-base, but in my Apple II I use a card that’s built around a Pico and produces VGA. It’s a variant of the design here: GitHub - V2RetroComputing/analog: ∀2 Analog VGA card for the Apple II computer line . I know that the Apple is running a 1 Mhz, etc., but there might be some code there that you could use.

Oh, nice, I’ll take a look thanks!