ar-nelson / uxnpi

Uxn for the Raspberry Pi, on bare metal
GNU General Public License v3.0
10 stars 0 forks source link

I am looking for a UXN framebuffer on the RP2040. #1

Open PythonLinks opened 6 months ago

PythonLinks commented 6 months ago

I found the uxnrpi web page, but no code.

My interest is in building the UXN engine on an fpga, but running the display from an RP2040. I quite like the Pico-Ice. https://pico-ice.tinyvision.ai/

I am an expert at building stack machines on FPGAs. But what I lack is knowledge about how to build the display. If you have the display part here, that would be awesome.

ar-nelson commented 6 months ago

If you're referring to the Uxn display logic, that is split between uxn-cpp/varvara.(cpp|hpp) (parent abstract class handling the display logic) and circle_varvara.(cpp|hpp) (subclass implementing the part that uses Circle to draw to the framebuffer). Look at the Screen, PixelScreen, and CircleScreen classes. I was trying to make uxn-cpp portable between platforms, and may have gone overboard on the OO flexibility with all those abstract classes.

If you're referring to actual display device drivers, unfortunately there is no specialized display-handling code in this project.

The only display I have tested on is the display in the GPi Case 2W. This device is barely documented at all, and I don't know the manufacturer or any other specs for its display, only that it connects via GPIO and that there's a driver for it that I had to include in the overlays directory of the SD card. When I did that, the display classes in Circle just worked.

(I later encountered issues getting Circle to drive the Case 2W's audio device, which is also GPIO; any attempt to initialize GPIO after initializing the display driver would crash the system and display garbage on the screen. This is beyond my skill level to solve, so I likely won't continue the project until I can find someone more knowledgeable about the details of Raspberry Pi device drivers to help me solve this problem.)

Most chances, the Circle library I used will do what you want. You can study my code for ideas on how to use it, at least.

PythonLinks commented 6 months ago

Thank you.

I am sorry that there is not a display ready to run reliably.

I think that for now I will focus on UXN in Verilog, and worry about the display later.