Skip to contentSkip to conversation

VGA BIOS source code

Qemu-devel Bartosz Fabianowski 8 participants 17 messages May 31, 2004 – Jun 2, 2004

lore
Share & tools
lore
#0 lore raw

I am trying to get SVGA graphics modes to work under Windows 98. Currently, the only known way of accomplishing this is to install SDD 7 beta, which is a 21 day test version, along with some obscure VxD file. I'd prefer to fix the VBE support and be able to run SDD 6.53, which is free.

Now, in order to fiddle with the VBE implementation, I need to have access to the VGA BIOS source code. QEMU is using the same lgpl BIOS as Bochs and plex86. Its homepage is http://www.nongnu.org/vgabios/. However, none of the download links on that page work, the page seems to have been abandoned for some time, and all the mailing lists seem to be dead.

So, my question is, does anybody have the current source code used to create the lgpl VGA BIOS? The current version should be something like 0.4c.

- Bartosz

#1 lore raw
Quoted 13 lines · Bartosz Fabianowski

I am trying to get SVGA graphics modes to work under Windows 98. Currently, the only known way of accomplishing this is to install SDD 7 beta, which is a 21 day test version, along with some obscure VxD file. I'd prefer to fix the VBE support and be able to run SDD 6.53, which is free.

Now, in order to fiddle with the VBE implementation, I need to have access to the VGA BIOS source code. QEMU is using the same lgpl BIOS as Bochs and plex86. Its homepage is http://www.nongnu.org/vgabios/.
However, none of the download links on that page work, the page seems to have been abandoned for some time, and all the mailing lists seem to be dead.

Quoted 2 lines

So, my question is, does anybody have the current source code used to create the lgpl VGA BIOS? The current version should be something like 0.4c.

I successfully checked it out from the CVS repository.

Instructions at http://savannah.nongnu.org/cvs/?group_id=891

#2 lore raw
Quoted 14 lines · Antony T Curtis
Quoted 13 lines · Bartosz Fabianowski

I am trying to get SVGA graphics modes to work under Windows 98. Currently, the only known way of accomplishing this is to install SDD 7 beta, which is a 21 day test version, along with some obscure VxD file. I'd prefer to fix the VBE support and be able to run SDD 6.53, which is free.

Now, in order to fiddle with the VBE implementation, I need to have access to the VGA BIOS source code. QEMU is using the same lgpl BIOS as Bochs and plex86. Its homepage is http://www.nongnu.org/vgabios/.
However, none of the download links on that page work, the page seems to have been abandoned for some time, and all the mailing lists seem to be dead.

Quoted 6 lines
Quoted 2 lines

So, my question is, does anybody have the current source code used to create the lgpl VGA BIOS? The current version should be something like 0.4c.

I successfully checked it out from the CVS repository.

Instructions at http://savannah.nongnu.org/cvs/?group_id=891

Hmm... I have successfully managed to compile the VGA BIOS from source and it appears to work...

However, the bcc compiler from the ports collection appears to have some problems - multiply/divide/bitshift operations are not emitted and rely on calling helper functions (missing in the vgabios source) would obviously be much slower than neccessary.

Does anyone know of any patches for bcc?

#3 lore raw
Quoted 2 lines

Hmm... I have successfully managed to compile the VGA BIOS from source and it appears to work...

For me, it pukes like this:

as86 _vgabios_.s -b vgabios.bin -u -w- -g -0 -j -O -l vgabios.txt
as: usage: as [-03agjuw] [-b [bin]] [-lm [list]] [-n name] [-o obj] [-s sym] src

How did you manage to get around this?

- Bartosz

#4 lore raw
Quoted 10 lines · Bartosz Fabianowski
Quoted 2 lines

Hmm... I have successfully managed to compile the VGA BIOS from source and it appears to work...

For me, it pukes like this:

as86 _vgabios_.s -b vgabios.bin -u -w- -g -0 -j -O -l vgabios.txt
as: usage: as [-03agjuw] [-b [bin]] [-lm [list]] [-n name] [-o obj] [-s sym] src

How did you manage to get around this?

I used the bin86 port for the assembler ;)

I think I have it all figured out now... I have examined the source code available at http://www.cix.co.uk/~mayday/ and it appears it has the requisite support and is actively maintained.

So I will be deinstalling the bin86 and bcc ports and installing the Dev86src-0.16.15.tar.gz from that site.

Signature · 1 line
Antony T Curtis <[email protected]>
#5 lore raw
Quoted 2 lines

