by bogwog · 6y ago · 0 comments
So it's mostly a fun gimmick/curiosity. I wrote a realtime 3D rasterizer that renders to fbdev a while back. It was a fun project, but useless.
You can't write to fbdev because that's not what X11 is using to display buffers to the screen, it uses the newer kernel mode-setting (KMS) API. It's only when you switch away to a VT that the "KMS master" drops its session, the kernel switches back to fbcon, and you can see the "raw fbdev" buffer again, which is usually a fake framebuffer. If you then write to the fbdev framebuffer, you'll see your changes, but fbcon will come in and overwrite them with the kernel console, unless you ioctl(KDSETMODE, KD_GRAPHICS); to turn off fbcon from drawing.
Download old qemu. https://drive.google.com/file/d/1e6UJcTC9FfwO20xzvcasTToPoaT...
Load into jslinux. And execute the following commands in xterm.
gzip -dc qemu-0.9.1.tar.gz | tar xf - -C/
mkdir /dev/shm && mount -t tmpfs tmpfs /dev/shm
SDL_NOMOUSE=1 qemu -k en-us -m 4 pi.vfd
Necessary condition, Xorg must work with the fbdev driver.