Skip to contentSkip to conversation

please explain to me why video/bios shadowing must be disabled to use graphics...

DISCUSSION Stas Sergeev 2 participants 2 messages Sep 24, 2002

lore
Share & tools
lore
#0 lore raw

Hello.

Quoted 8 lines · Bart Oldeman
Quoted 5 lines
Quoted 1 line

c000:0003

Where does it do that? I have found only
init_vga_card(), but that doesn't seem to be
the place. Also I searched the +g log for
c000:0003 and found nothing...

src/base/bios/bios.S, line 507, F800:4200.
init_vga_card() pushes f800:4200 on the stack as cs:ip, so that is what DOSEMU gets to execute in the next vm86().

Which means that I've found the proper place not even realising it:)
Now I also tried to nop out the hardcoded call directly in bios.S - same effect - no graphics modes, no even any other text modes, terminal chars here etc. Only the progs that are setting modes directly via ports are still working. Doing the reset call from within DOS brings everything back in a sane state.
Just wondering, why this reset is needed so badly?

Quoted 5 lines
Quoted 4 lines
Quoted 2 lines

Some people reported black screens, or even machines hanging which happens when the VBIOS init routine is called.

Of course, that was me:) But does the problem still exist after 1.1.3.1?

Maybe, maybe not?

Hmm, my point was that having only the VGA regs in hands, it is not possible to lock up the entire system. Or is it? But then it would be possible to lock also NT, isn't it?

Quoted 2 lines

It wasn't clear to me whether they used terminal mode or not. Probably missed something :(

Well, at least the vbios init was not passed, hence the term chars.

Quoted 3 lines
Quoted 2 lines

list:( That is why, I think, XFree 3.3.6 or 4.1 are not able to set any VESA modes, but not the 4.2, which can!

using VBE 3.0?

What advantages of VBE 3 are you suspecting? Any chances to find this out without looking into an XFree sources? Oh well, I just have to look there and find out all the answers myself, but it is a big pain to download the entire XFree sources...
Btw, I also played with LRMI package. There is a program to set the VESA modes. It does iopl(3) and then int10 in vm86(). Locks up as well...

#1 lore raw
Quoted 3 lines · Stas Sergeev

Doing the reset call from within DOS brings everything back in a sane state.
Just wondering, why this reset is needed so badly?

Just a very rough guess: proper initialization of certain BIOS variables in the range 0x400-0x4ff (0040:0000-0040:00ff) ? Try to see what changes during the init.

Quoted 3 lines

Hmm, my point was that having only the VGA regs in hands, it is not possible to lock up the entire system. Or is it?

some video cards can be completely manipulated using only VGA ports; for instance on the SiS the extended registers are 0x3c4, al=5 and up IIRC. You need to unlock those extended registers, but for that you only need access to 0x3c4 and 0x3c5, i.e. standard VGA ports.

DOSEMU, because it opens those ports in the "fast" mode, does not check whether your DOS prog or BIOS tries to write "5" to port 3c4 and then the appropriate unlock byte to port 3c5.

Now I'm not sure about locking up, but there's certainly a lot you can do to the graphics card.

Quoted 2 lines

But then it would be possible
to lock also NT, isn't it?

I have no idea what NT does. I don't know how it opens ports ("slow" or "fast"). Try [email protected] - he should have access to the source code, I don't.

Bart