VOGONS


Reply 20 of 27, by igully

User metadata
Rank Member
Rank
Member
zyzzle wrote on Yesterday, 09:59:

Very useful utility. I appreciate it. Two quick questions:
Do the /S and /B options work on all ACPI systems? How does /S "stop" the realtime clock?

Is it possible to add an option that resets the video card using its BIOS calls? There's a small DOS utility in the AdvanceMAME project called RESET.EXE which can perform this video BIOS reset (to 80x25 and default 9x16 VGA font stored in the vBIOS) and also can also disable the video signal (and re-enable it).

ACPI is not used in SANE. Instead it uses the older APM (Advanced Power Management) standard.
All ACPI implementations I have personally seen so far, have a backwards APM legacy compatibility mode. ACPI was not designed for DOS, it was mostly to deal with modern hardware and newer OSes that handle for example, multiple CPUs, which DOS does not even know about.

The RTC clock stop is possible on some of the Dallas Semiconductors chips. The code and details are available here:
Conserving Dallas RTC chips

Could you please post the DOS AdvancedMAME tool you mention along with any of its documentation? Or a link to it?
Thanks

Reply 21 of 27, by zyzzle

User metadata
Rank Member
Rank
Member
igully wrote on Yesterday, 16:33:

Could you please post the DOS AdvancedMAME tool you mention along with any of its documentation? Or a link to it?
Thanks

Certainly. The small DOS program is called AdvanceVideo and is part of the AdvanceCAB project which is part of the AdvanceMAME project. The AdvanceCAB program may be downloaded at Zophar's Domain:
https://www.zophar.net/utilities/mameutil/advancecab.html

But, I've attached here a .zip of the relevant small 3k DOS program video.exe, its documentation, and source code. The same package also includes an OFF.COM program which resets the PC using APM functions. The unique part of Video.exe is that its /R option can "reset BIOS functions" and that seems 100% effective at resetting not only the 80x25 VGA text mode, but also the normal brightness and gamma settings to the display.

Reply 22 of 27, by igully

User metadata
Rank Member
Rank
Member

Thank you again.

I will look into it, and provide some testing utility for you to run to see if it produces the desired effect.
The code resets the VGA controller using ports. I just want to make sure I do it without causing undesired effects.

Reply 23 of 27, by igully

User metadata
Rank Member
Rank
Member

@zyzzle
Find attached SANE v2.14

This is a test only version that when run it will attempt to reset the video controller hardware using two different methods, before any other video related task. Otherwise, functionality stays the same. Just run SANE and please report if it produces the desired effect under your specific hardware.

Note:
I chose not to follow the code provided by the video.exe program as it was assuming too much of the underlying hardware. And PCs are just a hack on top of another that hack to extend their functionality and "just make them work", so you can never trust them 100%. The downside is that there is a chance that the functionality expected from this video reset is not achieved. I have tested it on a wide range of systems and it has not generated any "unwanted" side-effects. So please report back.

Last edited by igully on 2026-02-24, 17:06. Edited 1 time in total.

Reply 24 of 27, by aVd

User metadata
Rank Newbie
Rank
Newbie

Hi, Ignacio,
Thanks for your very handy many things in one DOS tool! I have a suggestion about the new video reset option. Why don't you implement the @zyzzle's function with different command line switch while keeping your original /X and /Z reset functions?

DOS fan

Reply 25 of 27, by igully

User metadata
Rank Member
Rank
Member
aVd wrote on Today, 07:56:

Hi, Ignacio,
Thanks for your very handy many things in one DOS tool! I have a suggestion about the new video reset option. Why don't you implement the @zyzzle's function with different command line switch while keeping your original /X and /Z reset functions?

Hi aVd,

First I need feedback if the code works or not for the designed purpose. That is the expected goal of test version 2.14. It is not a release for general consumption. Let´s not get ahead of results, yet.

I just pushed this new code into SANE instead of building a totally new infrastructure as it was quicker. Final form will most likely take shape differently.

Thank you for your feedback, it will be considered when the time comes (hopefully soon enough!).

Reply 26 of 27, by zyzzle

User metadata
Rank Member
Rank
Member

I just tested your 2.14 test-only version, and it behaves exactly as the previous version, that is, it does not restore the brightness of the DOS text font, nor apparently call the BIOS "reset" routine by restoring the default 9x16 text font.

My case is rather interesting. Some (badly behaved) DOS programs do not restore the brightness or gamma correctly upon exiting back to the DOS prompt. If you want examples, there is a DOS graphics performance program called PERF.EXE which tests the graphics performance of the system by means of a 640x480 benchmark. Another program is the recently-released DOS version of the Diablo game. It does the same thing. So does the program FastDOOM. They leave the gamma setting much too dark (something like 1.0 when it should be 2.2); this persists when other text-mode programs and graphics programs are run. In order to restore the brightness of the screen, I must either reboot the system, or execute that video.exe program (which I had renamed RESET.EXE decades ago) with its /R option in order to do so. This is the only program / utility that I can find which does that properly. For comparison, mode co80 and / or mode co40 and other display utilities also do not restore the proper brightness. This behavior persists across multiple bare-metal DOS systems, so it isn't just a single system / instance. I have at least 10 laptops with Intel onboard graphics vBIOSes which exhibit this behavior...

So I guess what I'm asking for is perhaps an impossible thing. Reset the gamma to the default BIOS value. I think 2.20 but could be mistaken.

Reply 27 of 27, by igully

User metadata
Rank Member
Rank
Member

@zyzzle

Thank you.
Please retry this new attachment. It is essentially a redux 12 byte .COM version of your VIDEO.EXE /R with added salt and pepper. So it should work in theory despite it is directly jumping to the video bios startup routine, which is ill-adviced.