Greetings,
Here's my thoughts on the possible way of video implementation in plex86:
General idea of plex86 is virtualization, not emulation. Running multiple
virtual PC's at the same PC hardware. Thus it means to emulate as less of
CPU as possible to allow virtualization to run at maximum speed. Thus I
believe it makes sense to use the same approach for virtualization of the
rest of hardware (because we are virtualizing PC archtecture, not just
x86).
Virtual and real hardware matches, so when it's possible to access some
particular hardware exclusively (eg. video when running full-screen
guest so no other host tasks accesses it simultaneously), it should be
possible to allow full-screen guest to access video hardware directly (in
the similar way windows uses full-screen VGA in VDM's, but extending it to
SVGA and 2D/3D-specific hardware of modern accelerators). Benefits could
be the fastest possible video access for guest, including 2d/3d
acceleration not having to write an additional layer to host os
drivers (x/ogl/directx etc). However I realize that windowed guest is also
required, but it doesn't prevent from implementing a faster technique for
full-screen mode. Another problem I can think of, is that some of modern
accelerators have a lot of on-board RAM, 64MB could be a lot to
save/restore when switching from full-screen guest to another task and
back, however it maybe possible to optimize this code. Also, the question
is, could the code of initializing/saving/restoring the state of specific
video chip be obtained freely. Also, SDL is a good approach of portable
video, however is it worth to write additional layer of 2d/3d
acceleration, which could cause slow-downs and compatibility problems,
when the guest hardware matches the host hardware. But I understand that
for bochs, being a cross-platform using portable library is the only
possible approach (also probably for windowed guest of plex86).
Uhus