So I will be deinstalling the bin86 and bcc ports and installing the Dev86src-0.16.15.tar.gz from that site.

I have done that. It compiles out-of-the-box and runs on FreeBSD, which is quite amazing really. However, the bcc that comes with it doesn't look gcc's preprocessor output. So for me, that combination didn't work either :(

- Bartosz

#6 lore raw
In reply to Bartosz Fabianowski
Quoted 2 lines · Bartosz Fabianowski

I am trying to get SVGA graphics modes to work under Windows 98. Currently, the only known way of accomplishing this is to install SDD 7 beta, which is a 21 day test version, along with some obscure VxD file. I'd prefer to fix the VBE support and be able to run SDD 6.53, which is free. [...]

Today, someone sent me a patch to emulate a CLGD54xx VGA card in QEMU (currently ISA only card, but I asked the author to add PCI support). It may be a good solution for Win 9x as I won't have time to work on the planned Sis 6326 emulation in the near future.

Of course I agree that fixing the VGA BIOS is a good idea. A small question on that topic: with the SDD 7 ou 6, does Win 9x use a linear frame buffer ? I am asking that because the QEMU VGA emulation is currently much faster when a linear frame buffer is used.

Fabrice.

#7 lore raw
Quoted 1 line

A small question on that topic: with the SDD 7 ou 6, does Win 9x use a linear frame buffer ?

I haven't tried SDD 7. But with SDD 6, it definitely does not use a LFB and this is actually where the current bug is. While drawing the screen contents, the window does not get shifted and everything gets drawn on top of each other in the first 64k of the screen.

I am currently digging into fixing this bug. But still, SDD 6 will not use an LFB.

- Bartosz

#8 lore raw
In reply to Fabrice Bellard
Quoted 10 lines · Fabrice Bellard
Quoted 6 lines · Bartosz Fabianowski

I am trying to get SVGA graphics modes to work under Windows 98. Currently, the only known way of accomplishing this is to install SDD 7 beta, which is a 21 day test version, along with some obscure VxD file. I'd prefer to fix the VBE support and be able to run SDD 6.53, which is free.
[...]

Today, someone sent me a patch to emulate a CLGD54xx VGA card in QEMU (currently ISA only card, but I asked the author to add PCI support).

Aha - good. I was going to suggest that you use one of those instead of the SiS 6326 - simply 'cause simulating a fairly dumb card [1] seems like a more sensible approach. Any idea which specfic chip is being emulated
- as I think I have some of the chip docs squirreled away somewhere.

DF

[1] Either not acceleration, or only simple BitBLT support.

#9 lore raw
In reply to Fabrice Bellard
Quoted 8 lines · Fabrice Bellard
Quoted 6 lines · Bartosz Fabianowski

I am trying to get SVGA graphics modes to work under Windows 98. Currently, the only known way of accomplishing this is to install SDD 7 beta, which is a 21 day test version, along with some obscure VxD file. I'd prefer to fix the VBE support and be able to run SDD 6.53, which is free.
[...]

Quoted 4 lines

Today, someone sent me a patch to emulate a CLGD54xx VGA card in QEMU (currently ISA only card, but I asked the author to add PCI support). It may be a good solution for Win 9x as I won't have time to work on the planned Sis 6326 emulation in the near future.

Sounds great... Somewhere, I have the Cirrus Logic CL-GD542X/3X Hardware Reference manual. The 542X Cirrus Logic chips are a good one to emulate because they are a good no-frills chip which are simple to program directly and (in the VLB/PCI versions) have a simple linear frame buffer and memory mapped I/O.

Signature · 1 line
Antony T Curtis <[email protected]>
#10 lore raw
Quoted 1 line

Sounds great... Somewhere, I have the Cirrus Logic CL-GD542X/3X Hardware Reference manual.

Once the patch hits the tree, I would like to help developing, improving and bug fixing it. But unfortunately, I have no reference manual and even hours of googling have not revealed anything of use. Is that manual you have in actual dead tree format or is it a PDF / text file you could mail to me?

- Bartosz

#11 lore raw
Quoted 8 lines · Bartosz Fabianowski
Quoted 2 lines

Sounds great... Somewhere, I have the Cirrus Logic CL-GD542X/3X Hardware Reference manual.

Once the patch hits the tree, I would like to help developing, improving and bug fixing it. But unfortunately, I have no reference manual and even hours of googling have not revealed anything of use. Is that manual you have in actual dead tree format or is it a PDF / text file you could mail to me?

