Skip to content

VESA video modes #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
skyne98 opened this issue Dec 6, 2018 · 5 comments
Open

VESA video modes #37

skyne98 opened this issue Dec 6, 2018 · 5 comments

Comments

@skyne98
Copy link

skyne98 commented Dec 6, 2018

Hello there! I need to start by saying that this project is awesome and I strongly believe it will spark the creation of some very creative pieces of software!

Nevertheless, I think it would have being awesome to add support for choosing one of the available VESA modes. Right now, you have to do it in real-time mode, while bootloader switches the processor to go to 64-bits and therefore, if you need to work with it, then you need to somehow go back to 16-bits in the kernel (or 32-bits with emulation?) and do the setup. Making bootloader do it might be the best idea (as well as give it an option to automatically choose the highest option).

As far as I understand, it can be quite a challenge, considering you have to fit it into 16-bit processor mode memory (512 first bytes?), but as far as I know, it is rather doable.

I think that this implementation from Redox OS can serve as a good example.

Cheers, Alex!

@phil-opp
Copy link
Member

phil-opp commented Dec 6, 2018

Thank you!

I just added support for a small 320x200 vga frame buffer in #35. Support for VESA is definitely planned, I just don't have the time to work on it right now. Pull requests are welcome!

I think we can start simpler than the Redox solution and just use a fixed resolution instead of offering all possible resolutions to the user (we can still add that later if we want).

@skyne98
Copy link
Author

skyne98 commented Dec 6, 2018

I think that the best solution right now would be to automatically choose the best (the highest) resolution available. It seems to be a safe choice.

jabedude added a commit to jabedude/bootloader that referenced this issue Jun 22, 2019
@jabedude
Copy link

jabedude commented Jun 22, 2019

@phil-opp I started taking a crack at this and I would welcome any help. I added code to query the BIOS for VESA information, but it fails when running the bootloader+example-kernel in qemu. See below:
Screenshot_20190622_111215

Disregard, I made some progress.

jabedude added a commit to jabedude/bootloader that referenced this issue Jun 23, 2019
jabedude added a commit to jabedude/bootloader that referenced this issue Jun 24, 2019
jabedude added a commit to jabedude/bootloader that referenced this issue Jun 29, 2019
@just-chillin
Copy link

How do I enable this feature? I have some cute ascii art that my OS prints whenever there is a double fault, and it currently doesn't fit on the screen >.<

@phil-opp
Copy link
Member

@just-chillin You have to enable the vga_320x200 crate feature of the bootloader and change the framebuffer address to 0xa0000. Note that this will become much easier with the upcoming rewrite implemented in #130, but unfortunately it is not quite ready yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants