It turns out that selecting at least one video modus causes, on return to
it, my XP desktop to go black, with only the mouse visible & working. Than after a few seconds the 'puter reboots.
Revised question:
How do I find all INT 10h, ah=00h video modi that wil actually work on my (XP) 'puter ? (My "is it a graphical mode?" has become secondary).
I've got a small program going thru all video-modi by looping AL from 80...
upto FF, calling INT 10, AH=00.
And I'm pretty sure there are few other graphics modi above mode 06 ...on > my (XP) 'puter ? (My "is it a graphical mode?" has become secondary).
How do I find out if a certain mode is graphics ?
Revised question:
How do I find all INT 10h, ah=00h video modi that wil actually work
Do you mean XT?
Or are you talking about running MSDOS apps under Windows XP?
but someone who does know the answer may not answer
because they are confused about the environment.
I've got a small program going thru all video-modi by looping AL from 80
upto FF, calling INT 10, AH=00.
The INT0x10_AH00 method isn't meant to be looped with all values,
so some may just lock up
while others could damage (old) monitors.
VESA support is found within:
details are also reported in RBIL 104f00,104f01,014f02
push 0x8400 ;buffer for returned data
push 0x8420 ;buffer for modelist
mov [cs:xxx+0x0c],eax ;current mode number
mov [cs:xxx+0x04],eax ;linear start address
VESA support is found within:
:-) You're talking about possible damage to ancient monitors (connected to EGA, MCGA or even older videocards), and than you're presenting a bit of
code thats ment for VESA ? :-p
details are also reported in RBIL 104f00,104f01,014f02
I've got Ralf Browns interrupt list (since forever) on my 'puter, so I'm
sure to take a peek.
And thanks for the code, I'm going to take a look at it.
<some time passes>
I see you used a few "magic numbers" :
push 0x8400 ;buffer for returned data
push 0x8420 ;buffer for modelist
mov [cs:xxx+0x0c],eax ;current mode number
mov [cs:xxx+0x04],eax ;linear start address
Also, for the "xxx+0x0c" one, why storing 4 bytes when the low two are
always zero ?
furthermore, int 0x10, AX=0x4F00, offset 0E..11 does seem to point to a list with video modi, but only from 0x100 and up.
Than when I use int 0x10, AX=0x4F01 on the range 0x00...0xFF it doesn't
think that there are any valid video modi below 0x30. And the ones it
thinks are valid all seem to be Graphics modi (bit 4 set in the first byte).
IOW, the above two calls do work, but not for any of the basic (old?) video modi. And those are the ones I'm pretty-much after.
Regardless of the above, stil thank you for posting it.welcome
I see you used a few "magic numbers" :
push 0x8400 ;buffer for returned data
push 0x8420 ;buffer for modelist
these are just free memory locations, you can use any other even I find my choice a good solution [at the end of user RAM space].
mov [cs:xxx+0x0c],eax ;current mode number
mov [cs:xxx+0x04],eax ;linear start address
I use them as part of instructions:
CS:xx02:
66 BA dd dd dd dd MOV EDX,immediate quad dd ;screen start address
that's because I prefer linear addressing in graphic modes
the graphic card's LFB (linear frame buffer) is usually above 3rd GB
you'll need either PM32 or UNREAL-mode like I do during boot-up to access that memory region.
only a few "old" modes can be used with VESA.
I use cx=0x0003 for classical text mode
and IIRC modes 0..7 may work similar
wolfgang,
I see you used a few "magic numbers" :
push 0x8400 ;buffer for returned data
push 0x8420 ;buffer for modelist
these are just free memory locations, you can use any other even I find my >> choice a good solution [at the end of user RAM space].
I'm sorry ? The segment address 0x8400 is almost smack in the middle of
the 1 M memory space DOS can address. It /might/ not be in use (yet!), but just writing data in memory not owned by the program is ... not good.
I used a bit of stack space instead.
mov [cs:xxx+0x0c],eax ;current mode number
mov [cs:xxx+0x04],eax ;linear start address
I use them as part of instructions:
CS:xx02:
66 BA dd dd dd dd MOV EDX,immediate quad dd ;screen start address
Ah, self-modifying code.
that's because I prefer linear addressing in graphic modes
the graphic card's LFB (linear frame buffer) is usually above 3rd GB
you'll need either PM32 or UNREAL-mode like I do during boot-up to access
that memory region.
I understand the need for the storage size, but have no idea why you put the video mode in the upper two bytes of that 4-byte storage space.
only a few "old" modes can be used with VESA.
I use cx=0x0003 for classical text mode
and IIRC modes 0..7 may work similar
:-) Thats pretty-much the problem : I have no idea which of those "old" mod are valid. When I use INT 0x10, AH=0x00 to check modi 0x08 thru 0x0C they seem to be accepted, but give rather odd text screen width and height (last value is supposed to be the character cell height):
0x08> 0x2 0x02
0x09> 42x43 0x15
0x0A> 17x29 0x08
0x0B> 0x64 0x00
0x0C> 13x16 0x10
I've got no idea how (by what) to weed those out yet.
But looking at where the VESA modi start, I think I may conclude that the "old" modi are limited to the 0x00....0x2F range. Thats at least something. :-)
I'm sorry ? The segment address 0x8400 is almost smack in the middle of
the 1 M memory space DOS can address. It /might/ not be in use (yet!),
but just writing data in memory not owned by the program is ... not good.
OK, the code is part of my OS, it owns all RAM except what BIOS uses.
then you could be on the safer side but I'd store the info somewhere
for later use.
0x08> 0x2 0x02
0x09> 42x43 0x15
0x0A> 17x29 0x08
0x0B> 0x64 0x00
0x0C> 13x16 0x10
I've got no idea how (by what) to weed those out yet.
I rare to never used any of the above,
Revised question:
How do I find all INT 10h, ah=00h video modi that wil actually work on my (XP) 'puter ? (My "is it a graphical mode?" has become secondary).
It turns out that INT 0x10, AH=0x1B, BX=0x0000 returns a record with the first six (three?) bytes containing a bit mask of valid video modi.
So, success !
Ehhrmm... Not so fast please.
It works on my current machine, but on another (also XPsp3) machine *none*
of the "valid" video-modi (using INT 0x10, AH=0x00) actually works : the puter locks up and can only be gotten outof it thru a power-cycle. :-((
No idea why, or how I could deal with it.
So, success !
supported only if INT10_1B (ax=0x1B00) returns 0x1B in AL
No idea why, or how I could deal with it.
depends on the graphic chip... modern stuff may work only with VESA.
have you tried cx==0x0013 ax==0x4f01 INT_0x10 ?
didn't work on my old PC
wolfgang,
So, success !
supported only if INT10_1B (ax=0x1B00) returns 0x1B in AL
:-) Yes, I checked that.
No idea why, or how I could deal with it.
depends on the graphic chip... modern stuff may work only with VESA.
That was my conclusion too.
have you tried cx==0x0013 ax==0x4f01 INT_0x10 ?
didn't work on my old PC
On the first machine (with the BIOS video modi working) it fails, on the other machine it succedes.
Question:
I tried to call INT 0x10, AX=0x4F02, CX=0x0100 on the second machine, but I have no idea what all goes into that es:di area, so I just cleared it. The machine locked up. :-(
Do you know where that info comes from ?
I could try to (pretty-much randomly) slap something together (from what I don't know), but as long as you're here ... :-)
I tried to call INT 0x10, AX=0x4F02, CX=0x0100 on the second machine, but
I
have no idea what all goes into that es:di area, so I just cleared it.
The
machine locked up. :-(
Do you know where that info comes from ?
RBIL tells on 104F02:
02h WORD horizontal sync start (in pixels)
04h WORD horizontal sync end (in pixels)
06h WORD total number of scan lines
08h WORD vertical sync start (in scan lines)
0Ah WORD vertical sync end (in scan lines)
0Ch BYTE flags (see #04084)...
0 enable double scanning
1 enable interlacing
2 horizontal sync polarity (0 positive, 1 negative)
3 vertical sync polarity (0 positive, 1 negative)
0Dh DWORD pixel clock, in Hz
11h WORD refresh rate, in 0.01 Hz units
mode 0100 is graphic 640*400,8bit (256 colors)
my OS rare alters CRTC values, so I have ES:DI as 0:0
I tried to call INT 0x10, AX=0x4F02, CX=0x0100 ...
I tried to call INT 0x10, AX=0x4F02, CX=0x0100 ...
try INT 0x10, AX=0x4F02, BX=0x0100
and ES:DI could need to be 0xFFFF:FFFF to ignore CRT setup.
I tried to call INT 0x10, AX=0x4F02, CX=0x0100 ...
try INT 0x10, AX=0x4F02, BX=0x0100
and ES:DI could need to be 0xFFFF:FFFF to ignore CRT setup.
Thanks for the suggestion.
I already tried doing that (and for other VESA modi too) with ES:DI set to zero or untouched. It didn't make a difference, the 'puter froze every
time. :-\
As both ways to set a video mode froze the puter I started to suspect the "OS" (drivers, other stuff installed on it). So, booted from an USB stick with DOS on it (taken from Win98. Yes, an old stick :-) ).
Surprise surprise, it had no problem with scanning thru the BIOS video modi (using INT 0x10, AX=0x00??), nor had it any problems with setting VESA mode 0x0100 (using INT 0x10, AX=0x4202, BX=0x0100, ES=DI=0) (though a DIR
outputs scrolling was /slow/. )
In short, I think I need to consider re-installing that 'puter, and at least check its response before and after I install the videocards drivers.
A question about the INT 0x10, AX=0x4F01 result though : When I look at the "mode attributes" (offset 0x00) I see that :
Bit 0 is about "mode supported by present hardware configuration". As such I've ignored any VESA modus where that bit was not set. Is that what I needed to do, or does that bit have another meaning ?
Bit 2 is about "BIOS output supported". I assume that means that when its set I can do an INT 0x10, AH=0Eh and expect the character to appear on the screen (same for plotting pixels using INT 0x10, AH=0x0C). Is that a correct assumption?
Bit 4 is set if its a graphic mode. I /thought/ I remembered graphics modi which do not support text output. Have you ever encountered such a mode and know how to check for them ?
In short, I think I need to consider re-installing that 'puter, and at
least
check its response before and after I install the videocards drivers.
YEAH, virtualization kills almost everything :)
And graphic driver software may be just there to support windoze&loonix.
INT_0x10 used direct from Video BIOS w/o detoured by hooks work best.
Bit 0 is about "mode supported by present hardware configuration". As
such
I've ignored any VESA modus where that bit was not set. Is that what I
needed to do, or does that bit have another meaning ?
yes.
and there are additional issues with monitors (I hate this EDID story)
Bit 2 is about "BIOS output supported". I assume that means that when
its
set I can do an INT 0x10, AH=0Eh and expect the character to appear on
the
screen (same for plotting pixels using INT 0x10, AH=0x0C). Is that a
correct
assumption?
yes,
but plotting pixels in text modes may not work.
and INT_10_0C is usually pretty slow, I use direct screen write instead.
Bit 4 is set if its a graphic mode. I /thought/ I remembered graphics
modi
which do not support text output. Have you ever encountered such a mode
and
know how to check for them ?
some graphic modes may support INT_10_0E for text-out, but I use my own
draw routines for it anyway.
I use my own fonts [16*8 12*8 8*8] for graphic modes,
and use some of my fonts for text modes too with:
---RBIL copy
INT 10 - VIDEO - Realtek RTVGA - SET USER GRAPHICS CHARACTERS
I once played around with my very own video-modes by using VGA-registers funny things like mixed text/graphic can be made but unfortunately work
only for one specific brand and crash on others.
Bit 0 is about "mode supported by present hardware configuration". Asyes.
such
I've ignored any VESA modus where that bit was not set. Is that what I
needed to do, or does that bit have another meaning ?
"yes", ignoring such a modus is what you should do, or "yes", it does have another meaning ? :-)
some graphic modes may support INT_10_0E for text-out, but I use my own
draw routines for it anyway.
I'm comfortable with starting with video modi which support text output, and wait with drawing text myself for a later date/project.
INT 10 - VIDEO - Realtek RTVGA - SET USER GRAPHICS CHARACTERS
try INT 0x10, AX=0x4F02, BX=0x0100
and ES:DI could need to be 0xFFFF:FFFF to ignore CRT setup.
wolfgang,
try INT 0x10, AX=0x4F02, BX=0x0100
and ES:DI could need to be 0xFFFF:FFFF to ignore CRT setup.
I just came across this webpage :
https://wiki.osdev.org/VESA_Video_Modes
Somewhere halfway down it says "Set the bit 11 of BX to instruct the BIOS to use the passed CRTCInfoBlock structure".
IOW, its not about what ES:DI itself contains which determines if the 'CRT setup' datablock is used.
Phew, I did set, as a test, a few VESA video modes (and expected it to crash), and couldn't figure out when that that "CRTC information block" was used (erased it with '-', which was unchanged on return).
I must say that VESA, or rather its support, is nasty. I have a 'puter
which doesn't have (VESA) BIOS support for drawing text and/or pixels on any modus, and I got another one which supports it on all of them. Not funny when you want to create a simple, portable DOS program.
By the way: I do not see, in RBIL, any INT 0x10 function to plot a 256+
color pixel. Did I overlook something ?
By the way: I do not see, in RBIL, any INT 0x10 function to plot a 256+
color pixel. Did I overlook something ?
isn't AL large enough ? :)
INT 10 - VIDEO - WRITE GRAPHICS PIXEL
AH = 0Ch
BH = page number
AL = pixel color
if bit 7 set, value is XOR'ed onto screen except in 256-color modes
By the way: I do not see, in RBIL, any INT 0x10 function to plot a 256+
color pixel. Did I overlook something ?
isn't AL large enough ? :)
Not to me it isn't - I want Moar!!! :-)
INT 10 - VIDEO - WRITE GRAPHICS PIXEL
AH = 0Ch
BH = page number
AL = pixel color
if bit 7 set, value is XOR'ed onto screen except in 256-color modes
One of my 'puters has got a number of 16 and 32 BPP VESA modi available (modes 0x20...0x22 are 32 BPP). It would be nice if I could actually use them.
I just tried to draw a (diagonal) line in a 32 BPP mode with AL=0xFF, but
all I get is (understandable) blue.
the drawing method for (odd) 15 and 16 bit pixels would be similar
to 16+16 color text-mode. [alternating Hi/Lo bytes]
[32 bit would need a set of four consecutive bytes]
but because pixel drawing with INT10 is awful slow, almost nobody
do Direct screen write to Video-Memory was the way to go since the begin.that's why they added (1977 ?) the ES-register to access 0xA0000...
But most VESA modes use LFB (Linear Frame Buffer) which is usually at 3rd
GB and need either PM32 or UNREAL to access it at all.
after I calculated equalized HUE values for a 256 color palette,
I arranged DAC RGB-values (stored as 32 bit even only 24 bit used)
to form a set of 64 gray plus 192 rainbow colors.
This let me show astonishing good images with only 8 bit/pixel.
wolfgang,
the drawing method for (odd) 15 and 16 bit pixels would be similar
to 16+16 color text-mode. [alternating Hi/Lo bytes]
[32 bit would need a set of four consecutive bytes]
Thats what I thought of too, but the diagonal (X=Y) line I did draw (for testing purposes) was, in 32 bpp mode, the same color everywhere. Which makes sense, but seems to mean that I can only touch byte 0 (blue), but not bytes 1,2 and 3.
but because pixel drawing with INT10 is awful slow, almost nobody
do Direct screen write to Video-Memory was the way to go since the
begin.that's why they added (1977 ?) the ES-register to access 0xA0000...
The ES registers existence is a direct result from wanting to do direct video-memory access ? Thats a new one to me. I always though it was a logical conclusion of the need for larger memory models (with 64K+ data segments).
But most VESA modes use LFB (Linear Frame Buffer) which is usually at 3rd
GB and need either PM32 or UNREAL to access it at all.
I know of that way to do it myself (and you mentioned it once or twice), but was hoping that BIOS support for a certain VESA video mode also meant that there would be a INT 10h method to plot such 256+ color pixels. You know, trying to do the minimum ammount of work to get the largest result. :-)
after I calculated equalized HUE values for a 256 color palette,
I arranged DAC RGB-values (stored as 32 bit even only 24 bit used)
to form a set of 64 gray plus 192 rainbow colors.
Yep, I've found and used such an array of DAC colors too. Was a bit
surprised to see multiple black colors at the end of the list. Assumed it was for private use..
This let me show astonishing good images with only 8 bit/pixel.
:-) I think that 8 bpp will do fine for me too. I'm currently just trying to inventorize what all I can use (and how). You know, the 'information gathering' phase.
To be honest, being able to use a higher resolution (than 320x200) is more important to me than being able to use 16 or 32 bit colors.
Thanks for the info.
? have you tried an iterated sequence of:
AL=00 INT10
AL=ff INT10
AL=00 INT10
Al=80 INT10
exact, video-RAM were often apart add-ons in the range 8000..BFFF
minimum work would be after you decided to write direct to screen :)
Ah, I didn't think of that one. Alas, I'm getting a light-blue line.
exact, video-RAM were often apart add-ons in the range 8000..BFFF
True. But the video-bios code could just point DS to that (64KByte) area
and than do its thing. AFAICS no ES needed.
minimum work would be after you decided to write direct to screen :)
The last time I looked VESA doesn't /need/ to support linear mode, which would mean I would be forced to support bank-switched mode too ... with its granularity and whole shebang. Full support for every possibility would
need quite a bit of code. :-(
how about:[snip]
Ah, I didn't think of that one. Alas, I'm getting a light-blue line.
light blue coz last write was 80.
True. But the video-bios code could just point DS to that (64KByte) area
and than do its thing. AFAICS no ES needed.
it works as DS->ES because Video ROM cannot use CS as data base and stack space was kept pretty small back then.
look at: MOVS LODS STOS and see which segment registers they imply.
yes, we don't need to support every possible mode,
banking graphic is a PITA and slows down everything.
8 bit modes are available with 32 or 64KB at A0000/A8000
32 bit modes usually use LFB. I use all my graphic modes with LFB.
But yes, it would give an easy (as long as its supported :-) ) extra 8bpp 640x480 and 800x600 modi (1024x768 would already be too big). I didn't
think of that.
it works as DS->ES because Video ROM cannot use CS as data base and stack??? I don't get that "because" reasoning, sorry.
space was kept pretty small back then.
I think you misunderstood me : I tried to imagine an ES-less processor and see if that would make it impossible for a video-BIOS to function. I don't think so, as its (thanwhile) video-memory space was just 64 KByte.
And than I have to take the "added" in the above as "initially designed", as it has been part of the x86 from the very beginning.
Than again, it might be similar to where the term "bug" has been said to origionate from (a literal bug stuck in one of the contacts of a thenwhile relays-driven computer causing its results to be wrong)
yes, we don't need to support every possible mode,
While that might be a quite logical choice (covering most of the current cases), to me it means that a VESA using program might not run on every VESA offering video-card.
... and as I'm in the "discovery phase" ...
banking graphic is a PITA and slows down everything.
Tell me about it ... :-(
It was the reason I, years ago, stopped trying to use VESA - that and the "video-modi numbers mean nothing, you have to search if your video-cards
VESA supports a certain resolution and color-depth" approach.
VESA has been designed by a commission (with little eye to practical application), and it shows. :-\
8 bit modes are available with 32 or 64KB at A0000/A8000
When checking the different possible VESA video-modi (0x4F01) I see an
0xA000 value at the "start segment of window A" offset (0x08) - but its description says "0000h if not supported". No idea who/what should support it (and when!) though (RBIL doesn't say). My /guess/ is that its related to the "bank switching" capability, but who knows ...
But yes, it would give an easy (as long as its supported :-) ) extra 8bpp 640x480 and 800x600 modi (1024x768 would already be too big). I didn't think of that.
And funny, the "physical address of linear video buffer" value (at offset 0x28) doesn't mention an "if (not) supported" clause (in RBIL).
32 bit modes usually use LFB. I use all my graphic modes with LFB.
About that (LFB), I can imagine that under DOS writing/reading that video-memory space won't be a problem (no GDT problems).
I could imagine
its a bit different when I try to do the same under a Windows "command console" (XPsp3). Do you have any insights to that ?
are you sure to set a 32 bit mode ?
when I draw a pixel to screen in 32 bit mode I can be:
MOV [ES: r/m],RAX
or just alter individual bytes.
VBIOS resides in a ROM and it would need two apart DS for moving
data from user space to video RAM :)
yes, 64 KB. this spans a whole segment,
so NO, DS cannot be shared between video RAM and user data.
OK, I said added. Added to the design of 8086.
While that might be a quite logical choice (covering most of the current
cases), to me it means that a VESA using program might not run on every
VESA offering video-card.
that's why there is the INT10_4F_00.
an OS has to check for available graphic modes which fit the monitor.
I'd forget about these A and B windows.
(2*64K isn't enough, 1024*768,256 needs 12*64KB)
from my KESYS docs (my OS ignore all that's not mentioned here):
bit 7 LINEAR mode supported (capital if set)
bit 4 GRAPHIC/text
bit 0 HW supported
dword[es:di+0x28] FLAT pointer start address of LFB
yes as long it's in 1st MB aka 0A0000 [320*200? but not 512*384].
no, you need GDT if you want UNREAL mode.
Just ask yourself : could a 8086-era PC output text to the screen using INT 0x10 calls ? If so, it didn't need a block move from user to video memory. Hence, the existence of the ES register is unlikely to have been dictated by it.
... and I'm sure that someone like you could come up with a way to switch
the DS register between a read (from user memory) and subsequent write (to video memory).
OK, I said added. Added to the design of 8086.I think I may assume that the processor was designed *before* the hardware
it was used on. And that includes the video card. If that is so you have a chronology problem. :-)
While that might be a quite logical choice (covering most of the current >>> cases), to me it means that a VESA using program might not run on every
VESA offering video-card.
that's why there is the INT10_4F_00.
an OS has to check for available graphic modes which fit the monitor.
Yes, and than you see that none of the VESA video-modi offered by your current 'puter matches what you wrote your program for*, which means that it can't, won't run.
* Write it for lineair memory usage and not having the desired resolution supporting it. Writing for bank-switched mode and not having the desired resolution supporting it. Writing for BIOS writes not having the desired resolution supporting it.
IOW, there seems to be no minimum "this will always work" support for it. Which forces you to write the program to support *all* methods, and have it select the appropriate method at runtime.
from my KESYS docs (my OS ignore all that's not mentioned here):Same here
bit 7 LINEAR mode supported (capital if set)
RBIL: 6 bank-switched mode *not* supported
Yeah, you /could/ get a mode with bit 6 set and bit 7 clear. Fun times. :-(
bit 4 GRAPHIC/textNo indication if a certain graphics mode supports text output ...
(I do not consider that to be a given).
bit 0 HW supportedI have *no* idea why this bit even exists. Why does int10_4F_01 return succes if the mode unusable for the video card ? It doesn't make any sense.
dword[es:di+0x28] FLAT pointer start address of LFBHere (on one 'puter) it returns a 0xF8000000 address for all VESA modi.
yes as long it's in 1st MB aka 0A0000 [320*200 ok but not 512*384].:-) In that case I will use a BIOS video mode, thankyouverymuch.
no, you need GDT if you want UNREAL mode.
I don't *want* it, but I need(?) something to be able to read-write in that lineair memory. Or can I just load EDI with whatever is the "physical address of linear video buffer" field and start writing ?
... and I'm sure that someone like you could come up with a way to switch
the DS register between a read (from user memory) and subsequent write
(to
video memory).
no way! this would make it awful slow aka unusable.
development of CPUs and graphic cards were/and still are independent.
we have now a standard with VESA, all these SVGA,XVGA.. became obsolete.
who writes graphic programs for only one resolution ...?
just look what all the games offer: available resolution options.
old age game developers had this problem too.
so they offered just 320*240 4 colors or mono.
RBIL: 6 bank-switched mode *not* supported
Yeah, you /could/ get a mode with bit 6 set and bit 7 clear. Fun times.
:-(
haven't seen any.
bit 4 GRAPHIC/textNo indication if a certain graphics mode supports text output ...
(I do not consider that to be a given).
yes, but you can use the (ugly) ROM font for your text draw.
bit 0 HW supportedI have *no* idea why this bit even exists. Why does int10_4F_01 return
succes if the mode unusable for the video card ? It doesn't make any
sense.
all of INT10 routines are part of the Video-Bios which is Hardware(ROM).
....I don't *want* it, but I need(?) something to be able to read-write in
that
lineair memory. Or can I just load EDI with whatever is the "physical
address of linear video buffer" field and start writing ?
no, you need to either enter PM or run UNREAL-mode.
If you lucky and run your DOS in an emulated environment it may already be in UNREAL mode.
IOW, from my POV that VESA standard is a bad one - due to lack of a "minimum requirements".
I don't care that a certain VESA video mode could run much faster with some nifty code. I *do* care that I cannot put *anything* on my screen when I choose an available VESA video mode.
who writes graphic programs for only one resolution ...?I guess you never met a webdesigner. :-)
just look what all the games offer: available resolution options.
Which ones ?
Those of the last decade (supported by Windows) or those of
the VESA era ?
And so do you, if I may take you on your word that, using VESA, you only support a shortlist - and only the linear memory method.
yes, but you can use the (ugly) ROM font for your text draw.bit 4 GRAPHIC/textNo indication if a certain graphics mode supports text output ...
(I do not consider that to be a given).
Thats the solution to the problem, not the problem itself
Pray tell, how do you know when to apply that solution ?
Or are you just ignoring BIOS text-output support for all the VESA
video modi and always draw your own text ?
Thats quite a waste of time, energy and code. :-|
bit 0 HW supportedI have *no* idea why this bit even exists. Why does int10_4F_01 return
succes if the mode unusable for the video card ? It doesn't make any
sense.
all of INT10 routines are part of the Video-Bios which is Hardware(ROM).Huh ? INT10 routines are at best firmware, otherwise software. In no way or shape will it ever be hardware.
... Hence, why return unusable?
Or, if you want the question differently (less laden), what is a video mode which does *not* have support by present hardware configuration used for ?
That's the information/confirmation I was looking for. Now all I have to
do is to figure out how to find/write some GDT changing code that will work in both environments. :-)
RBIL: 6 bank-switched mode *not* supported
Yeah, you /could/ get a mode with bit 6 set and bit 7 clear. Fun times. >>> :-(
haven't seen any.
Lucky you I guess.
IOW :
I could write a program for a 320x200 video mode which would work on two of them but not on the third.
I could write a program using a textmode which would work on two of them but not on the third.
I could write a program supporting (read: depending on) linear addressing, but that would not work for every video mode.
And I just noticed that each 'puter has several modi supporting the same resolution and color depth. No idea what that is good for.
Did I already mention that I think that VESA video modi are a nightmare ?
If not, than hereby. :-)
the OS should/could minimize user programmers requirements.
web folks use Java rely on OS given capabilities and don't talk direct to the graphic cards controller nor to the memory.....
all mainstream PC-games from last four decades.
pre-VESA games used SVGA/VGA options.
user can optional use the ROM font (one of 16 options)
yes, I ignore it because INT_10 isn't available in PM32.
yes, except text mode use int10_0E during boot-up.
Thats quite a waste of time, energy and code. :-|
took me lesser than you may think.
you can believe that ROM belong to Hardware!
... Hence, why return unusable?
Or, if you want the question differently (less laden), what is a video
mode
which does *not* have support by present hardware configuration used for
?
vendors may save time/money by only having one list for a whole family.
That's the information/confirmation I was looking for. Now all I have
to
do is to figure out how to find/write some GDT changing code that will
work in both environments. :-)
you want me to post such a trivial task ?
user can optional use the ROM font (one of 16 options)
You're not acknowledging the problem here : How does the programmer know
when that option /needs/ to be used ? Other than by eyeballing the screen and noticing that no text appears I mean.
I'm still trying to figure out if its worth my time to try to use VESA video modi in general. Having to switch to protected/unreal mode changes the playfield quite a bit. IIRC for starters you than can't run normal DOS programs (read: TSR's) anymore.
You only did 33% of the full work. No wonder it didn't take you that long. :-p
you can believe that ROM belong to Hardware!The ROM itself ? Yes. Its contents ? No.
... Hence, why return unusable?vendors may save time/money by only having one list for a whole family.
Please do tell me where that "HW support" bit comes from. If its static in the list than any entry with that bit being zero should not be there to
begin with. If its dynamically checked (against the actual member of that family) and its zero than the call itself could/should return a "failed" status (even if the result buffer is changed).
That's the information/confirmation I was looking for.
Now all I have to do is to figure out how to find/write
some GDT changing code that will work in both environments. :-)
you want me to post such a trivial task ?
The triviality of a task is always only discovered when looking from the solution back to the problem/question (referred to as 20-20 vision). When starting from the problem/question and not even having an idea in which way to look however ....
And by the way, the next time I'm going to modify a GDT will be the first one. :-)
But to make sure : such a GDT change works for both the DOS as well as a Windows command console environments ?
that's why I chose mode 3, it works on all PCs (it was/is BIOS standard)
I even use text mode 3 like it were LFB with 0xB8000 as start.
And I just noticed that each 'puter has several modi supporting the same
resolution and color depth. No idea what that is good for.
different memory models/timing.
Did I already mention that I think that VESA video modi are a nightmare ?
If not, than hereby. :-)
eat it or die :) there are no other options available anymore.
you could extend your rant to INT_10 as well: not ALL modes everywhere.
you may change your mind after you became familiar with VESA.
using LFB is fast and needs much lesser instructions than INT or else.
that's why I chose mode 3, it works on all PCs (it was/is BIOS standard)You do not even have to /chose/, as BIOS video mode 3 is what you automatically get.
... But thats not what I ment. I was talking about *VESA* video modes.
Like an 80x25x16 with an 8x8 character cell.
Redefine characters, and its as if you draw with (square!) tiles.
I even use text mode 3 like it were LFB with 0xB8000 as start.Thereby re-using what you already wrote. I would likely do the same.
And I just noticed that each 'puter has several modi supporting the same >>> resolution and color depth. No idea what that is good for.
different memory models/timing.So, even more differences that need to be supported. :-\
you could extend your rant to INT_10 as well: not ALL modes everywhere.I've never seen a 'puter which did not support BIOS video mode 3 and 13.
Also, although VESA shows (large!) differences between just the three 'puters, the BIOS video mode support is exactly the same for them - and none of the 'puters are of the last century.
you may change your mind after you became familiar with VESA.
I'm currently /trying/ to become familiar with them, but it doesn't quite want to work. Even just three 'puters show *way* to many differences for me to be comfortable with. And even if I would follow your lead and only support a (lineair address only) subset I could /still/ get into trouble.
using LFB is fast and needs much lesser instructions than INT or else.
Compatibility (as in "it works everywhere" - even just between the 'puters I've got here) is currently much more important to me than speed.
Doesn't mean I do not appreciate knowing quite a bit more about VESA than I did before this thread though. :-)
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (1 / 5) |
| Uptime: | 01:01:39 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
10 files (20,373K bytes) |
| Messages: | 264,187 |