Mixed Graphics and Text mode
Mixed Graphics and Text mode
I was just thinking about how best to implement this, the way the BIOS displays manufacturer logo etc while still in text-mode during POST etc.
a) Switch to graphics mode and use the std. text mode font data ?
b) Some sort of overlay mode?
c) remap the bios font like we used to in the old days (too limited as it eats up available chars and only allows a small area to be custom drawn and in 1 colour).
a) Switch to graphics mode and use the std. text mode font data ?
b) Some sort of overlay mode?
c) remap the bios font like we used to in the old days (too limited as it eats up available chars and only allows a small area to be custom drawn and in 1 colour).
- Firestryke31
- Member
- Posts: 550
- Joined: Sat Nov 29, 2008 1:07 pm
- Location: Throw a dart at central Texas
- Contact:
Re: Mixed Graphics and Text mode
I think that the most common 2 are 'a' and 'c' depending on the complexity of the logo.
If you go with 'c' the biggest trick is to try and do it in such a way that you have lots of areas with the same data (think tilemaps in games, as really that's all text mode is).
If you go with 'c' the biggest trick is to try and do it in such a way that you have lots of areas with the same data (think tilemaps in games, as really that's all text mode is).
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Mixed Graphics and Text mode
I like doing it with option A. Granted, it's easiest to do it in real mode (the BIOS handles all of it for you) but in any mode it comes out great.
Sadly the BIOS doesn't know how to draw fonts in a VBE 800x600 graphics mode. Or maybe it does, I just don't know how to make it work.
Sadly the BIOS doesn't know how to draw fonts in a VBE 800x600 graphics mode. Or maybe it does, I just don't know how to make it work.
Re: Mixed Graphics and Text mode
I've opted for A too for simplicity sake
I'm trying BIOS mode 10h.. seems the closest to 80x25 text mode but not identical.. what mode do you use ? this or a custom one via vga regs?
I'm trying BIOS mode 10h.. seems the closest to 80x25 text mode but not identical.. what mode do you use ? this or a custom one via vga regs?
- gzaloprgm
- Member
- Posts: 141
- Joined: Sun Sep 23, 2007 4:53 pm
- Location: Buenos Aires, Argentina
- Contact:
Re: Mixed Graphics and Text mode
You may check FREEDOS bootloader which does exactly this:
Cheers,
Gonzalo
Cheers,
Gonzalo
Visit https://gzalo.com : my web site with electronic circuits, articles, schematics, pcb, calculators, and other things related to electronics.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Mixed Graphics and Text mode
From what I've seen, text output via int 10h still works in graphics mode. So if you set a 640x400x4 mode, fill the top half with artwork, then you can just do anything after that and still pretend its text mode. (As long as you don't decide to access video memory directly)
At least, that's my first guess at what's going on...
At least, that's my first guess at what's going on...
Re: Mixed Graphics and Text mode
I was thinking 640x400x16.. and I can't see any reason why you couldn't access display mem directly at the same time as using the bios font write?
Once into pmode you could "copy" out the bios font and use a custom writer I guess too..
Once into pmode you could "copy" out the bios font and use a custom writer I guess too..
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Mixed Graphics and Text mode
Now what I want to know is why, using my code, when I switch to graphics mode and print using int 10h, the cursor is gone. And can it be put back?
Re: Mixed Graphics and Text mode
Hi,
Also, for all VBE modes (e.g. 800*600 graphics mode), support for the non-VBE/legacy character output functions is optional, so it's likely you won't be able to use the BIOS's insanely slow character output routines and you'll need to write your own fast routines instead. For standard VGA graphics modes (e.g. 640*480*16 graphics mode) the standard VGA BIOS (not VBE) does support the BIOS's insanely slow character output routines (but I'd still recommend writing your own fast routines instead)...
Cheers,
Brendan
In text modes the cursor is displayed by hardware (you tell the VGA hardware which row/column and the VGA hardware displays the cursor). In graphics modes there isn't any hardware cursor (excluding mouse pointers done by SVGA and later video cards), and you need to do the cursor yourself.Troy Martin wrote:Now what I want to know is why, using my code, when I switch to graphics mode and print using int 10h, the cursor is gone. And can it be put back?
Also, for all VBE modes (e.g. 800*600 graphics mode), support for the non-VBE/legacy character output functions is optional, so it's likely you won't be able to use the BIOS's insanely slow character output routines and you'll need to write your own fast routines instead. For standard VGA graphics modes (e.g. 640*480*16 graphics mode) the standard VGA BIOS (not VBE) does support the BIOS's insanely slow character output routines (but I'd still recommend writing your own fast routines instead)...
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Mixed Graphics and Text mode
So does that mean I basically have to draw an underscore at the cursor position?Brendan wrote:In text modes the cursor is displayed by hardware (you tell the VGA hardware which row/column and the VGA hardware displays the cursor). In graphics modes there isn't any hardware cursor (excluding mouse pointers done by SVGA and later video cards), and you need to do the cursor yourself.
Re: Mixed Graphics and Text mode
Hi,
Also note that for good software the cursor should only be visible when software is waiting for the user to type something, and for menu based systems it's better to highlight the currently selected menu item. In both these cases there shouldn't be any cursor.
Cheers,
Brendan
You'd need to draw your own underscore, or reverse the colours, or have a vertical bar, or something (it's up to you, but you're not limited to just an underscore).Troy Martin wrote:So does that mean I basically have to draw an underscore at the cursor position?
Also note that for good software the cursor should only be visible when software is waiting for the user to type something, and for menu based systems it's better to highlight the currently selected menu item. In both these cases there shouldn't be any cursor.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re: Mixed Graphics and Text mode
You can easy use, un-used fonts, like this:
- Attachments
-
- logo.png (785 Bytes) Viewed 3786 times
Re: Mixed Graphics and Text mode
True, but you're limited to two colours per 8x16 pixel block (ZX spectrum galore! :))Dex wrote:You can easy use, un-used fonts, like this:
JAL
Re: Mixed Graphics and Text mode
You can also fake text mode, by using high-res vesa, than mix text and image, like what linux does with its penguine logo.