VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

I know that interrupt 10h function 00h (set video mode) has a bit (bit 7, value 0x80), which prevents clearing display memory when set. Anyone knows why this is implemented? Why would you want to switch video modes with display memory unchanged (giving corrupted display if the modes height/width/format etc. don't match)?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 1 of 5, by Malvineous

User metadata
Rank Oldbie
Rank
Oldbie

Speed? If you're about to display your own image on the screen, you don't need to waste time zeroing out the memory when you're going to overwrite it immediately afterwards.

Reply 2 of 5, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie

A TSR could activate during a game, so the TSR can switch to text mode without clearing the whole VGA memory, copy and clear only the text area it uses, run as normally in text mode, and then restore the saved memory, and switch to graphics mode again without clearing the VGA memory.

Reply 4 of 5, by VileR

User metadata
Rank l33t
Rank
l33t
superfury wrote:

Are there any games/software for the 8086/80186(and 8088/80188) known, that actually do that?

Borland SideKick, or somesuch?

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 5 of 5, by Scali

User metadata
Rank l33t
Rank
l33t

This feature was only available on EGA and higher, so probably not a lot of 8088 software that would use it.

The speed is indeed one reason to do this. Eg, you generally have a music routine that runs once every frame, so at about 60 Hz.
Switching screenmode with clear takes more than 1 frame on slower PCs, which would mean that you hear your music skipping (your timer interrupt can't fire while the int 10h handler is still running, because interrupts are disabled). So it's better to switch without clear, then perform the clear yourself (you can also clear it *before* switching), which means the clear is not going to happen inside the int handler, and won't block your interrupts.

I also used it to detect the presence of VGA in my software: switch to VGA mode 13h, check if it worked, and switch back to textmode, without losing the screen contents.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/