First post, by WhiteFalcon
- Rank
- Member
Not sure this question belongs here, but its the closes topic section of Vogons I could find. If there is DOS development section here, please, redirect me.
As I am trying to get further in DOS programming than I managed back in the day, I am learning to tackle SVGA. VESA support detection and a simple put pixel routine work well aready, a "PutImage" function basically too, but working in real mode on a real machine (P75 + S3Trio) means there is no way for double buffering. My plan is just to have a custom mouse cursor for a potential first person point'n'click adventure game, so nothing too demanding on the hardware. With the lack of a virtual screen, I am using the same old technique I remember working well in VGA 320x200: store the background, draw the image, delete the image. When done just like that it results in nothing visible most of the time of course, so I put in a call to a simple WaitRetrace function I used to use in VGA. And it looks great... unless you move the cursor to the top of the screen, there is a large vertical bar area where it just disappears. Apparently the cursor meets the vertical ray already on its way down drawing a new screen. For clarity, the loop is as follows:
{
UpdateXYCoordinatesFromMouse();
StoreBackground(x, y);
DrawImage(x, y);
WaitRetrace();
RestoreBackground(x, y);
}
The only way to cope with this is to rewrite my drawing routines also in asm, which is a tough challenge considering bank switching on demand is needed. Moreover it would not be a clean solution as on a slower machine the problem would appear again. I guess many game must have gone around it using protected mode and double buffering, but it seems to be at least some did not and offered much more "action" on the screen. I can come up with Death Gate, Little Big Adventure, Transport Tycoon, Oxyd, The Incredible Machine, Sim City 2000... maybe some of them were protected and just did not show the DOS4GW banner.
Is there (an easy) solution to that? Did anyone here programmed SVGA in DOS without a DOS extender and without addressing the gfx card type specifically?
Olivetti M4 P75, 32MB RAM, 4GB HDD, 8GB CF, CD-ROM, SoundBlaster AWE 64, Gravis Ultrasound MAX, Roland SCC-1, Roland MT-32, Roland CM-64
Intel 486DX2/66Mhz, 16MB RAM, VGA Trident 512kB, 1.6GB HDD WD, CD-ROM, 256MB CF, SoundBlaster 16 Pro (CT2910)