VOGONS


Reply 40 of 56, by igully

User metadata
Rank Member
Rank
Member
Disruptor wrote on 2026-02-26, 16:57:
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 th […]
Show full quote
igully wrote on 2026-02-26, 15:58:
Disruptor wrote on 2026-02-26, 07:39:

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 😀

Hi, the code should be fine. Text message order has improved a lot, but was not always chronologically precise, as it was an add-on, and some functions required not to be interrupted and so messaging happened after the the task was carried out. The code logic operates this way (from what I can recall, since I am not in front of my computer atm):

The first steps of the code generally speaking, are video stabilization, audio muting, cache flushing, floppy motors stopping (if you have floppies), and if you have vintage drives (these are pre IDE era (before 1990, mostly MFM, RLL and proprietary interfaces) then parking occurs. IDE drives were designed to overcome several old issues, including drive parking, with a built-in microcontroller and associated firmware that does the job automatically if it is needed. IDE drives were also more CPU dependent, but way cheaper than SCSI ever was.

To the meat of the matter, this is exactly as I coded the Dallas part:
At the time the Dallas RTC stop occurs, right afterwards, the APM shutdown is attempted (3 APM operations and the computer powers off, or only 1 if no APM). If APM is not present, then a text message is displayed to inform the user to shut down manually and a halt instructions is issued to stop the CPU. Since some emulators/virtual systems ignore the halt, I also placed, behind it, an infinite loop, which does the job. There is no clock manipulation after Dallas RTC stop. But of course, a user might create some workaround or do some funky stuff with a TSR, so it is important to let them know. Hence the documentation approach.

Reply 41 of 56, by Disruptor

User metadata
Rank Oldbie
Rank
Oldbie
igully wrote on 2026-02-26, 18:27:

Text message order has improved a lot, but was not always chronologically precise...

Ah 😀
Thank you.

Reply 42 of 56, by zyzzle

User metadata
Rank Oldbie
Rank
Oldbie
igully wrote on 2026-02-26, 15:56:

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).

Yes, in fact I already use one which slightly modifies and replaces the built-in VGA text font. It's a TSR which takes about 3kb (the size of the VGA 9x16 BIOS font is 4kb, but this TSR uniquely compresses it). This is called KeyRus, version 8.0:

https://archive.org/details/keyrus8b

That is why I asked if modifying brightness is possible without defaulting to the basic BIOS font. Resetting to it wipes out the TSR font. But, this is a small problem, and the fact the resetting restores brightness is more important.

I have never heard of Dimmer; thanks very much for mentioning it. I'll give it a try. As they say, "It's nice to have options" and thankfully we have a lot of options in DOS!

Reply 43 of 56, by igully

User metadata
Rank Member
Rank
Member

Summary of changes from version 2.17 to current 2.26:
- New option /K disables any video card output until a keyboard key is pressed.
- Added ERRORLEVEL output so that users may better integrate SANE within batch files, extending their possibilities (for more detailed information read the included document).
- Reworked and cleaned up more code: version 2.17 executable was 2,100 bytes long and v2.26 is now 2,022 bytes.

Find new version 2.27 attached to the first post of this thread.

Reply 44 of 56, by xtreger

User metadata
Rank Member
Rank
Member
igully wrote on 2026-03-23, 18:06:
Summary of changes from version 2.17 to current 2.26: - New option /K disables any video card output until a keyboard key is pre […]
Show full quote

Summary of changes from version 2.17 to current 2.26:
- New option /K disables any video card output until a keyboard key is pressed.
- Added ERRORLEVEL output so that users may better integrate SANE within batch files, extending their possibilities (for more detailed information read the included document).
- Reworked and cleaned up more code: version 2.17 executable was 2,100 bytes long and v2.26 is now 2,022 bytes.

Find new version 2.27 attached to the first post of this thread.

First of all thank you very much for this utility! Always good to see awesome DOS tools. I used this to try and shutdown my system. The motherboard is EX58 series from gigabyte. When I run SANE /Y, it shows a series of messages on flushing caches and resetting some stuff. But then it shows this:

No APM services were active to shut down this computer.
Please now power off this machine manually.
System halted!

Any idea why this kind of message could be appearing for my motherboard? Any way or fix I can use? Is an APM service something that's run in DOS as a driver/TSR?

Reply 45 of 56, by NeoG_

User metadata
Rank Oldbie
Rank
Oldbie
xtreger wrote on 2026-04-15, 22:07:
First of all thank you very much for this utility! Always good to see awesome DOS tools. I used this to try and shutdown my syst […]
Show full quote

First of all thank you very much for this utility! Always good to see awesome DOS tools. I used this to try and shutdown my system. The motherboard is EX58 series from gigabyte. When I run SANE /Y, it shows a series of messages on flushing caches and resetting some stuff. But then it shows this:

No APM services were active to shut down this computer.
Please now power off this machine manually.
System halted!

