OSDev.org

The Place to Start for Operating System Developers
It is currently Sun May 09, 2021 9:03 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: BIOS-VGA
PostPosted: Fri Apr 30, 2021 9:55 am 
Offline

Joined: Fri Apr 30, 2021 9:38 am
Posts: 1
My question is the following, could I modify an Award BIOS, so that the character output was different, for example the characters of another color?

Explain, I'm an OpenBSD user, I'm a bit frustrated that wscons only supports ANSI colors.

I have been reading good articles on this website, such as writing directly to the VGA memory address (0xb8000) with a few simple instructions and being in ring0, I could check the effectiveness.

Well, my bios boot when it executes all the character outputs does it send them to the VGA address?

I think I can understand. I have a Binary my bios Award, I was able to change simple things such as the logo.

Could you disassemble the binary and modify the character outputs? Yes, it works that way.

Where can I start?

Thanks.


Top
 Profile  
 
 Post subject: Re: BIOS-VGA
PostPosted: Mon May 03, 2021 10:14 pm 
Offline
Member
Member

Joined: Wed Aug 30, 2017 8:24 am
Posts: 965
Character colors are defined by the graphics card. The BIOS merely writes them into the memory area reserved for VGA, but it is the graphics card that interprets the bytes there and sends the signals to the monitor. If you wanted those bytes to be interpreted differently, you would have to change the way the graphics card works. Either by creating a new video BIOS or by just changing its settings. But that will require you to study your graphics card's documentation. Good luck!

These days, most people would just switch the graphics card to graphics mode and draw glyphs into the frame buffer. And then you can have any color you want. I also don't know what OpenBSD and BIOS have to do with any of this. BIOS is only needed to write characters in real mode, and OpenBSD is not using it for that if the developers have any sense.

_________________
Thou hast outraged, not insulted me, sir; but for that I ask thee not to beware of Starbuck; thou wouldst but laugh; but let Ahab beware of Ahab; beware of thyself, old man.


Top
 Profile  
 
 Post subject: Re: BIOS-VGA
PostPosted: Tue May 04, 2021 6:26 am 
Offline
Member
Member
User avatar

Joined: Thu Oct 13, 2016 4:55 pm
Posts: 1479
You could simply modify the VGA DAC registers to use a different palette, simple as that. Palette works with text mode just as well as with 16 / 256 color graphics modes.

Otherwise yes, you can modify the VGA BIOS ROM and replace the default colors (vgatables.h line 532). The bochs source has the bios source too, you can modify that and recompile the vgabios.rom image...

nullplan wrote:
These days, most people would just switch the graphics card to graphics mode and draw glyphs into the frame buffer.
...but yes, this would be my suggestion too. With UEFI there's no text mode, only graphics mode, meaning on modern machines this is the only option.

Cheers,
bzt


Top
 Profile  
 
 Post subject: Re: BIOS-VGA
PostPosted: Wed May 05, 2021 5:16 pm 
Offline
Member
Member

Joined: Sun Aug 23, 2020 4:35 pm
Posts: 130
You most likely could figure out a way to decompile (or at least jump out to some custom code and then jump back into) the AwardBIOS and modify it in order to change the VGA color palette. It would probably take a while, but it's most likely possible.
However, it has a much higher chance at bricking your computer (unless you've got something like dual-BIOS).
Also, when you're writing code for a BIOS, you've got to be SUPER careful about vendor-specific stuff, which things have been initialized yet, and so on.

In any case, it is probably easier to either
A) Modify the OpenBSD kernel that you are using to change the color palette on boot-up or
B) Create an intermediate loader that runs prior to either BIOSBOOT (the OpenBSD bootloader) or OpenBSD, changes the color palette, then loads BIOSBOOT/OpenBSD

_________________
My OS: TritiumOS
https://github.com/foliagecanine/tritium-os
void warranty(laptop_t laptop) { if (laptop.broken) return laptop; }
I don't get it: Why's the warranty void?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 4 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