barnacle wrote:
I'm following Troy's graphics controller chip series with interest and have been persuaded by the PIO module to move from the STM32 and Nucleo to the Pi Pico - specifically because it has a lot if internal memory and can generate 640 x 480 VGA in 4-bits per pixel without too much trouble.
Looking at the specs of the demo board from AdaFruit it looks like it can handle 15-bpp.
https://www.adafruit.com/product/5675I'm hopeful I can get 15-bpp at 320x240 but we'll see.
Quote:
Immediate requirements were to find a tool-chain that worked. Because the official getting started approach didn't/doesn't work with my Linux Mint setup (it couldn't download MS Visual Code, and apparently couldn't work with a pre-installed flatpak version of same) I looked at other approaches. The CLI approach appears to work, but one needs to keep a careful eye on one's working directory, or the damn thing compiles everything in your directories - which took half an hour.
Not sure how you have it setup, my structure looks like so:
Code:
/home/kfiresun/src/pipico/
|- pico-skd
`- hello
|- CMakeList.txt
|- pico_sdk_import.cmake
`- hello.c
The CMakeList.txt only has the hello.c listed in it. You can get cmake to recursively read all files in a directory, but if you have a complex project structure that might not be the best idea.
Anyhow, my commands look like so:
Code:
cmake . -DPICO_SDK_PATH=../pico-sdk -DPICO_BOARD=pico_w
make -j22
(Adjust -j22 to the number of threads your CPU can handle)
Attachment:
Screenshot 2024-06-26 215008.png [ 36.04 KiB | Viewed 1574 times ]
Quote:
Also, I wanted to work with C, not Python. I'm not fond of a language which can return '1', "1", or "Tuesday" and still be syntactically correct, and nor do I appreciate the effects of invisible white space...
I'm glad I'm not the only one who finds that "feature" of Python horrible. >_<
Quote:
This is a dot display just being used as a character display for now. But I have a number of further steps/issues to resolve:
Quote:
I have as yet no idea how to implement the interface between the 6502 bus and the rp2040. I am planning some small number of registers, but some of them may require multiple writes to fill a buffer which in turn is written to the screen.
Not entirely sure yet, I'm still trying to figure out what I can and can't do with the PIO state machines. I think they'll read multiple pins in one clock cycle though, at which point you should be able to shift the bits into the FIFO.
The RP2040 docs say that the PIOs are capable of doing read and writes to 8080 and 6800 buses.
The one thing I'm running into is that if I do 15-bpp then that's 17 of the 26 available GPIO pins, leaving me all of 9 pins for talking to the 6502 (not enough to do read/write, chip select, and 8 data bits)
I'm contemplating the idea of multiplexing the output of the VGA signals through 7 or so pins. 5-bits (one channel) and 2-bits indicating which channel, with the "fourth" channel being the sync bits.
Edit:
Visual Studio Code is a nice to have, but I would guess you could just as easily use what ever editor you wish. I tend to use nano for quick and dirty edits, and Visual Studio (not Code) for larger projects.
I've seen some people do some pretty amazing things with vi, emacs, and Atom though.