Wren6991 / PicoDVI

Bitbanged DVI on the RP2040 Microcontroller
BSD 3-Clause "New" or "Revised" License
1.22k stars 130 forks source link

DVI and MicroPython support #12

Open mchobby opened 3 years ago

mchobby commented 3 years ago

Is there any way being able to have DVI output from MicroPython script (eg: create a terminal, having REPL available on screen, display some graphics) ?

Wren6991 commented 3 years ago

You can take a look at this fork where I hacked in a virtual console with DVI:

https://github.com/Wren6991/micropython/tree/dvi-vt100

It's not for the faint of heart, and IIRC I broke a few things (like flash programming). The code is there if you want to hack on it.

The approach was to steal the second core from MicroPython, and run some bare metal DVI stuff on core 1, with the MicroPython interpreter on core 0.

AtomiJD commented 3 years ago

I followed your approach to integrate DVI in Micropython.

Yes its not so easy/possible to get flash programming running while DVI is running. I stopped trying this because of some notes from flash.h:

"* Like other hardware_flash functions, the flash is not

After some hours of trying the flash thing, I decided to store the data on SD. Changing the frozen modules _boot.py for SD Card Support and adding the sdcard.py source and do some minor changes on main.c everything works fine (vscode/rshell/Thonny)

Setup: DVI Breakout Board on pins 12, 18, 16, clk pin 14, MCP4822 DAC on SPI 1 SD Card Reader on SPI 0 Pico Probe on UART GPIO 0,1

DVI uses

The DAC is for sound generation has 8 channels sine/saw/triangle/rectangle/noise generation with ADSR envelope and 12 Bit sound at 22050 sample rate.

The Micropython core modules are enhanced for vga, sprite, graphic and sound.

Finally I have a nice retro computer running Python. Thanks a lot for your work on that DVI thing.