Any idea why this kind of message could be appearing for my motherboard? Any way or fix I can use? Is an APM service something that's run in DOS as a driver/TSR?

APM is the power management system provided by the mainboard, it's unclear how much past it's introduction that mainboards kept backwards compatibility with the standard from the early-mid 90s. It seems pretty universal but an X58 is quite a ways down the road. If the mainboard lacks APM backwards compatibility the software would need to be updated to use ACPI as a backup I would think.

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 46 of 56, by zyzzle

User metadata
Rank Oldbie
Rank
Oldbie

Actually I get the same message on a semi-modern I5 8250 Dell laptop. So, as with crippling DOS 16-bit video BIOS and other eliminations, it appears APM is completely gone on "modern" systems. The regular cold boot option works, but the "quick" reboot doesn't (it just reboots to my primary Windows SSD, not my DOS USB memory stick).

Reply 47 of 56, by igully

User metadata
Rank Member
Rank
Member

Thanks for all the reports, I will investigate further.

In any case be aware that recent motherboards are not designed to run DOS at all, and do not have a legacy BIOS interface, and this is essential to properly run DOS, as in itself, DOS is just a thin layer over the BIOS. There are workarounds, but they are not quite there yet.

In any case, I will do research on an ACPI DOS friendlier side of its API and see what I can do to mitigate these issues.

Thanks again.

Reply 48 of 56, by NeoG_

User metadata
Rank Oldbie
Rank
Oldbie
igully wrote on 2026-04-16, 09:17:

In any case be aware that recent motherboards are not designed to run DOS at all, and do not have a legacy BIOS interface, and this is essential to properly run DOS, as in itself, DOS is just a thin layer over the BIOS. There are workarounds, but they are not quite there yet.

Someone will always try and someone will always ask

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 49 of 56, by zyzzle

User metadata
Rank Oldbie
Rank
Oldbie

Yes, post 2020 systems are sadly UEFI only and will not boot DOS, but mine is a 2018 system with a BIOS and legacy mode. (It also has UEFI as well). Its BIOS and "legacy" code seems crippled and partially incompatible. But, it does work to run DOS bare metal. It just seems to lack APM and a proper "fast boot" option.

Reply 50 of 56, by igully

User metadata
Rank Member
Rank
Member

I have just spend an hour or so looking at ACPI:

What a freaking mess!

ACPI is currently at version 6.6 and from version 2.0 they start using 64 bit pointers. It is to put it mildly, an extremely complex interface that has no generic way of addressing it, but you must create a hardware abstraction layer specific to YOUR hardware to interface ACPICA.

It is C code with more structures than a well-aged bureaucrat. It definitely was built for OEMs to implement their own drivers on modern Operating Systems.

However, I found out that some Russian masochist tried to implement it in DOS using C, of course, with the end result of bloated code (note that he seems to be pretty proficient at what he does, so it is not his fault). And the code being highly unreliable, it could work, or not on some motherboard using some parameters or others, as long as legacy ACPI code is supported and that implementation is not broken. Either way, I am attaching his program. Available parameters are readable in English from the executable code itself. I applaud him. Not my cup of tea. I am sorry, I won't go there.

If you have a system that does not support legacy APM in your BIOS/UEFI, or just the old brute force PC-AT style power off (play with the settings!), I highly suggest that if you want to run DOS, you either change the hardware or just run it on an emulation/virtualization environment.

Reply 51 of 56, by igully

User metadata
Rank Member
Rank
Member

Updated version 2.28 (for download on the first post of this thread):

Added option /H which switches the system to suspend/hibernate mode which works on hardware which supports this feature.

Longer explanation:

SANE /H Hibernates your PC, suspending CPU execution to preserve the most
power. Requires APM (Advanced users only!).

The PC in Suspend mode will be set at its lowest level of power operation. It
still maintains operational data and parameters but execution is halted.

To a standard DOS application, this "hibernation" period effectively looks
like a massive gap in the system clock, but the execution simply continues
from where it was left off.

On most vintage hardware, the resume operation is triggered by a hardware
event (like pressing the power button, pressing a special key, or opening a
laptop lid, etc.). But there should be available other different power up
methods tha can be tweaked via its BIOS configuration settings.

The APM BIOS and its matching motherboard are responsible for saving and
restoring the CPU registers and system state.

Be aware that in some cases, there are implementations of APM that may be
incomplete or non-functional, and vary greatly from manufacturer to
manufacturer, from one computer model to another. It is best to perform a test
before-hand, to ensure proper functioning of your hardware in such events. It
is also paramount to consult the reference manual that came with your
motherboard to properly understand and configure your particular hardware for
your own special needs in this regard.

Reply 52 of 56, by igully

User metadata
Rank Member
Rank
Member

Updated version 2.29 (for download on the first post of this thread):

