3 ms·
I'd like to see a trend toward increasing use of raw framebuffers along with the embedded mini-PCs like the RPi, CHIP, Beagle*, etc. At one point in time I wor
by nitrogen 11y ago
I'd like to see a trend toward increasing use of raw framebuffers along with the embedded mini-PCs like the RPi, CHIP, Beagle*, etc. At one point in time I worked almost exclusively through the framebuffer console while developing a long-abandoned library to simplify framebuffer development. There are image viewers, PDF viewers, and web browsers that can use the raw framebuffer. I even wrote a basic framebuffer driver for an old HDTV tuner card.
There's something very satisfying about building up one's digital reality pixel by pixel, working with graphics as raw arrays of pixels, learning Bresenham's line drawing algorithm, etc. I highly recommend it.
- voltagex_ 11y agoHold on, was the framebuffer for the tuner used for input or output? I'm also very interested in being able to push pixels to the screen "manually".
- nitrogen 11y agoOutput. The tuner was from the era when PCs and GPUs didn't have the horsepower to decode 1080i MPEG-2, so the tuner had to have its own MPEG-2 decoder chip and display driver, with 16MB of RAM. It supported a basic OSD (sort of like hardware sprites) and arbitrary output resolutions, so IIRC I set up the OSD to stretch one of the OSD overlays to the full screen size, and pointed the framebuffer driver at the section of the card's memory assigned to that overlay. Here's an old demo: https://www.youtube.com/watch?v=cDWH7d8pbH0 https://www.youtube.com/watch?v=cDWH7d8pbH0 I never finished getting video input to work, and eventually my reference card was stolen so I never will. Working with the framebuffer is almost as easy as calling mmap() on /dev/fb0 and just writing data. There are ioctls for switching resolutions on drivers that supported it. But it sounds like DRM/KMS is the way to go these days if you aren't running a proprietary GPU driver.