VOGONS


320x350 Vga-Mode?

Topic actions

First post, by Px1994

User metadata
Rank Newbie
Rank
Newbie

Hello,

i use Pinball Dreams and Pinball Fantasies and i use the 320 x 200 Vga-Mode (normal/low) in these Pinball-Games. But the 320x350 seems like not to work in fullscreen. Every conf-setting in fullscreen causes non-proportional Spheres.

The only solution was the window in a strange resolution, windowresolution=939x1007 but how can i say dosbox that the don't automatic change the resolution like in fullscreen? In fullscreen in understand the crt/vga->lcd problematic but in windows mode i can use any resolution that i want.

I want say dosbox please let the window in the given resolution. How can i do that?

Or Better how can i say dosbox use windowsresolution=320x350 and scale this resolution up, made no aspect ratio or something automatic resolution change?

My hope is that one day dosbox can handle the 320x350er Resolution from Pinball Deluxe and Fanatasies. All other Pinball Games run very good and with rounded spheres.

I use the Dosbox-ECE Version and my hope that the pixel perfect patch can handle 320x350 is gone:). I will write in this thread my proposal that i have. In the moment i hope i can resolve the 320x350 Aspect Ratiob bug with the windowmode in dosbox/dosbox-ece.

thx

Reply 1 of 1, by b_w

User metadata
Rank Newbie
Rank
Newbie

Here is how to convert 640xYYY mode to 320xYYY on any card, register-compatible with either EGA or VGA.
What is it for: thou could utilize graphics/text mode with 16 colors from 64 for EGA (256 for VGA) with lower descaled by 1/2 bandwidth.

First of all set mode utilizing 640xXXX resolution, either text or graphics:
on EGA : 02h, 03h, 04h, 05h, 06h, 07h, 0Eh, 0Fh, 10h,
on VGA: 04h, 05h, 06h, 07h, 0Eh, 0Fh, 10h, 11h, 12h. Then call descale_x():

Details
//////////////////////////////////////////////////////
code for Borland C/C++ for DOS
//////////////////////////////////////////////////////
/// default is EGA with Color 200/350-line monitor !!!
/// #define VC_VGA // VGA
/// #define VC_EGAM // EGA with MDA Monochrome 350-line monitor
/// #define BASEPORT 0x3B4 // Mono
/// #define BASEPORT 0x3D4 // Color

#ifdef VC_VGA
void setVidOff(void)
{
_asm{
cli
mov dx,BASEPORT
mov al,0x17
out dx,al
inc dl
in al,dx
and al, 0x7F
out dx,al // turn off sync
dec dl
mov al,0x11
out dx,al
inc dl
in al,dx
and al,0x7F // unprotect
out dx,al
sti
}
}
void setVidOn(void)
{
_asm {
cli
mov dx,BASEPORT
mov al,0x17
out dx,al
inc dl
in al,dx
or al, 0x80
out dx,al // turn on sync
dec dl
mov al,0x11
out dx,al
inc dl
in al,dx
or al,0x80 // protect
out dx,al
sti
}
}
#endif
void descale_x(void)
{
#ifdef VC_VGA
setVidOff();
outpw(0x3C4,0x0901); // scan-doubling for X
outpw(BASEPORT,0x2D00); // HTOT
outpw(BASEPORT,0x2701); // HDE 0x28 - 1
…Show last 28 lines
    outpw(BASEPORT,0x2802); // HBS 0x28 
outpw(BASEPORT,0x9003); // HBE 0x28 + 1
outpw(BASEPORT,0x2B04); // HRS 0x28 + 3
outpw(BASEPORT,0x9005); // HRE
outpw(BASEPORT,0x1413); /// 320x??? stride
setVidOn();
#else
#ifdef VC_EGAM
outpw(0x3C4,0x0F01); // 0x05 -> 0x0F for EGAm, scan-doubling for X
outpw(BASEPORT,0x2F00); // HTOT
outpw(BASEPORT,0x2701); // HDE 0x28 - 1
outpw(BASEPORT,0x2C02); // HBS 0x28 + 4
outpw(BASEPORT,0x2E03); // HBE 0x28 + 6
outpw(BASEPORT,0x2904); // HRS 0x28 + 1
outpw(BASEPORT,0x7005); // HRE
#else
outpw(0x3C4,0x0B01); // 0x01 -> 0x0B for EGAc, scan-doubling for X
outpw(BASEPORT,0x2D00); // HTOT
outpw(BASEPORT,0x2701); // HDE 0x28 - 1
outpw(BASEPORT,0x2B02); // HBS 0x28 + 3
outpw(BASEPORT,0x2D03); // HBE 0x28 + 5
outpw(BASEPORT,0x2904); // HRS 0x28 + 1
outpw(BASEPORT,0x6D05); // HRE
#endif
outpw(BASEPORT,0x1413); /// 320x??? stride
#endif
}
//////////////////////////////////////////////////////

HTOT, HBS, HBE, HRS, HRE could be adjusted to fit into your monitor alignment by increase/decrease these values.
Don't use AI for calculating these values. Thou could damage some monitors. 😀