Page 2 of 2

Re:Weird Results returned from Vesa.

Posted: Fri Nov 19, 2004 1:57 am
by Candy
astrocrep wrote: Ok ill look into it!

Thanks for all the help tonight its very much appreciated.

I need to get to bed, its 2:40am here and I got work in less then 6 hours :o

Thanks again

Rich
explains... I live 6 hours later than you do, so it's 8:54 am here. Good night :)

Re:Weird Results returned from Vesa.

Posted: Fri Nov 19, 2004 2:51 pm
by astrocrep
I can't for the life of my figure out why I am only getting the first 64 colors shown. In all of the VESA/VBE examples i have seen, no of them do any palette manipulations...

The code behaves the same in Bochs and Qemu.

Clueless on this one,

Rich

Re:Weird Results returned from Vesa.

Posted: Fri Nov 19, 2004 4:40 pm
by df
you need to set the palette AFTER you have switched the mode.
3c8/3c9...

this is my old old vesa code (written in 1997) there is 1 or 2 dpmi calls (i used it in my demos with watcomc)..

it should give you plenty of info....

Re:Weird Results returned from Vesa.

Posted: Fri Nov 19, 2004 5:01 pm
by astrocrep
Awesome!

Thanks, Ill be looking at it asap.

Rich

Re:Weird Results returned from Vesa.

Posted: Sat Nov 20, 2004 11:44 am
by Candy
df wrote: you need to set the palette AFTER you have switched the mode.
3c8/3c9...

this is my old old vesa code (written in 1997) there is 1 or 2 dpmi calls (i used it in my demos with watcomc)..

it should give you plenty of info....
only point with 3c8 and 3c9 is that they are VGA registers, not VESA. In VGA modes (up to mode13) they must work, from VESA modes and on they need not work!

Beware! your code enters the out-of-spec territory, which you do not want to enter.

Re:Weird Results returned from Vesa.

Posted: Sat Nov 20, 2004 11:54 am
by astrocrep
So any suggestions on why the palette is wrong, and how I can safely adjust it?

Rich

Re:Weird Results returned from Vesa.

Posted: Sat Nov 20, 2004 11:56 am
by Candy
astrocrep wrote: So any suggestions on why the palette is wrong, and how I can safely adjust it?

Rich
Why it is wrong? Because nobody guaranteed it would be right.

How you can safely adjust it? Try the vesa set-palette-functions.

Re:Weird Results returned from Vesa.

Posted: Mon Nov 22, 2004 4:14 pm
by astrocrep
I finally got it fixed 8). Would it be safe to say, in 16bit+ mode, there are no palletes, since you are defining the RGB values?

Thanks

Rich

Re:Weird Results returned from Vesa.

Posted: Mon Nov 22, 2004 4:41 pm
by Candy
astrocrep wrote: I finally got it fixed 8). Would it be safe to say, in 16bit+ mode, there are no palletes, since you are defining the RGB values?
Which explains why most people prefer 24-bit mode (or even better, 32-bit mode). They are easiest to program.

Note, 24-bit mode is faster than 32-bit mode. If you're wondering why, think cache lines and low memory bandwidth. Your processor is quick enough to keep up in almost all cases.

In most (all I've seen) 16-bit modes there's no palette. I've heard that there would have been some that allow a palette, but again, I doubt that myself.

PS: if it's open source, where is it hosted? I always like to see vesa examples...
PS2: Can I see your VESA2 detection code / try it out on my laptop? Using my own hacked-up code it says only vesa1 is available, but I'm pretty certain that on a different laptop it also said only had vesa1 contained vesa2 (IBM centrino with intel something chipset).

Re:Weird Results returned from Vesa.

Posted: Mon Nov 22, 2004 5:04 pm
by astrocrep
I would be more than glad to assist a fellow coder out, however I kinda blew up my code, I have a struct listed in osstruct.h and I am trying to include it in both the realmode loader and pmode kernel, the loader will pass the addr of the struct to the kernel, and the kernel will asign that addr to a pointer struct, but something is currently being flaky.

As for the original question, gimme a day so I can clean it up and bring it back to its old form, and sure, id b glad to share, I also wanna incorporate a 640x480x16color (not bit) failsafe driver, so It would be good if you could test that for me at the same time, but gimme a day, 2 at the most and ill be in touch ;)

Thanks again for all the help,

Rich

Re:Weird Results returned from Vesa.

Posted: Mon Nov 22, 2004 8:01 pm
by ASHLEY4
Candy wrote: Note, 24-bit mode is faster than 32-bit mode. If you're wondering why, think cache lines and low memory bandwidth. Your processor is quick enough to keep up in almost all cases.
Lol, does that work by fuzzy logic ;-)

\\\\||////
(@@)
ASHLEY4.

Batteries not included, Some assembly required.