Skip to contentSkip to conversation

qemu vga.c

Qemu-devel Fabrice Bellard 3 participants 6 messages Aug 11, 2003 – Aug 30, 2003

lore
Share & tools
lore
#1 lore raw

Fabrice Bellard <[email protected]> wrote:

: Modified files:
: . : vga.c

I have not yet had the chanse of testing the VGA code, so I wonder: how fast is it? And does it look good? :)

Signature · 4 lines
Johan Rydberg, Free Software Developer, Sweden
http://rtmk.sf.net | http://www.nongnu.org/guss/

Playing Tom McCrae - Ghost Of A Shark
#2 lore raw
Quoted 7 lines · Johan Rydberg

Fabrice Bellard <[email protected]> wrote:

: Modified files:
: . : vga.c

I have not yet had the chanse of testing the VGA code, so I wonder: how fast is it? And does it look good? :)

It is currently fast enough to have a usable PC emulator. Many DOS games are usable. It should be faster than the bochs emulation but slightly slower than the dosemu one. This VGA emulation code is more accurate than either bochs or dosemu (all VGA modes, including non standard ones (i.e. the ones not supported by int $0x10) should work), but of course more testing is needed.

There are some optimisations pending (VGA memory accesses could be faster, but I wanted first to have a simple code). The S3 specific code the SVGA emulation is not finished. It will be mainly used to launch X11 or Windows in high resolution modes. I also have to modify the LGPL'ed vga bios to add S3 VESA support.

Fabrice.

#3 lore raw

Fabrice Bellard <[email protected]> wrote:

: It is currently fast enough to have a usable PC emulator. Many DOS games : are usable. It should be faster than the bochs emulation but slightly : slower than the dosemu one. This VGA emulation code is more accurate : than either bochs or dosemu (all VGA modes, including non standard ones : (i.e. the ones not supported by int $0x10) should work), but of course : more testing is needed.

Sounds great. Maybe you could show us deadly being some nice screenshots?

: There are some optimisations pending (VGA memory accesses could be : faster, but I wanted first to have a simple code). The S3 specific code : the SVGA emulation is not finished. It will be mainly used to launch X11 : or Windows in high resolution modes. I also have to modify the LGPL'ed : vga bios to add S3 VESA support.

I saw that you trap all writings to the graphics memory. Is this a must, or can't you just store the data in a buffer and process it according to the current mode when the display should be updated?

Signature · 4 lines
Johan Rydberg, Free Software Developer, Sweden
http://rtmk.sf.net | http://www.nongnu.org/guss/

Playing Tom McCrae - Line Of Fire
#4 lore raw
Quoted 5 lines · Johan Rydberg

Fabrice Bellard <[email protected]> wrote:

: It is currently fast enough to have a usable PC emulator. Many DOS games : are usable. It should be faster than the bochs emulation but slightly : slower than the dosemu one. This VGA emulation code is more accurate : than either bochs or dosemu (all VGA modes, including non standard ones : (i.e. the ones not supported by int $0x10) should work), but of course : more testing is needed.

Sounds great. Maybe you could show us deadly being some nice screenshots?

If I have the time, the next release will really support VGA emulation so that you can actually try it. I'll try to put screenshots.

Quoted 5 lines

: There are some optimisations pending (VGA memory accesses could be : faster, but I wanted first to have a simple code). The S3 specific code : the SVGA emulation is not finished. It will be mainly used to launch X11 : or Windows in high resolution modes. I also have to modify the LGPL'ed : vga bios to add S3 VESA support.

I saw that you trap all writings to the graphics memory. Is this a must, or can't you just store the data in a buffer and process it according to the current mode when the display should be updated?

Correct vga emulation requires that you trap all memory writes and read as in planar mode complex binary operations can be performed by the VGA card on the 4 planes simultaneously (when writing or reading one byte, the VGA card writes or reads 4 bytes simultaneously). Even in "chain4" mode which is the simplest memory mapping (linear VGA memory access), writes to some memory planes can be disabled. My upcoming optimizations will consist in using specialized memory access functions for each case, and by mapping memory directly when possible (it is possible only if chain4 mode is activated and if all 4 VGA planes are enabled).

Fabrice.

#5 lore raw

[Qemu-devel] qemu current (was: qemu vga.c)

In reply to Fabrice Bellard
Quoted 6 lines · Fabrice Bellard

It is currently fast enough to have a usable PC emulator. Many DOS games are usable. It should be faster than the bochs emulation but slightly slower than the dosemu one. This VGA emulation code is more accurate than either bochs or dosemu (all VGA modes, including non standard ones (i.e. the ones not supported by int $0x10) should work), but of course more testing is needed.

I unsucessfuly tried to boot qemu -current.

qemu : today curent cvs snapshot
sdl : SDL 1.2.5 fresh copy
bios : BIOS-bochs-latest and VGABIOS-lgpl-latest from bochs-2.0.2
images : * freedos 10meg image from bochs repository
* dlx linux 10meg image from bochs repository
* vl-test kernel and image

When using i386-softmmu/vl I get nothing more than a blank SDL window. When using i386/vl I get always the same message :
mmap failed when mapped physical address 0x00000000 to virtual address 0x00000000

Am I missing something ?
Is there some working disk image available somewhere ?

Cheers,
Nicolas.