I got tables working for the banked vga modes. I'll add a check to skip windows detection for you as well. I'm ahving issues with planar modes. I got it to set the resolution properly but drawing to it is all wrong.
I was just trying to use vregset.c and friends from Q1, but then special things have to happen when setting the plane to read/write which screws up the drawing.
I just tried banked mode and it works great in dosbox. I only lost 1fps (17->16 frames per second). :)
I'll try your code out for the planar mode, too.
On testing with timedemo, I just realized that I read the performance backwards on the math library tests. I went from 17fps to 17.4fps with the libc or the -fno-builtin math option. The libc math broke the in-game speed, however, but I don't recall whether no-builtin had that effect. It may be worth thinking about, but the increase was ~2%. I also applied that single precision patch mentioned earlier but that definitely made no significant difference.
Okay, push latest build with the early args for testing. Banked modes fail for me in Windows XP, but they work perfectly in real DOS so I don't know what to tell you there. It's basically the same code you were using.
It's probably XP ntvdm and its missing video registers. There are some TSRs out there that may accommodate other svga modes, but it's more for novelty sake. I noted your video menu additions, too, and they work very well in-game; could switch modes without exiting q2dos.
I certainly appreciate the efforts! I was thinking - the ntvdm problem could be its dpmi built-in. I bet it can't handle the q2 memory model. That's another limitation of the emulation, too, I think.
NTVDM being a total crapshoot is entirely why VOGONS was started in the first place, to trade tips/hacks/patches/fixes to get old DOS games working in NTVDM. Aaaand within a few months we absorbed DOSBox's support forums. 😁
"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen
1/* Setup VGA Registers */ 2 3/* turn off chain-4 mode */ 4outp(0x03c4, 0x04); 5outp(0x03c5, 0x06); 6 7/* TODO: Insert code to clear the screen here. 8 (the BIOS only sets every fourth byte 9 to zero -- the rest needs to be set to 10 zero, too) */ 11 12/* turn off long mode */ 13outp(0x03d4, 0x14); 14outp(0x03d5, 0x00); 15/* turn on byte mode */ 16outp(0x03d4, 0x17); 17outp(0x03d5, 0xe3);
Okay have to fix a fwe things but I got that plus checking if it's a planar mode. Vregsetc already had it's own calling code for setting up the screen so that may be unnecessary.