How can i swich SVGA mode in PMode? For exaple I want 1024x768x32 graphics... Where can I get info about VESA?
Thnx!
SVGA in PMode
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:SVGA in PMode
i guess http://www.vesa.org will be in your bookmarks by today
to be short (many *many* threads about this), only VBE3-compliant video card will let you reconfigure display to another mode while staying in full pmode (but still requiring some private descriptor for 16 bits code, etc).
If you want to switch for other hardware, you will have either to set up v86 mode (hum ... also a lot of threads relating how to do it, but buy some coffee 'cuz it's quite tricky) or go to realmode & back for the mode setup, etc.
The best way to do is having linear frame-buffer (access the whole video memory without any other BIOS calls), but if your hardware don't support it, you still have the option of using VESA1.2 "protected mode interface" for bank switching.
to be short (many *many* threads about this), only VBE3-compliant video card will let you reconfigure display to another mode while staying in full pmode (but still requiring some private descriptor for 16 bits code, etc).
If you want to switch for other hardware, you will have either to set up v86 mode (hum ... also a lot of threads relating how to do it, but buy some coffee 'cuz it's quite tricky) or go to realmode & back for the mode setup, etc.
The best way to do is having linear frame-buffer (access the whole video memory without any other BIOS calls), but if your hardware don't support it, you still have the option of using VESA1.2 "protected mode interface" for bank switching.
Re:SVGA in PMode
It's about time VESA has a way to switch modes
from within pmode (VESA 3.0). But, are they
really making the code 16-bit? That's crazy.
I know you can still execute it but it's just a pain.
But I guess if any of us are going to make an operating system, we cannot expect everyone to have VESA 3.0
so we must rely on the old method of switching
video modes (or switching banks if you dont have LFB support.) I'm making an operating system and I just
leave the damn thing in 1024x768x16 ALL THE TIME!
Hell with it.
from within pmode (VESA 3.0). But, are they
really making the code 16-bit? That's crazy.
I know you can still execute it but it's just a pain.
But I guess if any of us are going to make an operating system, we cannot expect everyone to have VESA 3.0
so we must rely on the old method of switching
video modes (or switching banks if you dont have LFB support.) I'm making an operating system and I just
leave the damn thing in 1024x768x16 ALL THE TIME!
Hell with it.
Re:SVGA in PMode
Forget VESA, of the SVGA code I have seen, it is just vga
programming with larger port registers.
I suggest writting a base vga driver, pass the video info
to the kernel and load a svga driver at load time. If you
do not have a svga driver, how were you going to use
acceleration?
Look at the svgalib for linux.
http://www.svgalib.org/
#########################
.code16
.global Video
Video: xorw %cx, %cx
movb $0x12, %ah
decw %cx
movb $0x10, %bl
int $0x10
incw %cx
je Old
AtLeastEGA: movw $0x1A00, %ax
int $0x10
cmpb $0x1A, %ah
jne EGA
AtLeastVGA: movw $0x4F00, %ax
int $0x10
cmpw $0x4F, %ax
jne VGA
ret
Old: movl $0x444C4F, (%di)
ret
EGA: movl $0x414745, (%di)
ret
VGA: movl $0x414756, (%di)
ret
programming with larger port registers.
I suggest writting a base vga driver, pass the video info
to the kernel and load a svga driver at load time. If you
do not have a svga driver, how were you going to use
acceleration?
Look at the svgalib for linux.
http://www.svgalib.org/
#########################
.code16
.global Video
Video: xorw %cx, %cx
movb $0x12, %ah
decw %cx
movb $0x10, %bl
int $0x10
incw %cx
je Old
AtLeastEGA: movw $0x1A00, %ax
int $0x10
cmpb $0x1A, %ah
jne EGA
AtLeastVGA: movw $0x4F00, %ax
int $0x10
cmpw $0x4F, %ax
jne VGA
ret
Old: movl $0x444C4F, (%di)
ret
EGA: movl $0x414745, (%di)
ret
VGA: movl $0x414756, (%di)
ret
Re:SVGA in PMode
OK, but the problem is: what are those SVGA registers? That information can be difficult if not impossible to get hold of (manufacturers often don't document newer cards). Hence VESA is the only video standard that is almost guaranteed to be present on SVGA cards..bdjames wrote:Forget VESA, of the SVGA code I have seen, it is just vga programming with larger port registers.