VBE modeset silently failing

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.
Post Reply
User avatar
thepowersgang
Member
Member
Posts: 734
Joined: Tue Dec 25, 2007 6:03 am
Libera.chat IRC: thePowersGang
Location: Perth, Western Australia
Contact:

VBE modeset silently failing

Post by thepowersgang »

(odds are I've overlooked something simple here)

I've found an issue in real hardware testing. I attempt to use VBE to set the video mode to 1024x768x32bpp using INT 0x10/AX=0x4F02/BX=0x4118 (mode 0x118 is in the list returned by 0x4F00)
However, although the modeset call returns AX=0x004F, the mode does not change. The VGA cursor continues to flash, and there is no change in the display (I would expect an interesting pattern along the top as the B8000 data is interpreted as 32-bpp pixels)

Hardware Details: UniChrome S3 VGA (Vendor 0x1106, Dev 0x3108)
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
User avatar
turdus
Member
Member
Posts: 496
Joined: Tue Feb 08, 2011 1:58 pm

Re: VBE modeset silently failing

Post by turdus »

You have to validate VBE list, it may contain modes that are NOT supported (requiring more memory than the card currently has for example).
And you always have to get the memory address where the screen starts, in graphic modes it's usually NOT 0xB8000, but 0xA0000. For simple modes you can use vga registers for this (if supported, in which case you'll also have the ability to modify that address), and finally it should be found in vbe info block too.
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: VBE modeset silently failing

Post by gerryg400 »

(I would expect an interesting pattern along the top as the B8000 data is interpreted as 32-bpp pixels)
No, my display doesn't change until I actually write to it. The text mode stuff remains there until I write over it with pixels.
If a trainstation is where trains stop, what is a workstation ?
User avatar
thepowersgang
Member
Member
Posts: 734
Joined: Tue Dec 25, 2007 6:03 am
Libera.chat IRC: thePowersGang
Location: Perth, Western Australia
Contact:

Re: VBE modeset silently failing

Post by thepowersgang »

@turdus
I did notice that flag today, but it's set on all modes returned And I do have the correct framebuffer address (it's 0xE8000000 for the curous).

@gerryg400
I do attempt a write to the screen, but it curiously causes the machine to lock after six lines (which equates to six pages because of the mode) The interesting bit is the VGA cursor still being drawn (it still blinks in the bottom left corner)

I've attached the serial debug output, showing the supported modes and relevant addresses (the numbers in brackets after the modes are if the mode supports the LFB)
Attachments
acess_minuet_serial_20120420.txt
(2.88 KiB) Downloaded 69 times
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Post Reply