VOGONS


Quake2 + Acebot for DOSBox (128mb)

Topic actions

Reply 140 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

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.

Reply 142 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

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.

Reply 144 of 862, by ggorts

User metadata
Rank Member
Rank
Member

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.

Reply 146 of 862, by ggorts

User metadata
Rank Member
Rank
Member
Maraakate wrote:

I just added -skiplfncheck and -skipwincheck for NTVDM playing around. I'll upload the new build when it's done compiling.

That will be fun to try out! Even if it's not practical, it's kind of like those demos but better.

Edit: I noted the #if 0 statements surrounding planar mode, but for curiosity sake.

Reply 147 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie
ggorts wrote:
Maraakate wrote:

I just added -skiplfncheck and -skipwincheck for NTVDM playing around. I'll upload the new build when it's done compiling.

That will be fun to try out! Even if it's not practical, it's kind of like those demos but better.

Edit: I noted the #if 0 statements surrounding, but for curiosity sake.

And just to be clear, I will not accept any bug reports if those two args are used.

Reply 149 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

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.

Reply 150 of 862, by ggorts

User metadata
Rank Member
Rank
Member

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.

Reply 152 of 862, by ggorts

User metadata
Rank Member
Rank
Member

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.

Edit:
Seems dpmi is limited:
https://groups.google.com/forum/#!topic/comp. … gpp/oIAgo1UPYWI

Reply 153 of 862, by ggorts

User metadata
Rank Member
Rank
Member

I think the attached is a mode-x library (as one of its features).

Edit: xmode.c has the initialization and drawing routines.

Attachments

  • Filename
    xlibdj251.zip
    File size
    126.26 KiB
    Downloads
    43 downloads
    File comment
    mode-x library
    File license
    Fair use/fair dealing exception

Reply 154 of 862, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

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

Stiletto

Reply 156 of 862, by ggorts

User metadata
Rank Member
Rank
Member

Some magic bits for mode-x setup:

/* Setup VGA Registers */

/* turn off chain-4 mode */
outp(0x03c4, 0x04);
outp(0x03c5, 0x06);

/* TODO: Insert code to clear the screen here.
(the BIOS only sets every fourth byte
to zero -- the rest needs to be set to
zero, too) */

/* turn off long mode */
outp(0x03d4, 0x14);
outp(0x03d5, 0x00);
/* turn on byte mode */
outp(0x03d4, 0x17);
outp(0x03d5, 0xe3);

Edit: this looks helpful for drawing the screen:

 int j,plane;
word screen_offset;
word bitmap_offset;

for(plane=0; plane<4; plane++)
{
outp(SC_INDEX, MAP_MASK); /* select plane */
outp(SC_DATA, 1 << ((plane+x)&3) );
bitmap_offset=0;
screen_offset = ((dword)y*screen_width+x+plane) >> 2;
for(j=0; j<bmp->height; j++)
{
memcpy(&VGA[screen_offset], &bmp->data[plane][bitmap_offset], (bmp->width >> 2));

bitmap_offset+=bmp->width>>2;
screen_offset+=screen_width>>2;
}
}

Reply 157 of 862, by ggorts

User metadata
Rank Member
Rank
Member

Edit: that was vesa mode after all, but the code may provide hints. :)

Attachments

  • Filename
    modex.diff
    File size
    3.12 KiB
    Downloads
    46 downloads
    File comment
    experimental modex code
    File license
    Fair use/fair dealing exception
Last edited by ggorts on 2015-07-05, 04:30. Edited 1 time in total.

Reply 158 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

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.