Qemu, SDL and VGL

Alex Burke alexjeffburke at gmail.com
Mon Jul 31 21:17:45 UTC 2006


I guess I first should explain what I was trying to do - and that is
to run Qemu on the FreeBSD console without any X11 involvement at all.
And, it still looks like this is possible, but I am experiencing a
bizarre bug.

To make SDL use VGL (the FreeBSD console video interface), I set
SDL_VIDEODRIVER=vgl, I stopped X and I kldloaded vesa. Having started
qemu, everything looked good and it came up in graphical mode - but
when I tried to type anything into the virtual system in front of me,
nothing. My guess is that the key mappings get screwed up or something
like that.

I have had a look through the code, and I see that SDL creates a
structure called a keysym. This stores the original scancode (it puts
the keyboard in raw mode), and also an SDL defined unique value for
the key (the "sym" value). Qemu takes this structure as part of its
event handling, and either compares against the sym value to do
special ops like screen grabbing or releasing, or sends the pure
scancodes into the VM.

The problem is, I am not sure which layer is likely to be causing the
problem. I wondered if anybody here had gotten this setup to work, and
if not that maybe you guys had some ideas. I hacked the code a little
to see if I could pass up the scancode without any translation, but I
haven't yet been successful.

I should also add, that if this seems sparse on information, then I
will do anything I can to resolve this. I thought of maybe running it
through a debugger to see what was going on, but there would seem to
be NO way i could isolate what the keyboard was doing from everything

Thanks, Alex J Burke.

More information about the freebsd-ports mailing list