It's a dead-tree format... Once upon a time, you only had to email Cirrus Logic and they would send the reference books free of charge.

Signature · 1 line
Antony T Curtis <[email protected]>
#12 lore raw
In reply to Fabrice Bellard
Quoted 4 lines · Fabrice Bellard

Today, someone sent me a patch to emulate a CLGD54xx VGA card in QEMU (currently ISA only card, but I asked the author to add PCI support). It may be a good solution for Win 9x as I won't have time to work on the planned Sis 6326 emulation in the near future.

I am wrong to say that it would be easier to write a pseudo video driver specifically for qemu, who would directly talk to the host part, rather than using a already written windows video driver but with obligation to adapt qemu to this driver ?
Is it what Filip Navara has done ?

#13 lore raw
Quoted 13 lines · [email protected] wrote:
Quoted 6 lines · Fabrice Bellard

Today, someone sent me a patch to emulate a CLGD54xx VGA card in QEMU (currently ISA only card, but I asked the author to add PCI support). It may be a good solution for Win 9x as I won't have time to work on the planned Sis 6326 emulation in the near future.

I am wrong to say that it would be easier to write a pseudo video driver specifically for qemu, who would directly talk to the host part, rather than using a already written windows video driver but with obligation to adapt qemu to this driver ?

Depends. There are very few people who wrote drivers for closed source operating systems (like Windows in general) and even less people writing drivers for legacy closed source systems (such as Consumer Windows - 9x/Me). Now you can imagine that these people make a great business from that and try to sell their experience and in the end there are only few persons who would write these drivers and open source them (without some company backing them with money).

Quoted 3 lines

Is it what Filip Navara has done ?

Basicly yes. I've done a driver that uses the simple Bochs/QEMU VBE interface using I/O ports, but it's only for Windows NT-based systems and not for Consumer Windows, so there is still gap that must be filled. I think that emulating a real video card AND the simple interface (like Bochs/QEMU VBE or VMware) is the way to go.

Regards,
Filip

#14 lore raw
In reply to Bartosz Fabianowski
Quoted 1 line · Bartosz Fabianowski

I am trying to get SVGA graphics modes to work under Windows 98. Currently, the only known way of accomplishing this is to install SDD 7 beta, which is a 21 day test version, along with some obscure VxD file. I'd prefer to fix the VBE support and be able to run SDD 6.53, which is free.

For the 21 days period - just kick out from the start-up the SDD stuff (you don't need it anyway) with msconfig...

See my User Guide ("HOWTO") at: http://www.dad-answers.com/qemu/howto/qemu-win98-howto.html (I'll probably finish it tommorow although I don't know whatever to write TUN/TAP explanation)..

Thanks
Hetz

#15 lore raw
Quoted 1 line

For the 21 days period - just kick out from the start-up the SDD stuff (you don't need it anyway) with msconfig...

Sure you can do that. But first of all, I want a legally clean solution (no trial version, but a truly free one) and second, I simply want to fix the bug ;).

Quoted 1 line

See my User Guide ("HOWTO")

I have had a look at your guide. Good job making QEMU accessible to newbies. One thing you might want to change is the way hard disk images are created though. Using qemu-mkcow is much more space-efficient than dd, as it will not fill 1GB of your hard drive with useless zeros if that space is not allocated by the guest operating system.

- Bartosz

#16 lore raw
In reply to Hetz Ben Hamo
Quoted 7 lines · Hetz Ben Hamo
Quoted 5 lines · Bartosz Fabianowski

I am trying to get SVGA graphics modes to work under Windows 98. Currently, the only known way of accomplishing this is to install SDD 7 beta, which is a 21 day test version, along with some obscure VxD file. I'd prefer to fix the VBE support and be able to run SDD 6.53, which is free.

Quoted 7 lines

For the 21 days period - just kick out from the start-up the SDD stuff (you don't need it anyway) with msconfig...

See my User Guide ("HOWTO") at:
http://www.dad-answers.com/qemu/howto/qemu-win98-howto.html (I'll probably finish it tommorow although I don't know whatever to write TUN/TAP explanation)..

Wow Hetz! This is great!

Is there any chance of getting these kinds of HOWTOs linked from the main site? I've got a fairly good archive of the mailing list, but it is becoming harder to find things like this in it (too many messages). The main HOWTO is great, but I think that other HOWTOs would be good to add as well.

Best,
Kyle