Search in the blog:

2024-04-09

My "boss key" utility [DOS, 1994-1995]

In the winter of 1994-1995 I wrote a small utility to implement a universal "boss key" for [MS]-DOS.

After execution the utility terminates and stays resident (TSR). But you can press F12 at any time to quickly display the black screen and pause the current process. Then pressing F11 resumes the process and returns its screen. The purpose, of course, was to play DOS games on a public PC.

Sounds like a simple task, but it required some know-how on my part.

Normally, the INT 09h (IRQ 1, keyboard) handler should be installed to process pressed keys. But there are some DOS games that block this possibility: they set their own INT 09h handler and don't call the previous one, so the utility doesn't know about pressed keys.

So in version 1.0 (1994-12-23) I tried a workaround, instead of INT 09h the utility handles INT 10h (video services). To scan the keyboard, the utility reads port 60h (keyboard) in the handler.

But this was not enough to get a fast and stable response to the F12 key. In version 1.1 (1995-01-28) the utility mainly handles INT 08h (IRQ 0, hardware timer) and scans the keyboard port in this handler. This worked well for many games.


(the utility written in assembler)

The next task was to hide the process screen. I chose a simple but effective solution. When the F12 key is pressed, the utility sets (via INT 10h) all 256 DAC color registers to black (0, 0, 0) level. This means that the displayed data remains on the screen, but because of this black palette, it looks like the black screen. This required only 256*3 bytes to store the previous palette instead of storing all screen data in RAM.

The utility also mutes the PC speaker (61h port) and then waits in a loop for the F11 key to be pressed. This pauses the current process. When the F11 key is pressed, the values of the DAC color registers are restored to display the screen and the handler terminates to resume the current process.

This utility was very useful until Windows OS (95 and so on) came along.



Image albums:

0 comments:

Post a Comment

Blog Archive