VOGONS


Reply 20 of 42, by igully

User metadata
Rank Member
Rank
Member
zyzzle wrote on 2026-02-23, 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 42, by zyzzle

User metadata
Rank Member
Rank
Member
igully wrote on 2026-02-23, 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 42, 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 42, 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 42, 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 :: artificial "intelligence" - not a fan... not a fan at all

Reply 25 of 42, by igully

User metadata
Rank Member
Rank
Member
aVd wrote on 2026-02-24, 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 42, 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 42, 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.

Last edited by igully on 2026-02-26, 03:39. Edited 1 time in total.

Reply 28 of 42, by zyzzle

User metadata
Rank Member
Rank
Member
igully wrote on 2026-02-24, 17:06:

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.

Well, the mystery deepens. I tried your elegant 12-byte .com file on my laptops, and it re-boots the system on all of them. It pauses for a moment, clears the screen, then reboots. No DOS prompt. Strange, indeed. I understand why you say directly jumping to the video BIOS startup routine is a bad idea. All the same, I wonder what the video.exe file does "differently" so as to not have the system re-boot. It's a really strange and obscure problem.

NB: The "brightness" issue I described above is definitely a gamma issue, as I can use a screen-capture utility such as Screen Thief and capture a DOS text screen as a .GIF file and its proper brightness is written to the bitmapped file, even when I've exited one of the buggy programs mentioned above. Although the .GIF appears dark on the screen, upon re-boot, the file is indeed proper brightness. So, the buggy programs reducing gamma is not a "cooked-in" feature, but merely a cosmetic one. But, it's universal and "permanent" until I either execute the video.exe /R or reboot (cold reboot).

Reply 29 of 42, by igully

User metadata
Rank Member
Rank
Member

@zyzzle

Thank you again for your patience and valuable feedback.

Warning: attached you will find experimental test version of SANE.

Added some cushioning and VGA detection which will hopefully deliver a "safer" route to the 3 new VGA only options I have implemented:

- /V Performs a video card BIOS re-initialization which is useful for refreshing the character set and also defaults gamma values.
If no VGA card is being used, a suitable error message will be displayed, and this operation will be aborted, quitting the program.
- /D Disables the video signal output (VGA video cards only).
- /E Re-enables the video signal output (VGA video cards only).

Reworked the code (again!) thinking on future extensibility. Added a second page of built-in text help with more available options.

Please give it a test, and report back on these 3 new options.

I have personally successfully tested all 3 options working exactly as they should in:

DOSes used:
MS-DOS 6.22
PC-DOS 7.1
Enhanced DR-DOS (latest build from 2025)

Physical video cards involved in these tests:
Generic noname - MDA
Generic noname - CGA
IBM - EGA
S3 ViRGE DX - VGA
Diamond Stealth 64 - VGA
S3 Trio3D - VGA
ATI VGA Wonder XL - VGA

Virtualization and/or emulation systems with a variety of configurations:
VirtualBox
MartyPC
8086tiny

Last edited by igully on 2026-02-27, 15:16. Edited 1 time in total.

Reply 30 of 42, by zyzzle

User metadata
Rank Member
Rank
Member

Thank you very much. Outstanding work.

Your new /V option works exactly as the /R option of video.exe. Original BIOS font restored and proper gamma restored. System is stable, no crashes or reboots.

The /E and /D options disable enable and disable the display. So, I can now discard the 25-year-old video.exe.

For reference, my tested systems all are running MS-DOS 7.1 and Intel HD onboard VGA graphics with VESA 2/ VBE3 support using shared system memory. They're VGA compatible, of course.

A curious question: Is "resetting" the BIOS an all-or-none feature? That is, is it possible to reset just the gamma brightness and not restore the original BIOS font? Or vice-versa.

Reply 31 of 42, by Disruptor

User metadata
Rank Oldbie
Rank
Oldbie
igully wrote on 2026-02-23, 16:33:
zyzzle wrote on 2026-02-23, 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" […]
Show full quote

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?
...
The RTC clock stop is possible on some of the Dallas Semiconductors chips. The code and details are available here:
Conserving Dallas RTC chips

For all enhancements you add, like BIOS calls, please ensure that the stop clock function should be called very late in your code to avoid a possible re-activation of the clock -
even when we know that font restauration and stop clock together have no sense.

Reply 32 of 42, by NeoG_

User metadata
Rank Member
Rank
Member

The tool works well on my SS7 system and I have integrated it into my DOS shortcuts, the only gripe I have is that it's too fast and I don't really get to enjoy the shutdown experience 😀

98/DOS Rig: BabyAT AladdinV, K6-2+/550, V3 2000, 128MB PC100, 20GB HDD, 128GB SD2IDE, SB Live!, SB16-SCSI, PicoGUS, WP32 McCake, iNFRA CD, ZIP100
XP Rig: Lian Li PC-10 ATX, Gigabyte X38-DQ6, Core2Duo E6850, ATi HD5870, 2GB DDR2, 2TB HDD, X-Fi XtremeGamer

Reply 33 of 42, by digger

User metadata
Rank Oldbie
Rank
Oldbie

First of all, thanks for working on this and sharing this with the world!

There is already a an open source SANE project, though: "Scanner Access Now Easy". It's been around for decades, and it's meant to be the Linux/Unix counterpart of the TWAIN standard for scanners.

I know it's a lot to ask to change a project's name, but please be aware of the potential confusion. Thanks.

Reply 34 of 42, by igully

User metadata
Rank Member
Rank
Member
zyzzle wrote on Yesterday, 04:16:
Thank you very much. Outstanding work. […]
Show full quote

Thank you very much. Outstanding work.