I found out Eric Auer did an ACPI software implementation for DOS. Find his modified source code within SANE's new archive.
I simply modified the code to make it a small standalone tool for SANE to take advantage of, and be able to handle ACPI power down.

So, please be aware that there is now an external executable module included,
called ACPITOOL.BIN, that must be present in the same directory as SANE.COM in
order for it to perform the newer ACPI power down operation.

So far I have tested it in three ACPI compatible systems, where it successfully worked by powering them down as expected.
Be warned that this may most likely not work under all systems, as ACPI has a complex interface. But, it is definitely a way forward.

Reports are welcomed.

Reply 53 of 56, by NeoG_

User metadata
Rank Oldbie
Rank
Oldbie

I have noticed that the utility will randomly report my super socket 7 mainboard has no APM support about 1 in 10 uses. There have been other issues with the mainboard (PS/2 mouse bios bugs) so I suspect it is the real culprit. Is there a switch or build that provides a debug log that can be returned to you? If I catch the condition it might be an interesting log. On the other hand it is difficult to write a log when umounting storage. Maybe it could be sent to console so I can take a photo.

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 54 of 56, by Falcosoft

User metadata
Rank l33t
Rank
l33t
zyzzle wrote on 2026-02-26, 23:13:
Yes, in fact I already use one which slightly modifies and replaces the built-in VGA text font. It's a TSR which takes about 3kb […]
Show full quote
igully wrote on 2026-02-26, 15:56:

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).

Yes, in fact I already use one which slightly modifies and replaces the built-in VGA text font. It's a TSR which takes about 3kb (the size of the VGA 9x16 BIOS font is 4kb, but this TSR uniquely compresses it). This is called KeyRus, version 8.0:

https://archive.org/details/keyrus8b

That is why I asked if modifying brightness is possible without defaulting to the basic BIOS font. Resetting to it wipes out the TSR font. But, this is a small problem, and the fact the resetting restores brightness is more important.

I have never heard of Dimmer; thanks very much for mentioning it. I'll give it a try. As they say, "It's nice to have options" and thankfully we have a lot of options in DOS!

Hi,
Actually this Intel integrated GFX dimming problem has nothing to do with 'gamma'. I t happens when a program switches on 8-bit DAC through a VESA call FUNCTION 08H - SET/GET DAC PALETTE FORMAT. In case of Intel GFX if the program does not switch back to default 6-bit DAC when it exists then the dimming problem occurs.
Here you can download a small utility that does not change anything else just switches the DAC back to 6-bit (RESETDAC):
Re: NVIDIA Kepler/Maxwell/Pascal VESA Bios Bug (workaround found)

Website, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper
x86 microarchitecture benchmark (MandelX)

Reply 55 of 56, by igully

User metadata
Rank Member
Rank
Member

@NeoG

Honestly, APM is a mess. Not the API, but the lack for standardized implementations. Each manufacturer implemented some features, not others. And then when it comes down to usability you won't even find within the same manufacturer the same set of options to configure. Also there is a ton of half-working or not-working implementations depending on how you view them. As a user you are at the toss of a coin, really.

Could you please send me the information regarding your motherboard manufacturer and model, together with BIOS manufacturer and version number? (as usually seen at the top when booting). I am building a now small database to record different issues and correlations in order to reproduce them, as I am an acquainted of a PC recycling center owner, that from time to time gives me his blessings to try my stuff on his extensive collection which dates back from the early 80's. It is an impressive warehouse stacked of dusty and most still working hardware. It is the best way for me to attempt at solving issues, and has served me pretty well so far.

The current build has not incorporated a debug option for a while now (that part of the code is severely outdated, and probably broken by now), since I have used mostly twin real hardware, and even some cycle exact emulators to reproduce issues. Other projects and life tend to get in the way of updating that build, which has not been fruitful so far.

Reply 56 of 56, by NeoG_

User metadata
Rank Oldbie
Rank
Oldbie
igully wrote on Today, 04:34:

Could you please send me the information regarding your motherboard manufacturer and model, together with BIOS manufacturer and version number? (as usually seen at the top when booting). I am building a now small database to record different issues and correlations in order to reproduce them, as I am an acquainted of a PC recycling center owner, that from time to time gives me his blessings to try my stuff on his extensive collection which dates back from the early 80's. It is an impressive warehouse stacked of dusty and most still working hardware. It is the best way for me to attempt at solving issues, and has served me pretty well so far.

The motherboard is an Acorp 5ALI61 (1mbit BIOS), Award 4.51PG/Ver 1.5. The chipset is ALi M1542/M1543C, and is also sold under these names;

Ford Lian AGP-ALI
RedFox AGP-ALI
J-Bond PCIALD5
Polaris ALI-AGP
Wellstar WSAGP-ALI
Wellstar WS5ALI61

The 1.5 bios version can be downloaded here
http://www.steunebrink.info/k6plus.htm#bios

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