OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Nov 24, 2020 8:40 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: VESA without BIOS
PostPosted: Mon Oct 19, 2020 3:21 am 
Offline
Member
Member
User avatar

Joined: Tue Sep 15, 2020 8:07 am
Posts: 155
Location: London, UK
mallard wrote:
bzt wrote:
It is not. See The Incredible Machine for example.


Slight nitpick; that game actually runs at 640x400, allowing it to double-buffer within the standard 256KB VGA memory, which certainly affects (perceived) performance.

I've previously posted the available options for "better-than-VGA" graphics in protected mode. Personally, I use the x86 emulator route (via the excellent designed-for-exactly-this-purpose libx86emu).



Probably redundant idea now, but did anyone ever "wrap up" libx86emu in to a c library that could be used as a basic VBE graphics driver?

I've spent days fighting with GRUB2, and getting nowhere... I think I'm going to have to bite the bullet, move into the21st century and get my kernel booting via EFI if I want graphics :roll:

_________________
Building a single address space Microkernel, as used in embedded applications, for the desktop... Download latest build bootable Disk Image: https://github.com/h5n1xp/CuriOS/blob/main/disk.img.zip


Top
 Profile  
 
 Post subject: Re: VESA without BIOS
PostPosted: Mon Oct 19, 2020 3:58 am 
Offline
Member
Member
User avatar

Joined: Fri Mar 01, 2019 3:50 pm
Posts: 38
Location: France
bloodline wrote:
I've spent days fighting with GRUB2, and getting nowhere... I think I'm going to have to bite the bullet, move into the21st century and get my kernel booting via EFI if I want graphics :roll:

With GRUB2, you can set an initial VESA video mode in two ways:
  • By setting `gfxpayload` to a known supported resolution (such as `800x600x32`) in your `grub.cfg` file; though I consider this more as a hack rather than a proper solution but it can still be used for early kernel development. Here is an example:
    Code:
    menuentry 'MyOS' {
      load_video
      set gfxpayload=800x600x32
      multiboot2 /path/to/kernel.elf
      boot arg_a arg_b...
    }

    Note that although you specified a given resolution, this doesn't mean the actual boot manager will always set the video mode to the requested resolution (especially if they're non-standard). You got to also check the presence of the `framebuffer-info` tag in the given taglist (see EFI i386 machine state with boot services enabled) to ensure that the boot loader did the actual work of setting a video mode in addition of receiving the actual framebuffer address & video mode properties.
  • By specifing a `framebuffer` tag to your Multiboot 2 compliant kernel header. Has the advantage of being handled by all Multiboot 2 compliant boot managers. Just like the first method, you will need to check the presence & the contents of the `framebuffer-info` tag to be sure that the boot manager has set the correct resolution


Top
 Profile  
 
 Post subject: Re: VESA without BIOS
PostPosted: Mon Oct 19, 2020 4:40 am 
Offline
Member
Member
User avatar

Joined: Tue Sep 15, 2020 8:07 am
Posts: 155
Location: London, UK
crosssans wrote:
bloodline wrote:
I've spent days fighting with GRUB2, and getting nowhere... I think I'm going to have to bite the bullet, move into the21st century and get my kernel booting via EFI if I want graphics :roll:

With GRUB2, you can set an initial VESA video mode in two ways:
  • By setting `gfxpayload` to a known supported resolution (such as `800x600x32`) in your `grub.cfg` file; though I consider this more as a hack rather than a proper solution but it can still be used for early kernel development. Here is an example:
    Code:
    menuentry 'MyOS' {
      load_video
      set gfxpayload=800x600x32
      multiboot2 /path/to/kernel.elf
      boot arg_a arg_b...
    }

    Note that although you specified a given resolution, this doesn't mean the actual boot manager will always set the video mode to the requested resolution (especially if they're non-standard). You got to also check the presence of the `framebuffer-info` tag in the given taglist (see EFI i386 machine state with boot services enabled) to ensure that the boot loader did the actual work of setting a video mode in addition of receiving the actual framebuffer address & video mode properties.
  • By specifing a `framebuffer` tag to your Multiboot 2 compliant kernel header. Has the advantage of being handled by all Multiboot 2 compliant boot managers. Just like the first method, you will need to check the presence & the contents of the `framebuffer-info` tag to be sure that the boot manager has set the correct resolution


Thanks for this, I am quite familiar with GRUB Legacy (used it around 15 to 20 years ago ), so that is what I have been using, but for some reason I can't get the version (0.92?) I'm using to set a frame buffer... I figured it's just too old, so I'm trying to install GRUB 2 but it keeps throwing me to the Rescue shell...

It's entirely my fault, I'm sure I'm getting the install parameters wrong, the grub documentation is abysmal...

_________________
Building a single address space Microkernel, as used in embedded applications, for the desktop... Download latest build bootable Disk Image: https://github.com/h5n1xp/CuriOS/blob/main/disk.img.zip


Top
 Profile  
 
 Post subject: Re: VESA without BIOS
PostPosted: Mon Oct 19, 2020 6:54 am 
Offline
Member
Member
User avatar

Joined: Tue Sep 15, 2020 8:07 am
Posts: 155
Location: London, UK
Ok, so it is my grub2 config that is at fault... I booted my with Debian image, and then at the grub command line I typed:
grub> multiboot (hd1,msdos1)/kernel.elf
grub>boot

And my framebuffer test pattern was displayed!!! Now I need to figure out how to get my grub2 config right... the Debian grub-mkconfig script just keeps wanting to set up linux :roll:

My Kernel disk image just keeps failing with:
error: no such device: blah blah blah blah some random uuid

-EDIT- Ok... got there in the end... I now have it booting to a 800x600x16 display... time to write a proper gfx library!

_________________
Building a single address space Microkernel, as used in embedded applications, for the desktop... Download latest build bootable Disk Image: https://github.com/h5n1xp/CuriOS/blob/main/disk.img.zip


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: foliagecanine and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group