}
sep = (currprefs.sound_stereo_separation = changed_prefs.sound_stereo_separation) * 3 / 2;
+ if (sep >= 15)
+ sep = 16;
delay = currprefs.sound_mixed_stereo_delay = changed_prefs.sound_mixed_stereo_delay;
mixed_mul1 = MIXED_STEREO_SCALE / 2 - sep;
mixed_mul2 = MIXED_STEREO_SCALE / 2 + sep;
}
// hack until bitplane pipelin is properly emulated
- if (fetchmode == 0 && fetch_state != fetch_not_started && diwstate == DIW_waiting_stop && f_fm_maxplane == 8) {
+ if (fetchmode == 0 && fetch_state != fetch_not_started && diwstate == DIW_waiting_stop && f_fm_maxplane == 8 && t_bplcon0_planes > 1 && td_bplcon0_res == 0) {
if (hpos > plfstrt && hpos <= plfstrt + 7) {
if (num == 1 && hpos <= plfstrt + 2)
delta = 2;
{0x0023, 0x0024, 0x00e0, 0x00ba, 0x00e7, 0x00a7, 0x005e, 0x0060, 0x00e9, 0x00f9, 0x00e8, 0x00a8}, // France
{0x0023, 0x0024, 0x00a7, 0x00c4, 0x00d6, 0x00dc, 0x005e, 0x0060, 0x00e4, 0x00f6, 0x00fc, 0x00df}, // Germany
{0x00a3, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, // UK
- {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e},
- {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e},
- {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e},
- {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e},
- {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e},
- {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e},
- {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e},
- {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e},
- {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e},
+ {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, // Denmark I
+ {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, // Sweden
+ {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, // Italy
+ {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, // Spain
+ {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, // Japan
+ {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, // Norway
+ {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, // Denmark II
+ {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, // Spain II
+ {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, // Latin America
{0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e},
{0x0023, 0x0024, 0x00a7, 0x00c4, 0x0027, 0x0022, 0x00b6, 0x0060, 0x00a9, 0x00ae, 0x2020, 0x2122} // Legal
};
bitGraph.readBytesColumn = 0;
// Advance to the left
- curX += (Real64)1/(Real64)bitGraph.horizDens;
+ if (bitGraph.adjacent == false)
+ curX += (Real64)0.5/(Real64)bitGraph.horizDens;
+ else
+ curX += (Real64)1/(Real64)bitGraph.horizDens;
+
}
static void blitGlyph(FT_Bitmap bitmap, Bit16u destx, Bit16u desty, int add)
// find the host message window
//
- pszHostClass = (_TCHAR *)LocalAlloc(LMEM_FIXED, _tcslen(g_szHostWndClass) + _tcslen(pszHostInfo) + 1);
+ pszHostClass = (_TCHAR *)LocalAlloc(LMEM_FIXED, (_tcslen(g_szHostWndClass) + _tcslen(pszHostInfo) + 1) * sizeof (_TCHAR));
if (!pszHostClass)
return E_OUTOFMEMORY;
wsprintf(pszHostClass, g_szHostWndClass, pszHostInfo);
dpp.BackBufferFormat = mode.Format;
dpp.BackBufferCount = 1;
dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
- dpp.Flags = dpp.Windowed ? 0 : D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;
+ dpp.Flags = D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;
dpp.BackBufferWidth = w_w;
dpp.BackBufferHeight = w_h;
dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
memcpy (origbitmap, bitmap, desc.Width * desc.Height);
DeleteDC (dc);
- write_log (L"LCD: Logitech LCD system initialized\n");
+ write_log (L"LCD: '%s' enabled\n", desc.deviceDisplayName);
return 1;
}
{
HRESULT hr;
- hr = RPInitializeGuest(&guestinfo, hInst, rp_param, RPHostMsgFunction, 0);
+ hr = RPInitializeGuest (&guestinfo, hInst, rp_param, RPHostMsgFunction, 0);
if (SUCCEEDED (hr)) {
initialized = TRUE;
write_log (L"rp_init('%s') succeeded\n", rp_param);
}
-int screenshot_prepare(void)
+int screenshot_prepare (void)
{
unsigned int width, height;
HGDIOBJ hgdiobj;
const PaDeviceInfo *di;
PaStreamParameters p;
PaError err;
+ TCHAR *name;
size = sd->sndbufsize;
s->paframesperbuffer = size;
sd->sndbufsize = size * ch * 2;
sd->devicetype = SOUND_DEVICE_PA;
memset (&p, 0, sizeof p);
+ di = Pa_GetDeviceInfo (dev);
p.channelCount = ch;
p.device = dev;
p.hostApiSpecificStreamInfo = NULL;
p.sampleFormat = paInt16;
- p.suggestedLatency = Pa_GetDeviceInfo (dev)->defaultLowOutputLatency;
+ p.suggestedLatency = di->defaultLowOutputLatency;
p.hostApiSpecificStreamInfo = NULL;
for (;;) {
err = Pa_IsFormatSupported (NULL, &p, freq);
if (err == paFormatIsSupported)
break;
- di = Pa_GetDeviceInfo (dev);
if (freq < 48000) {
freq = 48000;
err = Pa_IsFormatSupported (NULL, &p, freq);
s->paevent = CreateEvent (NULL, FALSE, FALSE, NULL);
for (i = 0; i < 2; i++)
s->pasoundbuffer[i] = xcalloc (sd->sndbufsize, 1);
+ name = au (di->name);
+ write_log (L"PASOUND: CH=%d,FREQ=%d (%s) '%s' buffer %d\n",
+ ch, freq, sound_devices[index].name, name, sd->sndbufsize);
+ xfree (name);
return 1;
end:
s->pastream = NULL;
return 0;
if (!WIN32GFX_IsPicassoScreen ())
return 1;
- if (currprefs.win32_rtgallowscaling)
+ if (currprefs.win32_rtgallowscaling || currprefs.win32_rtgscaleaspectratio)
return 1;
return 0;
}
#define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
#define GETBDD(x) ((x) % 100)
-#define WINUAEPUBLICBETA 1
+#define WINUAEPUBLICBETA 0
-#define WINUAEBETA L"28"
-#define WINUAEDATE MAKEBD(2009, 5, 9)
-#define WINUAEEXTRA L""
+#define WINUAEBETA L"29"
+#define WINUAEDATE MAKEBD(2009, 5, 16)
+#define WINUAEEXTRA L"RC2"
#define WINUAEREV L""
#define IHF_WINDOWHIDDEN 6
static int o;
int n;
+ n = (beamcon0 & 0x80) + maxvpos;
+ if (n != o)
+ cleartemp = 1;
+ o = n;
+ if (beamcon0 & 0x80)
+ return v;
+ if (currprefs.ntscmode)
+ v = v * maxvpos / MAXVPOS_NTSC;
+ else
+ v = v * maxvpos / MAXVPOS_PAL;
+ return v;
+}
+static int vblscale2 (int v)
+{
+ static int o;
+ int n;
+
n = (beamcon0 & 0x80) + maxvpos;
if (n != o)
cleartemp = 1;
OffsetRect (zr, w / 2, h / 2);
}
+static void xymult (int *x, int *y)
+{
+ int mult = currprefs.gfx_resolution - (currprefs.gfx_linedbl ? 1 : 0);
+ if (mult < 0)
+ *x *= 1 << (-mult);
+ else
+ *y *= 1 << mult;
+}
+
+static int ppp = 320;
+
void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height, int aw, int ah, int scale, int temp_width, int temp_height)
{
+ float srcratio, dstratio;
int aws, ahs, ahs2;
int xs, ys;
- int xmult, ymult;
+ float xmult, ymult;
int v;
-
+ int extraw, extrah;
+
getinit ();
ahs2 = vblscale (ah) * scale;
aws = aw * scale;
ahs = ah * scale;
+ extraw = -aws * currprefs.gfx_filter_horiz_zoom / 2000;
+ extrah = -ahs * currprefs.gfx_filter_vert_zoom / 2000;
+
SetRect (sr, 0, 0, dst_width, dst_height);
SetRect (zr, 0, 0, 0, 0);
dr->left = (temp_width - aws) /2;
xmult = currprefs.gfx_filter_horiz_zoom_mult;
ymult = currprefs.gfx_filter_vert_zoom_mult;
+
+ srcratio = 4.0 / 3.0;
+ if (currprefs.gfx_filter_aspect > 0) {
+ dstratio = (currprefs.gfx_filter_aspect >> 8) * 1.0 / (currprefs.gfx_filter_aspect & 0xff);
+ } else if (currprefs.gfx_filter_aspect < 0 && deskw > 0 && deskh > 0) {
+ dstratio = 1.0 * deskw / deskh;
+ } else {
+ dstratio = srcratio;
+ }
+
if (currprefs.gfx_filter_autoscale) {
int cw, ch, cx, cy, cv;
- int extraw = currprefs.gfx_filter_horiz_zoom;
- int extrah = currprefs.gfx_filter_vert_zoom;
static int oxmult, oymult;
filterxmult = 1000 / scale;
filterymult = 1000 / scale;
- xmult = 1000;
- ymult = 1000;
cv = get_custom_limits (&cw, &ch, &cx, &cy);
if (cv) {
int diff;
-
- extraw = amiga_width * extraw / 2000;
- extrah = amiga_height * extrah / 2000;
-
+
if (currprefs.gfx_filter_autoscale == 2 && isfullscreen () == 0) {
int ww;
static int lastresize = 0;
filteroffsety = -zr->top / scale;
if (currprefs.gfx_filter_keep_aspect || currprefs.gfx_filter_aspect != 0) {
- int dw = dst_width;
- int dh = dst_height;
- int xratio, yratio;
int diffx = dr->right - dr->left;
int diffy = dr->bottom - dr->top;
-
- xratio = 4 * 256;
- yratio = 3 * 256;
- if (currprefs.gfx_filter_aspect != 0) {
- int xm, ym, mult;
- if (currprefs.gfx_filter_aspect > 0) {
- xm = (currprefs.gfx_filter_aspect >> 8) * 256;
- ym = (currprefs.gfx_filter_aspect & 0xff) * 256;
- } else if (deskw > 0 && deskh > 0) {
- xm = deskw * 256;
- ym = deskh * 256;
- } else {
- xm = xratio;
- ym = yratio;
- }
- mult = currprefs.gfx_resolution - (currprefs.gfx_linedbl ? 1 : 0);
- if (mult < 0)
- xm *= 1 << (-mult);
- else
- ym *= 1 << mult;
- xratio *= ym / 256;
- yratio *= xm / 256;
+ float xmult = 1.0;
+ float ymult = 1.0;
+
+ if (currprefs.gfx_filter_keep_aspect) {
+ dstratio = dstratio * (aws * 1.0 / ahs2) / (cw * 1.0 / ch);
+ if (currprefs.ntscmode)
+ dstratio = dstratio * 1.2;
}
- if (xratio < yratio) {
- diff = diffx - diffx * xratio / yratio;
- sizeoffset (dr, zr, -diff, 0);
- filteroffsetx += (diff * cw / dst_width) / 2;
+ if (srcratio > dstratio) {
+ ymult = ymult * srcratio / dstratio;
} else {
- diff = diffx - diffx * yratio / xratio;
- sizeoffset (dr, zr, 0, -diff);
- filteroffsety += diff / 2;
+ xmult = xmult * dstratio / srcratio;
}
+
+ diff = diffx - diffx * xmult;
+ sizeoffset (dr, zr, diff, 0);
+ filteroffsetx += diff / 2;
+
+ diff = diffy - diffy * ymult;
+ sizeoffset (dr, zr, 0, diff);
+ filteroffsety += diff / 2;
}
+
diff = dr->right - dr->left;
filterxmult = diff * 1000 / (dst_width * scale);
diff = dr->bottom - dr->top;
return;
}
}
-
- if (currprefs.gfx_filter_keep_aspect && !xmult && !ymult) {
- xmult = aws * 1000 / dst_width;
- ymult = ahs * 1000 / dst_height;
- if (xmult < ymult)
- xmult = ymult;
- else
- ymult = xmult;
- } else {
- if (xmult <= 0)
+
+ if (!currprefs.gfx_filter_horiz_zoom_mult && !currprefs.gfx_filter_vert_zoom_mult) {
+
+ sizeoffset (dr, zr, extraw, extrah);
+
+ if (currprefs.gfx_filter_keep_aspect) {
+ float xm, ym, m;
+
+ xm = 1.0 * aws / dst_width;
+ ym = 1.0 * ahs / dst_height;
+ if (xm < ym)
+ xm = ym;
+ else
+ ym = xm;
+ xmult = ymult = xm * 1000.0;
+
+ m = (aws * 1.0 / dst_width) / (ahs * 1.0 / dst_height);
+ dstratio = dstratio * m;
+ }
+
+ }
+
+ if (xmult <= 0.01 || ymult <= 0.01) {
+
+ if (xmult <= 0.01)
xmult = aws * 1000 / dst_width;
else
xmult = xmult + xmult * currprefs.gfx_filter_horiz_zoom / 2000;
- if (ymult <= 0)
+ if (ymult <= 0.01)
ymult = ahs * 1000 / dst_height;
else
ymult = ymult + ymult * currprefs.gfx_filter_vert_zoom / 2000;
+
}
-
+
if (currprefs.gfx_filter_aspect != 0) {
- int srcratio, dstratio;
- int xmult2 = xmult;
- int ymult2 = ymult;
- srcratio = 4 * 256 / 3;
- if (currprefs.gfx_filter_aspect > 0) {
- dstratio = (currprefs.gfx_filter_aspect >> 8) * 256 / (currprefs.gfx_filter_aspect & 0xff);
- } else if (deskw > 0 && deskh > 0) {
- dstratio = deskw * 256 / deskh;
- } else {
- dstratio = srcratio;
- }
if (srcratio > dstratio) {
ymult = ymult * srcratio / dstratio;
} else {
}
}
+ if (!currprefs.gfx_filter_horiz_zoom_mult && !currprefs.gfx_filter_vert_zoom_mult && currprefs.ntscmode) {
+ int v = vblscale2 (ahs);
+ ymult /= 1.2;
+ OffsetRect (dr, 0, (v - ahs2) / 2);
+ }
+
+
ymult = vblscale (ymult);
+ OffsetRect (dr, 0, (ahs2 - ahs) / 2);
v = currprefs.gfx_filter ? currprefs.gfx_filter_horiz_offset : 0;
OffsetRect (zr, (int)(-v * aws / 1000.0), 0);
xs = dst_width - dst_width * xmult / 1000;
ys = dst_height - dst_height * ymult / 1000;
- OffsetRect (dr, 0, (ahs2 - ahs) / 2);
sizeoffset (dr, zr, xs, ys);
filterxmult = xmult;
#define SM_NONE 11
struct uae_filter *usedfilter;
-int scalepicasso;
+static int scalepicasso;
struct winuae_currentmode {
unsigned int flags;
picasso_offset_my = 1000;
if (scalepicasso) {
int srcratio, dstratio;
+ int srcwidth, srcheight;
+
+ if (scalepicasso < 0) {
+ srcwidth = picasso96_state.Width;
+ srcheight = picasso96_state.Height;
+ } else {
+ srcwidth = currentmode->native_width;
+ srcheight = currentmode->native_height;
+ }
+
SetRect (&sr, 0, 0, picasso96_state.Width, picasso96_state.Height);
if (currprefs.win32_rtgscaleaspectratio < 0) {
// automatic
srcratio = picasso96_state.Width * 256 / picasso96_state.Height;
- dstratio = currentmode->native_width * 256 / currentmode->native_height;
+ dstratio = srcwidth * 256 / srcheight;
} else if (currprefs.win32_rtgscaleaspectratio == 0) {
// none
srcratio = dstratio = 0;
} else {
// manual
- if (isfullscreen () == 0) {
- dstratio = currentmode->native_width * 256 / currentmode->native_height;
- srcratio = (currprefs.win32_rtgscaleaspectratio >> 8) * 256 / (currprefs.win32_rtgscaleaspectratio & 0xff);
- } else {
- srcratio = picasso96_state.Width * 256 / picasso96_state.Height;
- dstratio = (currprefs.win32_rtgscaleaspectratio >> 8) * 256 / (currprefs.win32_rtgscaleaspectratio & 0xff);
- }
+ srcratio = (currprefs.win32_rtgscaleaspectratio >> 8) * 256 / (currprefs.win32_rtgscaleaspectratio & 0xff);
+ dstratio = srcwidth * 256 / srcheight;
}
if (srcratio == dstratio) {
- SetRect (&dr, 0, 0, currentmode->native_width, currentmode->native_height);
+ SetRect (&dr, 0, 0, srcwidth, srcheight);
} else if (srcratio > dstratio) {
- int yy = currentmode->native_height - currentmode->native_height * dstratio / srcratio;
- SetRect (&dr, 0, yy / 2, currentmode->native_width, currentmode->native_height - yy / 2);
+ int yy = srcheight - srcheight * dstratio / srcratio;
+ SetRect (&dr, 0, yy / 2, srcwidth, srcheight - yy / 2);
picasso_offset_y = yy / 2;
} else {
- int xx = currentmode->native_width - currentmode->native_width * srcratio / dstratio;
- SetRect (&dr, xx / 2, 0, currentmode->native_width - xx / 2, currentmode->native_height);
+ int xx = srcwidth - srcwidth * srcratio / dstratio;
+ SetRect (&dr, xx / 2, 0,srcwidth - xx / 2, srcheight);
picasso_offset_x = xx / 2;
}
picasso_offset_mx = picasso96_state.Width * 1000 / (dr.right - dr.left);
RECT rc = getdisplay (&currprefs)->rect;
currentmode->native_width = rc.right - rc.left;
currentmode->native_height = rc.bottom - rc.top;
+ currentmode->current_width = currentmode->native_width;
+ currentmode->current_height = currentmode->native_height;
} else {
currentmode->native_width = currentmode->current_width;
currentmode->native_height = currentmode->current_height;
if (screen_is_picasso) {
if (isfullscreen () < 0) {
if ((currprefs.win32_rtgscaleifsmall || currprefs.win32_rtgallowscaling) && (picasso96_state.Width != currentmode->native_width || picasso96_state.Height != currentmode->native_height))
- scalepicasso = -1;
+ scalepicasso = 1;
+ if (!scalepicasso && currprefs.win32_rtgscaleaspectratio)
+ scalepicasso = -1;
} else if (isfullscreen () > 0) {
- //if (currprefs.gfx_size.width > picasso96_state.Width && currprefs.gfx_size.height > picasso96_state.Height) {
- if (currentmode->native_width > picasso96_state.Width && currentmode->native_height > picasso96_state.Height) {
- if (currprefs.win32_rtgscaleifsmall && !currprefs.win32_rtgmatchdepth) // can't scale to different color depth
- scalepicasso = 1;
+ if (!currprefs.win32_rtgmatchdepth) { // can't scale to different color depth
+ if (currentmode->native_width > picasso96_state.Width && currentmode->native_height > picasso96_state.Height) {
+ if (currprefs.win32_rtgscaleifsmall)
+ scalepicasso = 1;
+ }
+ if (!scalepicasso && currprefs.win32_rtgscaleaspectratio)
+ scalepicasso = -1;
}
} else if (isfullscreen () == 0) {
if ((currprefs.gfx_size.width != picasso96_state.Width || currprefs.gfx_size.height != picasso96_state.Height) && currprefs.win32_rtgallowscaling)
scalepicasso = 1;
if ((currprefs.gfx_size.width > picasso96_state.Width || currprefs.gfx_size.height > picasso96_state.Height) && currprefs.win32_rtgscaleifsmall)
scalepicasso = 1;
+ if (!scalepicasso && currprefs.win32_rtgscaleaspectratio)
+ scalepicasso = -1;
}
if (scalepicasso > 0 && (currprefs.gfx_size.width != picasso96_state.Width || currprefs.gfx_size.height != picasso96_state.Height)) {
screen_is_picasso = 0;
memset (currentmode, 0, sizeof (*currentmode));
#ifdef LOGITECHLCD
- lcd_open();
+ lcd_open ();
#endif
#ifdef RETROPLATFORM
if (rp_param != NULL) {
+Beat 29: (RC2, beta dialog removed)
+
+- Pang hack fixed, it was wrong and caused side-effects..
+- autoscale/keep aspect ratio combination fixed
+- NTSC hardware in PAL mode: shrink display (fit PAL display in NTSC
+ space) Previously NTSC was always streched but I think it is better
+ to make "base" hardware PAL/NTSC mode non-scaled. Note that PAL/NTSC
+ vertical streching/shrinking is only supported in filter modes
+- screenshots didn't work in windowed D3D modes
+- screenshot size was wrong in full-window mode
+- 100% stereo separation was only about 95% stereo separation
+
Beta 28: (RC1)
- re-added CD32 emulation hack that was removed in b4, fixes unreliable