MiNiDOS wrote on 2024-04-24, 01:12:
While, I was ready to give a go to this approach, I found a tiny program called PAGE that just switched between different pages (yes, they are four). DOS boots on PAGE 0 and before the offending program starts, I switched to PAGE 1 and after it was initialized, I cleared that screen and returned to PAGE 0.
It sort of works, but it is not a tidy solution since messages are displayed for a couple of seconds on PAGE 1 while it is active, but then of course, when it returns back to PAGE 0, there is no trace left of them.
Oh, sorry, I imagined that it should be possible to set the page being output to and the page being displayed separately. I had a look at Ralf Brown's Interrupt List though and while I could have easily missed something, I didn't see any obvious sign that this is actually possible. Perhaps there's still some trick like that that an expert would know though.
For the record, I got the impression from RBIL that the above method might work on EGA and possibly earlier video standards too.
I had a go at this and it seems to work, if you're interested:
doshea wrote on 2024-04-16, 04:10:
Alternatively, http://www.scs.stanford.edu/10wi-cs140/pintos … /vga/vgamem.htm says:
The first element that defines this mapping is whether or not the VGA decodes accesses from the CPU. This is controlled by the RAM Enable field. If display memory decoding is disabled, then the VGA hardware ignores writes to its address space.
It seems like this might not be supported in emulation much, if that's something you care about:
- it doesn't work in DOSBox 0.74-3
- it doesn't work in QEMU 6.1.0
- from looking at the source of Bochs 2.7.0, it ignores the field, so I didn't try running it in Bochs
Maybe PCem or 86Box would emulate this since they have more accurate hardware emulation.
I tried it out on a real machine with an Intel 865G chipset, which I guess is reasonably old now so hopefully it's still a reasonably accurate VGA implementation, and it did stop the text on the screen from being updated, but the cursor still moved around (I was just typing commands at a prompt here) which looks a bit silly! 😁 I suppose there are tools you can use to make the cursor invisible to work around this, or that could potentially be combined into the same utility.
It seems like if you turn off RAM Enable when the cursor is near the top of the screen, generate say 5 lines of output, then turn RAM Enable back on again, since the cursor has moved down the screen, any further output will appear 5 lines down, with 5 blank lines in between. If you generate more than 25 lines of output, then when you turn RAM Enable back on again, the cursor will be at the bottom of the screen. I guess that to stop your prompt appearing part way down the screen - or at the bottom - with a lot of blank space above it, you might need to CLS before you turn RAM Enable back on (not to actually clear the screen but to move the cursor up). It might be possible to figure out a combination of steps that makes things look okay though. Perhaps you could even output some ANSI art splash screen before turning off RAM Enable.
If you or anyone is interested I can put source and binaries on GitHub.