VESA - Virtual PC and Bochs problems.

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Thunder

VESA - Virtual PC and Bochs problems.

Post by Thunder »

Hello,

I'm back after very long pause :) :)

Now I want to make my OS to work on Virtual PC and Bochs, but as always I have problems ;).

So, Storm OS supports VESA 2.0 LFB and screen resolutions up to 1024x768x32bpp. On real computer Storm OS works fine, but!...on Bochs it seems that 2.1 version doesn't support 32bpp color depth (only up to 24bpp). Virtual PC supports 32bpp, but...I have strange thing - it seems that VPC draws only first ~ 240 KB of screen. I.e.: if I try to draw whole 640x480x32bpp screen, so, after drawing these 240KB of screen, Virtual PC repaints the same area again and crashes.

What problem could be?

Thank you...bye ;)
DennisCGc

Re:VESA - Virtual PC and Bochs problems.

Post by DennisCGc »

Hmm, there could be just a problem with the emulators.
Btw, what graphical bios do you use with BOCHS ?
(May be this could be the problem, but anyway, virtual pc should run properly. ::) )
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:VESA - Virtual PC and Bochs problems.

Post by Candy »

DennisCGc wrote: (May be this could be the problem, but anyway, virtual pc should run properly. ::) )
Do you happen to notice the "microsoft" logo on the box?

There is a good chance you expect a linear buffer while the video card provides a too small buffer with swapping. That puts the end of the buffer at some place from the top after which it would possibly redraw, possibly crash.
DennisCGc

Re:VESA - Virtual PC and Bochs problems.

Post by DennisCGc »

Do you happen to notice the "microsoft" logo on the box?
Yes, of course ;D (I was ready to mention, that it shouldn't work because it was from MS ;) ), but according to some friends Windows 98 boots in virtual pc, but Windows 98 is from M$ too.
Maybe they have a security built-in ;)
There is a good chance you expect a linear buffer while the video card provides a too small buffer with swapping. That puts the end of the buffer at some place from the top after which it would possibly redraw, possibly crash.
This is a possibility, though he mentioned it works on real hardware.
Maybe the emulators doesn't provide it (but it's VESA 2.0, so it should work (I know, VESA 2.0 is a standard, but VESA 2.0 video cards have a linear buffer.)
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:VESA - Virtual PC and Bochs problems.

Post by Candy »

DennisCGc wrote:
There is a good chance you expect a linear buffer while the video card provides a too small buffer with swapping. That puts the end of the buffer at some place from the top after which it would possibly redraw, possibly crash.
This is a possibility, though he mentioned it works on real hardware.
Maybe the emulators doesn't provide it (but it's VESA 2.0, so it should work (I know, VESA 2.0 is a standard, but VESA 2.0 video cards have a linear buffer.)
What if it just doesn't support the linear framebuffer but all the rest of vesa 2? Then, it'd be able to do the high resolutions and everything, but only map the first X bytes. Which would map to exactly this behaviour.
DennisCGc

Re:VESA - Virtual PC and Bochs problems.

Post by DennisCGc »

So, for full support he should use the bank registers, right ? ::)
And why does Windows 98 run on Virtual PC ? ::)
srg

Re:VESA - Virtual PC and Bochs problems.

Post by srg »

DennisCGc wrote: So, for full support he should use the bank registers, right ? ::)
And why does Windows 98 run on Virtual PC ? ::)
It would depend on the Graphics card driver that Windows 98 uses for VirtualPC, it may use bank switching.

srg
Thunder

Re:VESA - Virtual PC and Bochs problems.

Post by Thunder »

I'm using VGABIOS-lgpl-latest VGABIOS on Bochs, but if Virtual PC would use VESA banked mode then it would let to draw only 64KB of screen (not 240KB) and I choose for example VESA mode 0x4112 that is: 640x480x32bpp LFB, clear video memory before enabling this mode.
DennisCGc

Re:VESA - Virtual PC and Bochs problems.

Post by DennisCGc »

It would depend on the Graphics card driver that Windows 98 uses for VirtualPC, it may use bank switching.

srg
Not exactly, I read that the bankswitching method only supports 1 MB video ram.
@Thunder: it would be nice if you can send me a booting image, so I can see it for myself ;)
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:VESA - Virtual PC and Bochs problems.

Post by Candy »

DennisCGc wrote: Not exactly, I read that the bankswitching method only supports 1 MB video ram.
*has programmed 1280*1024*32bits color in QBasic* - no that's bull. 1280*1024*32bits = 5.3MB
DennisCGc

Re:VESA - Virtual PC and Bochs problems.

Post by DennisCGc »

Candy wrote:
DennisCGc wrote: Not exactly, I read that the bankswitching method only supports 1 MB video ram.
*has programmed 1280*1024*32bits color in QBasic* - no that's bull. 1280*1024*32bits = 5.3MB
Hey, don't blame me >:( , just read it somewhere, and you use Linear Frame Buffer, or not ? ::)
Thunder

Re:VESA - Virtual PC and Bochs problems.

Post by Thunder »

Yes, I said clearly - I use LFB (Linear Frame Buffer).

You can find latest Storm OS installer at http://www.stormos.net/os_files/Storm_OS_014a.exe.
DennisCGc

Re:VESA - Virtual PC and Bochs problems.

Post by DennisCGc »

Thunder wrote: Yes, I said clearly - I use LFB (Linear Frame Buffer).
I was talking to Candy
Thunder wrote: You can find latest Storm OS installer at http://www.stormos.net/os_files/Storm_OS_014a.exe.
I didn't mean that, I meant an image from a diskette drive.
Why ? Simple, I don't have a diskette drive yet ;)
And it crashes when I run it (yes, I had to restart my computer :( )
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:VESA - Virtual PC and Bochs problems.

Post by Candy »

DennisCGc wrote: Hey, don't blame me, just read it somewhere, and you use Linear Frame Buffer, or not ?
I reply to your bank switching comment, QBasic only supports real mode (that completely rules out the linear framebuffer), what's the point of you still asking me?
ASHLEY4

Re:VESA - Virtual PC and Bochs problems.

Post by ASHLEY4 »

If it work on a real pc, thats what matters, dump BOCHS,VIRTUAL PC,And get a cheap test pc,There to much emulaling >:(.

ASHLEY4.
Post Reply