Hi there,

I have been working on a small library to allow drawing directly to the
framebuffer, similar to FreeBSD's old VGL library. Including
keyboard handling and in the future I will tackle sound too. I have
made a quick port of the GNUBoy gameboy emulator as well as some debug
programs here:

https://gitlab.com/osen/openbsd_drmfb_gnuboy

I have implemented this currently using the DRM framebuffer via libdrm
but I am also in the early stages of using wsconsctl/mmap and
the framebuffer provided by efifb for some platforms which is working
well so far (and the code is so much nicer than libdrm). Just a few
questions:

1) From wsdisplay(4) manpage, what is the difference between
WSDISPLAYIO_MODE_MAPPED and WSDISPLAYIO_MODE_DUMBFB? Both seem to work
by mmap'ing the filedescriptor.

2) When I do mmap of the i.e /dev/ttyC0 file descriptor, I use an offset
of 0, so I am not sure where width/height is stored?, I am obviously
missing something). Where does the separate ioctl call of
WSDISPLAYIO_GINFO get this information?

3) I understand that vgafb(4) exists on macppc and sparc64 but can the
vga(4) only do text-mode? Currently I can get a framebuffer on:

intel via inteldrm (libdrm)
amd via amdgpu/radeondrm (libdrm)
raspberry pi via efifb (libdrm)
nvidia with EFI via efifb (wsdisplay, mmap)
nvidia with BIOS... ?

I suppose the way forward for this one will be to pick apart vesafb
from Xorg but I was hoping there might be something already in place
(admittedly it isn't a common use-case).

Any info would be greatly appreciated. That is probably enough
questions for now :)

Many thanks,

Karsten

Reply via email to