Weird Results returned from Vesa.

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.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Weird Results returned from Vesa.

Post 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 :)
astrocrep

Re:Weird Results returned from Vesa.

Post 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
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re:Weird Results returned from Vesa.

Post 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....
-- Stu --
astrocrep

Re:Weird Results returned from Vesa.

Post by astrocrep »

Awesome!

Thanks, Ill be looking at it asap.

Rich
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Weird Results returned from Vesa.

Post 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.
astrocrep

Re:Weird Results returned from Vesa.

Post by astrocrep »

So any suggestions on why the palette is wrong, and how I can safely adjust it?

Rich
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Weird Results returned from Vesa.

Post 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.
astrocrep

Re:Weird Results returned from Vesa.

Post 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
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Weird Results returned from Vesa.

Post 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).
astrocrep

Re:Weird Results returned from Vesa.

Post 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
ASHLEY4

Re:Weird Results returned from Vesa.

Post 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.
Post Reply