if (status == -1)
return 0;
if (status == -2)
- return 150;
+ return 10;
#if 1
if (cdrom_audiostatus != status) {
if (status == AUDIO_STATUS_IN_PROGRESS) {
#define MAX_EV ~0u
#define DEBUG_AUDIO 0
+#define DEBUG_AUDIO_HACK 0
#define DEBUG_CHANNEL_MASK 15
#define TEST_AUDIO 0
return currprefs.produce_sound != 0;
}
-#if DEBUG_AUDIO > 0
+#if DEBUG_AUDIO > 0 || DEBUG_AUDIO_HACK > 0
static bool debugchannel (int ch)
{
return ((1 << ch) & DEBUG_CHANNEL_MASK) != 0;
data >>= bits - 16;
} else {
int shift = 16 - bits;
- int right = data & ((1 << shift) - 1);
data <<= shift;
- data |= right;
}
return data;
}
if ((cdp->state == 2 || cdp->state == 3) && usehacks1 () && !chan_ena && old_dma) {
// DMA switched off, state=2/3 and "too fast CPU": kill DMA instantly
// or CPU timed DMA wait routines in common tracker players will lose notes
-#if DEBUG_AUDIO > 0
+#if DEBUG_AUDIO_HACK > 0
if (debugchannel (nr))
write_log (_T("%d: INSTADMAOFF\n"), nr, M68K_GETPC);
#endif
{
struct audio_channel_data *cdp = audio_channel + nr;
audio_state_channel2 (nr, perfin);
- cdp->dat_written = 0;
+ cdp->dat_written = false;
}
void audio_state_machine (void)
for (int nr = 0; nr < 4; nr++) {
struct audio_channel_data *cdp = audio_channel + nr;
audio_state_channel2 (nr, false);
- cdp->dat_written = 0;
+ cdp->dat_written = false;
}
schedule_audio ();
events_schedule ();
if (usehacks1 () && ((cdp->ptx_tofetch && cdp->state == 1) || cdp->ptx_written)) {
cdp->ptx = cdp->lc;
cdp->ptx_written = true;
+#if DEBUG_AUDIO_HACK > 0
+ if (debugchannel (nr))
+ write_log (_T("AUD%dLCH HACK: %04X %08X (%d) (%d %d %08x)\n"), nr, v, M68K_GETPC, cdp->state, cdp->dsr, cdp->ptx_written, cdp->ptx);
+#endif
} else {
cdp->lc = (cdp->lc & 0xffff) | ((uae_u32)v << 16);
- }
#if DEBUG_AUDIO > 0
- if (debugchannel (nr))
- write_log (_T("AUD%dLCH: %04X %08X (%d) (%d %d %08x)\n"), nr, v, M68K_GETPC, cdp->state, cdp->dsr, cdp->ptx_written, cdp->ptx);
+ if (debugchannel (nr))
+ write_log (_T("AUD%dLCH: %04X %08X (%d) (%d %d %08x)\n"), nr, v, M68K_GETPC, cdp->state, cdp->dsr, cdp->ptx_written, cdp->ptx);
#endif
+ }
}
void AUDxLCL (int nr, uae_u16 v)
if (usehacks1 () && ((cdp->ptx_tofetch && cdp->state == 1) || cdp->ptx_written)) {
cdp->ptx = cdp->lc;
cdp->ptx_written = true;
+#if DEBUG_AUDIO_HACK > 0
+ if (debugchannel (nr))
+ write_log (_T("AUD%dLCL HACK: %04X %08X (%d) (%d %d %08x)\n"), nr, v, M68K_GETPC, cdp->state, cdp->dsr, cdp->ptx_written, cdp->ptx);
+#endif
} else {
cdp->lc = (cdp->lc & ~0xffff) | (v & 0xFFFE);
- }
#if DEBUG_AUDIO > 0
- if (debugchannel (nr))
- write_log (_T("AUD%dLCL: %04X %08X (%d) (%d %d %08x)\n"), nr, v, M68K_GETPC, cdp->state, cdp->dsr, cdp->ptx_written, cdp->ptx);
+ if (debugchannel (nr))
+ write_log (_T("AUD%dLCL: %04X %08X (%d) (%d %d %08x)\n"), nr, v, M68K_GETPC, cdp->state, cdp->dsr, cdp->ptx_written, cdp->ptx);
#endif
+ }
}
void AUDxPER (int nr, uae_u16 v)
/* smaller values would cause extremely high cpu usage */
per = PERIOD_MIN * CYCLE_UNIT;
}
- if (per < PERIOD_MIN_NONCE * CYCLE_UNIT && !currprefs.cpu_cycle_exact && (cdp->dmaenstore || cdp->state == 0)) {
- /* DMAL emulation and low period can cause very very high cpu usage on slow performance PCs */
+ if (per < PERIOD_MIN_NONCE * CYCLE_UNIT && !currprefs.cpu_cycle_exact && cdp->dmaenstore) {
+ /* DMAL emulation and low period can cause very very high cpu usage on slow performance PCs
+ * Only do this hack if audio DMA is active.
+ */
per = PERIOD_MIN_NONCE * CYCLE_UNIT;
}
static const TCHAR *rtgtype[] = { _T("ZorroII"), _T("ZorroIII"), 0 };
static const TCHAR *waitblits[] = { _T("disabled"), _T("automatic"), _T("noidleonly"), _T("always"), 0 };
static const TCHAR *autoext2[] = { _T("disabled"), _T("copy"), _T("replace"), 0 };
+static const TCHAR *leds[] = { _T("power"), _T("df0"), _T("df1"), _T("df2"), _T("df3"), _T("hd"), _T("cd"), _T("fps"), _T("cpu"), _T("snd"), _T("md"), 0 };
+static int leds_order[] = { 3, 6, 7, 8, 9, 4, 5, 2, 1, 0, 9 };
static const TCHAR *obsolete[] = {
_T("accuracy"), _T("gfx_opengl"), _T("gfx_32bit_blits"), _T("32bit_blits"),
cfgfile_write (f, _T("cpu_type"), tmp);
}
+static void write_leds (struct zfile *f, const TCHAR *name, int mask)
+{
+ TCHAR tmp[MAX_DPATH];
+ tmp[0] = 0;
+ for (int i = 0; leds[i]; i++) {
+ bool got = false;
+ for (int j = 0; leds[j]; j++) {
+ if (leds_order[j] == i) {
+ if (mask & (1 << j)) {
+ if (got)
+ _tcscat (tmp, _T(":"));
+ _tcscat (tmp, leds[j]);
+ got = true;
+ }
+ }
+ }
+ if (leds[i + 1] && got)
+ _tcscat (tmp, _T(","));
+ }
+ while (tmp[0] && tmp[_tcslen (tmp) - 1] == ',')
+ tmp[_tcslen (tmp) - 1] = 0;
+ cfgfile_dwrite_str (f, name, tmp);
+}
+
void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
{
struct strlist *sl;
cfgfile_write_bool (f, _T("ntsc"), p->ntscmode);
cfgfile_write_bool (f, _T("genlock"), p->genlock);
cfgfile_dwrite_str (f, _T("monitoremu"), specialmonitors[p->monitoremu]);
+
cfgfile_dwrite_bool (f, _T("show_leds"), !!(p->leds_on_screen & STATUSLINE_CHIPSET));
+ cfgfile_dwrite_bool (f, _T("show_leds_rtg"), !!(p->leds_on_screen & STATUSLINE_RTG));
+ write_leds(f, _T("show_leds_enabled"), p->leds_on_screen_mask[0]);
+ write_leds(f, _T("show_leds_enabled_rtg"), p->leds_on_screen_mask[1]);
+
if (p->osd_pos.y || p->osd_pos.x) {
cfgfile_dwrite (f, _T("osd_position"), _T("%.1f%s:%.1f%s"),
p->osd_pos.x >= 20000 ? (p->osd_pos.x - 30000) / 10.0 : (float)p->osd_pos.x, p->osd_pos.x >= 20000 ? _T("%") : _T(""),
p->osd_pos.y >= 20000 ? (p->osd_pos.y - 30000) / 10.0 : (float)p->osd_pos.y, p->osd_pos.y >= 20000 ? _T("%") : _T(""));
}
- cfgfile_dwrite_bool (f, _T("show_leds_rtg"), !!(p->leds_on_screen & STATUSLINE_RTG));
cfgfile_dwrite (f, _T("keyboard_leds"), _T("numlock:%s,capslock:%s,scrolllock:%s"),
kbleds[p->keyboard_leds[0]], kbleds[p->keyboard_leds[1]], kbleds[p->keyboard_leds[2]]);
if (p->chipset_mask & CSMASK_AGA)
cfgfile_write_bool (f, _T("gfxcard_hardware_sprite"), p->rtg_hardwaresprite);
cfgfile_write (f, _T("chipmem_size"), _T("%d"), p->chipmem_size == 0x20000 ? -1 : (p->chipmem_size == 0x40000 ? 0 : p->chipmem_size / 0x80000));
cfgfile_dwrite (f, _T("megachipmem_size"), _T("%d"), p->z3chipmem_size / 0x100000);
+ if (p->custom_memory_sizes[0])
+ cfgfile_write (f, _T("addmem1"), _T("0x%x,0x%x"), p->custom_memory_addrs[0], p->custom_memory_sizes[0]);
+ if (p->custom_memory_sizes[1])
+ cfgfile_write (f, _T("addmem2"), _T("0x%x,0x%x"), p->custom_memory_addrs[1], p->custom_memory_sizes[1]);
if (p->m68k_speed > 0) {
cfgfile_write (f, _T("finegrain_cpu_speed"), _T("%d"), p->m68k_speed);
|| cfgfile_string (option, value, _T("gfx_filter_mask"), p->gfx_filtermask, sizeof p->gfx_filtermask / sizeof (TCHAR))
|| cfgfile_intval (option, value, _T("filesys_max_size"), &p->filesys_limit, 1)
+ || cfgfile_intval (option, value, _T("rtg_vert_zoom_mult"), &p->rtg_vert_zoom_mult, 1)
+ || cfgfile_intval (option, value, _T("rtg_horiz_zoom_mult"), &p->rtg_horiz_zoom_mult, 1)
#endif
|| cfgfile_intval (option, value, _T("floppy0sound"), &p->floppyslots[0].dfxclick, 1)
|| cfgfile_intval (option, value, _T("floppy1sound"), &p->floppyslots[1].dfxclick, 1)
p->leds_on_screen &= ~STATUSLINE_RTG;
return 1;
}
+ if (_tcscmp (option, _T("show_leds_enabled")) == 0 || _tcscmp (option, _T("show_leds_enabled_rtg")) == 0) {
+ TCHAR tmp[MAX_DPATH];
+ int idx = _tcscmp (option, _T("show_leds_enabled")) == 0 ? 0 : 1;
+ p->leds_on_screen_mask[idx] = 0;
+ _tcscpy (tmp, value);
+ _tcscat (tmp, _T(","));
+ TCHAR *s = tmp;
+ for (;;) {
+ TCHAR *s2 = s;
+ TCHAR *s3 = _tcschr (s, ':');
+ s = _tcschr (s, ',');
+ if (!s)
+ break;
+ if (s3 && s3 < s)
+ s = s3;
+ *s = 0;
+ for (int i = 0; leds[i]; i++) {
+ if (!_tcsicmp (s2, leds[i])) {
+ p->leds_on_screen_mask[idx] |= 1 << i;
+ }
+ }
+ s++;
+ }
+ return 1;
+ }
if (!_tcscmp (option, _T("osd_position"))) {
TCHAR *s = value;
p->waiting_blits = 0;
p->collision_level = 2;
p->leds_on_screen = 0;
+ p->leds_on_screen_mask[0] = p->leds_on_screen_mask[1] = (1 << LED_MAX) - 1;
p->keyboard_leds_in_use = 0;
p->keyboard_leds[0] = p->keyboard_leds[1] = p->keyboard_leds[2] = 0;
p->scsi = 0;
p->gfx_filter_keep_autoscale_aspect = false;
p->gfx_filteroverlay_overscan = 0;
+ p->rtg_horiz_zoom_mult = 1000;
+ p->rtg_vert_zoom_mult = 1000;
+
_tcscpy (p->floppyslots[0].df, _T("df0.adf"));
_tcscpy (p->floppyslots[1].df, _T("df1.adf"));
_tcscpy (p->floppyslots[2].df, _T("df2.adf"));
int gfx_filter_autoscale;
int gfx_filter_keep_autoscale_aspect;
+ int rtg_horiz_zoom_mult;
+ int rtg_vert_zoom_mult;
+
bool immediate_blits;
int waiting_blits;
unsigned int chipset_mask;
int cr_selected;
int collision_level;
int leds_on_screen;
+ int leds_on_screen_mask[2];
struct wh osd_pos;
int keyboard_leds[3];
bool keyboard_leds_in_use;
j++;
}
if (j >= MAX_INPUT_DEVICE_EVENTS || na->extra[j] < 0)
- type = -1;
+ return;
}
}
// wait until previous event is released before accepting new ones
testmode_count--;
struct teststore *ts = &testmode_data[testmode_count];
*devnum = getdevnum (ts->testmode_type, ts->testmode_num);
- *wtype = idev[ts->testmode_type].get_widget_first (ts->testmode_num, ts->testmode_wtype) + ts->testmode_wnum;
+ if (ts->testmode_wnum >= 0 && ts->testmode_wnum < MAX_INPUT_DEVICE_EVENTS)
+ *wtype = idev[ts->testmode_type].get_widget_first (ts->testmode_num, ts->testmode_wtype) + ts->testmode_wnum;
+ else
+ *wtype = ts->testmode_wnum;
*state = ts->testmode_state;
if (ts->testmode_state)
memcpy (&testmode_wait[testmode_count], ts, sizeof (struct teststore));
}
if (num == num_keyboard) {
for (num = 0; num < num_keyboard; num++) {
+ did = &di_keyboard[num];
if (did->connection == DIDC_RAW && did->acquired && did->rawinput == NULL)
break;
}
write_log (_T("IOCTL_DISK_GET_LENGTH_INFO failed with error code %d.\n"), GetLastError());
if (!nosp)
write_log (_T("IOCTL_DISK_GET_LENGTH_INFO not supported, detected disk size may not be correct.\n"));
+ } else {
+ write_log (_T("IOCTL_DISK_GET_LENGTH_INFO returned size: %I64d (0x%I64x)\n"), gli.Length.QuadPart, gli.Length.QuadPart);
}
if (geom_ok == 0 && gli_ok == 0) {
write_log (_T("Can't detect size of device\n"));
udi->sectors = dg.SectorsPerTrack;
udi->heads = dg.TracksPerCylinder;
}
- if (gli_ok)
+ if (gli_ok && gli.Length.QuadPart)
udi->size = gli.Length.QuadPart;
+ if (udi->size == 0) {
+ write_log (_T("device size is zero!\n"));
+ ret = 1;
+ goto end;
+ }
write_log (_T("device size %I64d (0x%I64x) bytes\n"), udi->size, udi->size);
trim (orgname);
lock = 1;
}
if (dst) {
- statusline (dst);
+ if (!(currprefs.leds_on_screen & STATUSLINE_TARGET))
+ statusline (dst);
maxy = picasso_vidinfo.height;
if (miny > picasso_vidinfo.height - TD_TOTAL_HEIGHT)
miny = picasso_vidinfo.height - TD_TOTAL_HEIGHT;
FONT 8, "MS Sans Serif", 0, 0, 0x0\r
BEGIN\r
CONTROL "",IDC_RICHEDIT1,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,65,10,210,35\r
- CONTROL "",IDC_RICHEDIT2,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,43,59,260,20\r
+ CONTROL "",IDC_RICHEDIT2,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,1,58,343,28\r
PUSHBUTTON "Contributors",IDC_CONTRIBUTORS,132,100,80,15\r
CONTROL "",IDC_UAEHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,2,196,112,24\r
CONTROL "",IDC_PICASSOHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | NOT WS_VISIBLE | WS_DISABLED,211,131,112,24\r
PUSHBUTTON "Set default",IDC_GUI_DEFAULT,272,204,54,14\r
COMBOBOX IDC_GUI_SIZE,333,205,54,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
CONTROL "Resizeable GUI",IDC_GUI_RESIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,273,222,114,11\r
- GROUPBOX "State Files",IDC_STATIC,1,244,393,38\r
- EDITTEXT IDC_STATENAME,8,259,231,13,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP\r
+ GROUPBOX "State Files",IDC_STATIC,1,242,393,38\r
+ EDITTEXT IDC_STATENAME,8,257,231,13,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP\r
CONTROL "",IDC_STATECLEAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,244,261,9,10\r
- PUSHBUTTON "Load state...",IDC_DOLOADSTATE,257,259,65,14\r
- PUSHBUTTON "Save state...",IDC_DOSAVESTATE,325,259,65,14\r
- GROUPBOX "Keyboard LEDs",IDC_STATIC,1,284,393,34\r
- COMBOBOX IDC_KBLED1,10,297,64,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_KBLED2,97,297,64,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_KBLED3,184,297,64,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- CONTROL "USB mode",IDC_KBLED_USB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,298,64,11\r
+ PUSHBUTTON "Load state...",IDC_DOLOADSTATE,257,257,65,14\r
+ PUSHBUTTON "Save state...",IDC_DOSAVESTATE,325,257,65,14\r
+ GROUPBOX "Keyboard LEDs",IDC_STATIC,1,282,393,34\r
+ COMBOBOX IDC_KBLED1,10,295,64,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
+ COMBOBOX IDC_KBLED2,97,295,64,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
+ COMBOBOX IDC_KBLED3,184,295,64,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
+ CONTROL "USB mode",IDC_KBLED_USB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,296,64,11\r
END\r
\r
IDD_HARDFILE DIALOGEX 0, 0, 396, 263\r
int totalhdbl = -1, totalvdbl = -1;
int hmult, vmult;
bool half;
+ bool rtg;
hres = p->gfx_resolution;
vres = p->gfx_vresolution;
if (WIN32GFX_IsPicassoScreen ()) {
+ rtg = true;
full = p->gfx_apmode[1].gfx_fullscreen;
sm->lClipTop = -1;
sm->lClipLeft = -1;
sm->lClipWidth = -1;//picasso96_state.Width;
sm->lClipHeight = -1;//picasso96_state.Height;
+ if (p->rtg_horiz_zoom_mult < 333 || p->rtg_vert_zoom_mult < 333)
+ m |= RP_SCREENMODE_SCALE_4X;
+ else if (p->rtg_horiz_zoom_mult < 500 || p->rtg_vert_zoom_mult < 500)
+ m |= RP_SCREENMODE_SCALE_3X;
+ else if (p->rtg_horiz_zoom_mult < 1000 || p->rtg_vert_zoom_mult < 1000)
+ m |= RP_SCREENMODE_SCALE_2X;
+
} else {
+ rtg = false;
full = p->gfx_apmode[0].gfx_fullscreen;
totalhdbl = hres;
}
if (full) {
m &= ~RP_SCREENMODE_DISPLAYMASK;
- m |= p->gfx_apmode[APMODE_NATIVE].gfx_display << 8;
+ m |= p->gfx_apmode[rtg ? APMODE_RTG : APMODE_NATIVE].gfx_display << 8;
}
if (full > 1)
m |= RP_SCREENMODE_FULLSCREEN_SHARED;
p->gfx_apmode[1].gfx_fullscreen = fs;
p->gfx_apmode[0].gfx_fullscreen = fs;
- p->win32_rtgscaleifsmall = fs == 2;
p->gfx_xcenter_pos = sm->lClipLeft;
p->gfx_ycenter_pos = sm->lClipTop;
p->gfx_xcenter_size = -1;
p->gfx_ycenter_size = -1;
- if (stretch) {
- hmult = vmult = 0;
- } else if (integerscale) {
- hmult = vmult = 1;
- p->gfx_filter_autoscale = AUTOSCALE_INTEGER;
- if (sm->dwClipFlags & RP_CLIPFLAGS_AUTOCLIP) {
- p->gfx_xcenter_pos = -1;
- p->gfx_ycenter_pos = -1;
- p->gfx_xcenter_size = -1;
- p->gfx_ycenter_size = -1;
+ if (WIN32GFX_IsPicassoScreen ()) {
+
+ int m = 1;
+ p->win32_rtgscaleifsmall = fs == 2 || (smm >= RP_SCREENMODE_SCALE_2X && smm <= RP_SCREENMODE_SCALE_4X);
+ p->rtg_horiz_zoom_mult = p->rtg_vert_zoom_mult = 1000;
+ if (smm == RP_SCREENMODE_SCALE_2X) {
+ m = 2;
+ } else if (smm == RP_SCREENMODE_SCALE_3X) {
+ m = 3;
+ } else if (smm == RP_SCREENMODE_SCALE_4X) {
+ m = 4;
+ }
+ p->rtg_horiz_zoom_mult = p->rtg_vert_zoom_mult = 1000 / m;
+ p->gfx_size_win.width = picasso_vidinfo.width * m;
+ p->gfx_size_win.height = picasso_vidinfo.height * m;
+
+ } else {
+ if (stretch) {
+ hmult = vmult = 0;
+ } else if (integerscale) {
+ hmult = vmult = 1;
+ p->gfx_filter_autoscale = AUTOSCALE_INTEGER;
+ if (sm->dwClipFlags & RP_CLIPFLAGS_AUTOCLIP) {
+ p->gfx_xcenter_pos = -1;
+ p->gfx_ycenter_pos = -1;
+ p->gfx_xcenter_size = -1;
+ p->gfx_ycenter_size = -1;
+ } else {
+ if (sm->lClipWidth > 0)
+ p->gfx_xcenter_size = sm->lClipWidth;
+ if (sm->lClipHeight > 0)
+ p->gfx_ycenter_size = sm->lClipHeight;
+ }
+ }
+
+ if (keepaspect) {
+ p->gfx_filter_aspect = -1;
+ p->gfx_filter_keep_aspect = 1;
} else {
+ p->gfx_filter_aspect = 0;
+ p->gfx_filter_keep_aspect = 0;
+ }
+
+ if (!integerscale) {
+ if (sm->dwClipFlags & RP_CLIPFLAGS_AUTOCLIP) {
+ if (!forcesize)
+ p->gfx_filter_autoscale = AUTOSCALE_RESIZE;
+ else
+ p->gfx_filter_autoscale = AUTOSCALE_NORMAL;
+ p->gfx_xcenter_pos = -1;
+ p->gfx_ycenter_pos = -1;
+ p->gfx_xcenter_size = -1;
+ p->gfx_ycenter_size = -1;
+ } else if (sm->dwClipFlags & RP_CLIPFLAGS_NOCLIP) {
+ p->gfx_filter_autoscale = AUTOSCALE_STATIC_MAX;
+ p->gfx_xcenter_pos = -1;
+ p->gfx_ycenter_pos = -1;
+ p->gfx_xcenter_size = -1;
+ p->gfx_ycenter_size = -1;
+ if (!forcesize) {
+ p->gfx_size_win.width = AMIGA_WIDTH_MAX << currprefs.gfx_resolution;
+ p->gfx_size_win.height = AMIGA_HEIGHT_MAX << currprefs.gfx_vresolution;;
+ }
+ }
+
if (sm->lClipWidth > 0)
p->gfx_xcenter_size = sm->lClipWidth;
if (sm->lClipHeight > 0)
p->gfx_ycenter_size = sm->lClipHeight;
- }
- }
- if (keepaspect) {
- p->gfx_filter_aspect = -1;
- p->gfx_filter_keep_aspect = 1;
- } else {
- p->gfx_filter_aspect = 0;
- p->gfx_filter_keep_aspect = 0;
- }
-
- if (log_rp & 2)
- write_log(_T("%dx%d %dx%d %dx%d %08x HM=%.1f VM=%.1f\n"),
- sm->lClipLeft, sm->lClipTop, sm->lClipWidth, sm->lClipHeight, sm->lTargetWidth, sm->lTargetHeight, sm->dwClipFlags, hmult, vmult);
-
- if (!integerscale) {
- if (sm->dwClipFlags & RP_CLIPFLAGS_AUTOCLIP) {
- if (!forcesize)
- p->gfx_filter_autoscale = AUTOSCALE_RESIZE;
- else
- p->gfx_filter_autoscale = AUTOSCALE_NORMAL;
- p->gfx_xcenter_pos = -1;
- p->gfx_ycenter_pos = -1;
- p->gfx_xcenter_size = -1;
- p->gfx_ycenter_size = -1;
- } else if (sm->dwClipFlags & RP_CLIPFLAGS_NOCLIP) {
- p->gfx_filter_autoscale = AUTOSCALE_STATIC_MAX;
- p->gfx_xcenter_pos = -1;
- p->gfx_ycenter_pos = -1;
- p->gfx_xcenter_size = -1;
- p->gfx_ycenter_size = -1;
- if (!forcesize) {
- p->gfx_size_win.width = AMIGA_WIDTH_MAX << currprefs.gfx_resolution;
- p->gfx_size_win.height = AMIGA_HEIGHT_MAX << currprefs.gfx_vresolution;;
+ if ((p->gfx_xcenter_pos >= 0 && p->gfx_ycenter_pos >= 0) || (p->gfx_xcenter_size > 0 && p->gfx_ycenter_size > 0)) {
+ p->gfx_filter_autoscale = AUTOSCALE_MANUAL;
}
}
- if (sm->lClipWidth > 0)
- p->gfx_xcenter_size = sm->lClipWidth;
- if (sm->lClipHeight > 0)
- p->gfx_ycenter_size = sm->lClipHeight;
+ p->gfx_filter_horiz_zoom_mult = hmult > 0 ? (int)(1000.0 / hmult) : (int)hmult;
+ p->gfx_filter_vert_zoom_mult = vmult > 0 ? (int)(1000.0 / vmult) : (int)vmult;
- if ((p->gfx_xcenter_pos >= 0 && p->gfx_ycenter_pos >= 0) || (p->gfx_xcenter_size > 0 && p->gfx_ycenter_size > 0)) {
- p->gfx_filter_autoscale = AUTOSCALE_MANUAL;
+ p->gfx_filter_scanlines = 0;
+ p->gfx_scanlines = 0;
+ if (sm->dwScreenMode & RP_SCREENMODE_SCANLINES) {
+ p->gfx_scanlines = 1;
+ p->gfx_filter_scanlines = 8;
+ p->gfx_filter_scanlinelevel = 8;
+ p->gfx_filter_scanlineratio = (1 << 4) | 1;
}
}
- p->gfx_filter_horiz_zoom_mult = hmult > 0 ? (int)(1000.0 / hmult) : (int)hmult;
- p->gfx_filter_vert_zoom_mult = vmult > 0 ? (int)(1000.0 / vmult) : (int)vmult;
-
- p->gfx_filter_scanlines = 0;
- p->gfx_scanlines = 0;
- if (sm->dwScreenMode & RP_SCREENMODE_SCANLINES) {
- p->gfx_scanlines = 1;
- p->gfx_filter_scanlines = 8;
- p->gfx_filter_scanlinelevel = 8;
- p->gfx_filter_scanlineratio = (1 << 4) | 1;
- }
+ if (log_rp & 2)
+ write_log(_T("%dx%d %dx%d %dx%d %08x HM=%.1f VM=%.1f\n"),
+ sm->lClipLeft, sm->lClipTop, sm->lClipWidth, sm->lClipHeight, sm->lTargetWidth, sm->lTargetHeight, sm->dwClipFlags, hmult, vmult);
if (log_rp & 2)
write_log (_T("WW=%d WH=%d FW=%d FH=%d HM=%d VM=%d XP=%d YP=%d XS=%d YS=%d AS=%d AR=%d,%d\n"),
feat = RP_FEATURE_POWERLED | RP_FEATURE_SCREEN1X | RP_FEATURE_FULLSCREEN;
feat |= RP_FEATURE_PAUSE | RP_FEATURE_TURBO_CPU | RP_FEATURE_TURBO_FLOPPY | RP_FEATURE_VOLUME | RP_FEATURE_SCREENCAPTURE;
- feat |= RP_FEATURE_STATE | RP_FEATURE_SCANLINES | RP_FEATURE_DEVICEREADWRITE;
- feat |= RP_FEATURE_SCALING_SUBPIXEL | RP_FEATURE_SCALING_STRETCH;
- if (!WIN32GFX_IsPicassoScreen ())
+ feat |= RP_FEATURE_STATE | RP_FEATURE_DEVICEREADWRITE;
+ if (WIN32GFX_IsPicassoScreen ()) {
+ if (currprefs.gfx_api)
+ feat |= RP_FEATURE_SCREEN2X | RP_FEATURE_SCREEN3X | RP_FEATURE_SCREEN4X;
+ } else {
feat |= RP_FEATURE_SCREEN2X | RP_FEATURE_SCREEN3X | RP_FEATURE_SCREEN4X;
+ feat |= RP_FEATURE_SCALING_SUBPIXEL | RP_FEATURE_SCALING_STRETCH | RP_FEATURE_SCANLINES;
+ }
feat |= RP_FEATURE_INPUTDEVICE_MOUSE;
feat |= RP_FEATURE_INPUTDEVICE_JOYSTICK;
feat |= RP_FEATURE_INPUTDEVICE_GAMEPAD;
if (s) {
v2 = _tstol (s + 1);
if (v1 < 0 || v2 < 0)
- p->gfx_filter_aspect = -1;
+ p->win32_rtgscaleaspectratio = -1;
else if (v1 == 0 || v2 == 0)
- p->gfx_filter_aspect = 0;
+ p->win32_rtgscaleaspectratio = 0;
else
- p->gfx_filter_aspect = (v1 << 8) | v2;
+ p->win32_rtgscaleaspectratio = (v1 << 8) | v2;
}
return 1;
}
#define LANG_DLL 1
//#define WINUAEBETA _T("")
-#define WINUAEBETA _T("25")
-#define WINUAEDATE MAKEBD(2012, 11, 10)
-#define WINUAEEXTRA _T(" RC1")
+#define WINUAEBETA _T("26")
+#define WINUAEDATE MAKEBD(2012, 11, 18)
+#define WINUAEEXTRA _T(" RC2")
//#define WINUAEEXTRA _T("AmiKit Preview")
#define WINUAEREV _T("")
#ifdef PICASSO96
currentmode->vsync = 0;
if (screen_is_picasso) {
- currentmode->current_width = picasso96_state.Width;
- currentmode->current_height = picasso96_state.Height;
+ currentmode->current_width = picasso96_state.Width * (1000 / currprefs.rtg_horiz_zoom_mult);
+ currentmode->current_height = picasso96_state.Height * (1000 / currprefs.rtg_vert_zoom_mult);
currprefs.gfx_apmode[1].gfx_interlaced = false;
if (currprefs.win32_rtgvblankrate == 0) {
currprefs.gfx_apmode[1].gfx_refreshrate = currprefs.gfx_apmode[0].gfx_refreshrate;
} else {
DirectDraw_ClearSurface (NULL);
}
- if (currentmode->flags & DM_SWSCALE) {
+ if ((currentmode->flags & DM_SWSCALE) && !screen_is_picasso) {
S2X_init (currentmode->native_width, currentmode->native_height, currentmode->native_depth);
}
return true;
SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_RESETCONTENT, 0, 0);
SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T("Select"));
+ SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T("140%"));
+ SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T("130%"));
+ SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T("120%"));
SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T("110%"));
SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T("100%"));
SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T(" 90%"));
SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T(" 80%"));
+ SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T(" 70%"));
+ SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T(" 60%"));
SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_SETCURSEL, 0, 0);
}
v = GUI_SCALE_DEFAULT;
} else {
v--;
- v = 110 - v * 10;
+ v = 140 - v * 10;
+ }
+ double m = scaleresource_getdpimult ();
+ gui_width = (int)(GUI_INTERNAL_WIDTH * m * v / 100);
+ gui_height = (int)(GUI_INTERNAL_HEIGHT * m * v / 100);
+ if (gui_width < MIN_GUI_INTERNAL_WIDTH || gui_height < MIN_GUI_INTERNAL_HEIGHT) {
+ gui_width = MIN_GUI_INTERNAL_WIDTH;
+ gui_height = MIN_GUI_INTERNAL_HEIGHT;
}
- //double m = scaleresource_getdpimult ();
- gui_width = (int)(GUI_INTERNAL_WIDTH * v / 100);
- gui_height = (int)(GUI_INTERNAL_HEIGHT * v / 100);
scaleresource_setmult (guiDlg, gui_width, gui_height);
gui_size_changed = 1;
}
write_log (_T("GUI default size\n"));
regsetint (NULL, _T("GUIResize"), 0);
} else {
- if (gui_width < 100 || gui_width > 4096 || gui_height < 100 || gui_height > 4096) {
+ if (gui_width < MIN_GUI_INTERNAL_WIDTH || gui_width > 4096 || gui_height < MIN_GUI_INTERNAL_HEIGHT || gui_height > 4096) {
scaleresource_setdefaults ();
setdefaultguisize ();
fmultx = 0;
nr = getresource (IDD_PANEL);
if (!nr) {
- write_log (_T("getbaseunits fail\n"));
+ write_log (_T("getbaseunits fail!\n"));
abort();
}
multx = multy = 100;
nr2 = scaleresource (nr, NULL, -1);
hwnd = CreateDialogIndirect (nr2->inst, nr2->resource, NULL, TestProc);
if (hwnd) {
- DestroyWindow(hwnd);
+ DestroyWindow (hwnd);
} else {
baserect.left = baserect.top = 0;
baserect.right = 800;
baseclientheight = baseclientrect.bottom - baseclientrect.top;
baseborderwidth = basewidth - baseclientwidth;
baseborderheight = baseheight - baseclientheight;
+
+ write_log (_T("GUIBase %dx%d (%dx%d)\n"), basewidth, baseheight, baseunitx, baseunity);
}
void scaleresource_init (const TCHAR *prefix)
}
#endif
+double scaleresource_getdpimult (void)
+{
+ return (double)baseheight / GUI_INTERNAL_HEIGHT;
+}
+
void scaleresource_setmult (HWND hDlg, int w, int h)
{
if (w < 0) {
- restore only single input target to default.
+Beta 26 RC2:
+
+- RTG aspect ratio setting was loaded to wrong variable from config file (filter panel aspect ratio, not RTG)
+- CD32 CD audio play delay timing fixed. (Was originally timed using bad Liberation CD image)
+- RTG on screen leds was rendered twice in D3D mode (D3D sprite and software method).
+- Audio 14bit to 16bit scaling introduced extra low level noise.
+- Only enable AUDxPER limit hack (to reduce CPU usage with weird programs) if audio DMA is active. Manual AUDxDAT audio software may use higher periods.
+- Fixed rare crash in input/gameports panel test/remap support.
+- Added on screen leds per-led enable/disable config file support, for example show_leds_enabled/show_leds_enabled_rtg=power,df0,df1.
+ In future versions order of led names are also supported and gaps in place of disabled leds will be gone.
+- DPI GUI size compensation disappeared (b25).
+
Beta 25 RC1:
- Switching to interlaced mode and autoscale enabled: don't calculate new size until 2 frames have been drawn to prevent multiple display size changes.
xcolnr on_rgb, on_rgb2, off_rgb, pen_rgb;
int half = 0;
+ if (!(currprefs.leds_on_screen_mask[picasso_on ? 1 : 0] & (1 << led)))
+ continue;
+
pen_rgb = c1;
if (led >= LED_DF0 && led <= LED_DF3) {
int pled = led - LED_DF0;