VOGONS


Quake2 + Acebot for DOSBox (128mb)

Topic actions

Reply 183 of 862, by ggorts

User metadata
Rank Member
Rank
Member

I may have pasted something wrong because I have the same pattern as one patch back. I'll verify, otherwise it could be dosbox?

Edit: i definitely missed a code bit! Recompiling...

Last edited by ggorts on 2015-07-05, 09:45. Edited 1 time in total.

Reply 184 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

the makefile needs the d_copy.s and other friends but it shoudl all be working OK. I've only tested in DOSbox, but going to test on my P2 now, i assume it works

EDIT: work properly on real hardware too.

Last edited by Maraakate on 2015-07-05, 09:45. Edited 1 time in total.

Reply 186 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

I just pushed the code a few moments ago, the main change is all of that is dumped now and in set mode you have to set the VGA_height, etc. In endframe it goes to VGA_UpdatePlanarScreen(vid.buffer) now as well

Reply 189 of 862, by ggorts

User metadata
Rank Member
Rank
Member

The timedemo reports good speeds and the aspect ratio looks much better than 320h. I wonder if there are any tweaked modes that are 1/2H. I'm sure the Dos folks will really appreciate the effort, too, since this mode I think runs on any vga card(?)!

Reply 190 of 862, by ggorts

User metadata
Rank Member
Rank
Member

Huh, so you passed the entire video buffer to abrash's asm and it works some kind of magic. :) The other advantage is the expectation of better performance over any C solution, too. I would think there is a 20% performance advantage over 0x13 mode, even with the resolution difference.

Reply 191 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

Well, he has an VGA_UpdateLinearScreen ASM function too which may or may not be faster than DJGPPs inline stuff. That requires more magic I'm not ready to play with yet.

I'm trying to see if I can come up with some solution to 320x200's botched aspect ratio.

Reply 192 of 862, by ggorts

User metadata
Rank Member
Rank
Member

Is the 320x200 aspect as intended? In the Windows client?

if (width==360)
{
/* turn off write protect */
word_out(CRTC_INDEX, V_RETRACE_END, 0x2c);

outp(MISC_OUTPUT, 0xe7);
word_out(CRTC_INDEX, H_TOTAL, 0x6b);
word_out(CRTC_INDEX, H_DISPLAY_END, 0x59);
word_out(CRTC_INDEX, H_BLANK_START, 0x5a);
word_out(CRTC_INDEX, H_BLANK_END, 0x8e);
word_out(CRTC_INDEX, H_RETRACE_START, 0x5e);
word_out(CRTC_INDEX, H_RETRACE_END, 0x8a);
word_out(CRTC_INDEX, OFFSET, 0x2d);

/* set vertical retrace back to normal */
word_out(CRTC_INDEX, V_RETRACE_END, 0x8e);

screen_width=360;
}
else
{
outp(MISC_OUTPUT, 0xe3);
}

if (height==240 || height==480)
{
/* turn off write protect */
word_out(CRTC_INDEX, V_RETRACE_END, 0x2c);

word_out(CRTC_INDEX, V_TOTAL, 0x0d);
word_out(CRTC_INDEX, OVERFLOW, 0x3e);
word_out(CRTC_INDEX, V_RETRACE_START, 0xea);
word_out(CRTC_INDEX, V_RETRACE_END, 0xac);
word_out(CRTC_INDEX, V_DISPLAY_END, 0xdf);
word_out(CRTC_INDEX, V_BLANK_START, 0xe7);
word_out(CRTC_INDEX, V_BLANK_END, 0x06);
screen_height=height;
}

if (height==400 || height==480)
{
word_out(CRTC_INDEX, MAX_SCAN_LINE, 0x40);
screen_height=height;
}

That'd be great to see results on the lfb asm addition.

Edit: I just realized you have ability to switch mode-x resolution in a line or two (via functions).

Edit2: I think the magic bits for 160h are here: https://github.com/leilei-/Engoo/blob/master/ … Quake/vid_ext.c. Just for reference. :)

Reply 193 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

I'm not bothering with exotic planar modes. 320x240x8 is enough. The 320x200 aspect is wrong even in windows. The game was meant for 320x240 and the math is as such. I got something close to it, but not 100% it will do for now unless someone wants to fine tune the value to find the perfect number for it. Going to push it now.

Reply 194 of 862, by ggorts

User metadata
Rank Member
Rank
Member

I just saw that commit of yours. I look forward to trying the aspect correction and appreciate all your work! I also wondered, on a separate issue, whether it was ok for excluding multicast from the watt library? I recall(?) multicast functions in q2 or its mods, but maybe they are called from another part of the watt library?

Reply 195 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

those multicast functions in mods are taken care of internally by quake. they're different functions and don't stomp each other so you don't have to worry about that.

They're more or less meant to broadcast say a death message or whatever to every connected and spawned player.

Reply 197 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

I mean, in theory you could add more modex modes to that function in vid_ext2.c if you really want, but I fail to see a point in rendering at 320x256 or 320x480. Even on a big CRT it looks like shit. If you can get 400x300 in LFB I think that's a good compromise between VGA and SVGA.

Reply 198 of 862, by ggorts

User metadata
Rank Member
Rank
Member

I don't think I'd run below 640h, but if I had a period correct system, like alot of folks here, then the modex mode is invaluable. It also brings the compatibility to those systems, as you said before.

If I had dosbox on a non-x86 and in normal core mode (it's slower), then the modex would allow it to run with proper aspect ratio. I should build a real Dos machine anyways.

Edit: yes, I remember looking at the other modes on a crt (when q1 was released) and it wasn't my first choice! Actually I recall I thought 320x200 was correct aspect and ran at that for a year or so.

Reply 199 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

Yeah, I tried taking the aspect ratio code from Q1 in R_ViewChanged but it made it worse. I guess xscale and other values have different math now and just assume a 4:3 aspect ratio.