Your new /V option works exactly as the /R option of video.exe. Original BIOS font restored and proper gamma restored. System is stable, no crashes or reboots.

The /E and /D options disable enable and disable the display. So, I can now discard the 25-year-old video.exe.

For reference, my tested systems all are running MS-DOS 7.1 and Intel HD onboard VGA graphics with VESA 2/ VBE3 support using shared system memory. They're VGA compatible, of course.

A curious question: Is "resetting" the BIOS an all-or-none feature? That is, is it possible to reset just the gamma brightness and not restore the original BIOS font? Or vice-versa.

Thank you very much. I am very pleased that it now works for you.

Regarding your question:
It is not easy to dissociate the gamma settings and built-in font from the VGA bios, as there is no standard or agreement on this. Every video manufacturer did (and still do) whatever they felt best in their designs regarding their roms. However, there are various workarounds to achieve the goal you are seeking:

1. There are several DOS font extraction programs which create small enough executables that load them. The last two years I have seen at least two new font editing programs for DOS which seems very feature rich. chances are they might do the trick: Fontraption and Fontana are their names (a Google search should provide you their locations).

2. Since your cards support VESA, in theory, one could take advantage of that, read the gamma values at some point (for example, after a clean boot) and record them, to later reuse them, again, using VESA to write them back.

3. I am attaching DIMMER 1.05 which may help you solve this issue. It is an old program I modified long ago to suit my needs. It is a resident (TSR) program that occupies less than 2KB of memory and adjust screen brightness on VGA. Just run it, it has a built-in help that you can query with /? I probably have the assembler source code somewhere if you need it, but will have to look for it, because my backup is currently a messy unindexed thing.

Thank you again!

Reply 35 of 42, by igully

User metadata
Rank Member
Rank
Member
Disruptor wrote on Yesterday, 07:39:
igully wrote on 2026-02-23, 16:33:
zyzzle wrote on 2026-02-23, 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" […]
Show full quote

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?
...
The RTC clock stop is possible on some of the Dallas Semiconductors chips. The code and details are available here:
Conserving Dallas RTC chips

For all enhancements you add, like BIOS calls, please ensure that the stop clock function should be called very late in your code to avoid a possible re-activation of the clock -
even when we know that font restauration and stop clock together have no sense.

This is valuable information. I have included it in the current documentation of SANE so that users are aware of this precaution.
Thank you very much.

Reply 36 of 42, by igully

User metadata
Rank Member
Rank
Member
NeoG_ wrote on Yesterday, 07:43:

The tool works well on my SS7 system and I have integrated it into my DOS shortcuts, the only gripe I have is that it's too fast and I don't really get to enjoy the shutdown experience 😀

Well, I remember back in the 90's loving a Solaris server shutting down in a verbose manner, broadcasting its intentions to all stations and terminals it was connected to. And finally leaving you with its PROM interface.

Thank you for the report.

Reply 37 of 42, by igully

User metadata
Rank Member
Rank
Member
digger wrote on Yesterday, 09:20:

First of all, thanks for working on this and sharing this with the world!

There is already a an open source SANE project, though: "Scanner Access Now Easy". It's been around for decades, and it's meant to be the Linux/Unix counterpart of the TWAIN standard for scanners.

I know it's a lot to ask to change a project's name, but please be aware of the potential confusion. Thanks.

You are welcome.

I have used Linux for decades and I never knew of that scanner project up until now. My last scanner interaction was on early 2000's with an Amiga.

I will be aware of the eventual confusion, and drive lost Linux users to wherever this project´s main site is located.

SANE is a rather common English word, and is prone to be used in many products, not only software. I chose it because it was short, easy to type blinded on a corrupted screen, and does have a conceptual relation users could associate quickly as to placing a DOS system in a SANE mode.

I am not going to change its name because it serves its purposes and is kept DOS only. If I ever decide to port this program, I will make sure I change the name, but honestly, I don´t see any port happening.

Reply 38 of 42, by igully

User metadata
Rank Member
Rank
Member

I have just updated SANE to version 2.17 which is available as attachment on the first post of this thread.

Changes since last release:
- Solidified the findings on previous test version & VGA experiments.
- Added 3 new VGA video card options:
- /V Performs a video card BIOS re-initialization which is useful for refreshing the character set and also defaults gamma values.
- Implemented /D that disables VGA video card signal output.
- Implemented /E that re-enables VGA video card signal output.
- Code clean up: eliminated legacy workarounds. Reshuffled some code which was lingering like a dead zombie.
- Extended the built-in help text
- Updated documentation.

Future ToDo list:
implement return codes (errorlevels) on failed and non-shutdown/reboot executed options. For user/external/batch reuse and abuse.

Reply 39 of 42, by Disruptor

User metadata
Rank Oldbie
Rank
Oldbie
igully wrote on Yesterday, 15:58:
Disruptor wrote on Yesterday, 07:39:
igully wrote on 2026-02-23, 16:33:

For all enhancements you add, like BIOS calls, please ensure that the stop clock function should be called very late in your code to avoid a possible re-activation of the clock -
even when we know that font restauration and stop clock together have no sense.

This is valuable information. I have included it in the current documentation of SANE so that users are aware of this precaution.
Thank you very much.

This request was NOT for the documentation. It was for you to modify the code 😀
I just have tested it on my K6-3 machine but there was no reaction.
However, I have seen that STOPRTC is one of your first steps in the code. But it should be one of that last ones, perhaps just before the APM/ACPI shutdown command.
However, It may also have to do that my QDL Titanium IB+ does not contain a Dallas 😀

I also have to add that it does not shutdown the motors of my IDE disks jet. (That system does not have any SCSI disks that could be shutdown too via ASPI command.)
I just got that because an AT power supply could not be shutdown by software 😀