L"gfx_immediate_blits", L"gfx_ntsc", L"win32", L"gfx_filter_bits",
L"sound_pri_cutoff", L"sound_pri_time", L"sound_min_buff", L"sound_bits",
L"gfx_test_speed", L"gfxlib_replacement", L"enforcer", L"catweasel_io",
- L"kickstart_key_file", L"fast_copper", L"sound_adjust",
+ L"kickstart_key_file", L"fast_copper", L"sound_adjust", L"sound_latency",
L"serial_hardware_dtrdsr", L"gfx_filter_upscale",
L"gfx_correct_aspect", L"gfx_autoscale", L"parallel_sampler", L"parallel_ascii_emulation",
L"avoid_vid", L"avoid_dga", L"z3chipmem_size", L"state_replay_buffer", L"state_replay",
cfgfile_write (f, L"sound_stereo_mixing_delay", L"%d", p->sound_mixed_stereo_delay >= 0 ? p->sound_mixed_stereo_delay : 0);
cfgfile_write (f, L"sound_max_buff", L"%d", p->sound_maxbsiz);
cfgfile_write (f, L"sound_frequency", L"%d", p->sound_freq);
- cfgfile_write (f, L"sound_latency", L"%d", p->sound_latency);
cfgfile_write_str (f, L"sound_interpol", interpolmode[p->sound_interpol]);
cfgfile_write_str (f, L"sound_filter", soundfiltermode1[p->sound_filter]);
cfgfile_write_str (f, L"sound_filter_type", soundfiltermode2[p->sound_filter_type]);
cfgfile_dwrite_bool (f, L"agnus_bltbusybug", p->cs_agnusbltbusybug);
cfgfile_dwrite_bool (f, L"ics_agnus", p->cs_dipagnus);
- cfgfile_dwrite_bool (f, L"autoconfig", p->autoconfig);
+ cfgfile_dwrite_bool (f, L"fastmem_autoconfig", p->fastmem_autoconfig);
cfgfile_write (f, L"fastmem_size", L"%d", p->fastmem_size / 0x100000);
cfgfile_dwrite (f, L"fastmem2_size", L"%d", p->fastmem2_size / 0x100000);
cfgfile_write (f, L"a3000mem_size", L"%d", p->mbresmem_low_size / 0x100000);
}
}
- if (cfgfile_intval (option, value, L"sound_frequency", &p->sound_freq, 1)) {
- /* backwards compatibility */
- p->sound_latency = 1000 * (p->sound_maxbsiz >> 1) / p->sound_freq;
- return 1;
- }
-
if (cfgfile_strval (option, value, L"gfx_autoresolution_min_vertical", &p->gfx_autoresolution_minv, vertmode, 0)) {
p->gfx_autoresolution_minv--;
return 1;
return 1;
}
- if (cfgfile_intval (option, value, L"sound_latency", &p->sound_latency, 1)
+ if (cfgfile_intval (option, value, L"sound_frequency", &p->sound_freq, 1)
|| cfgfile_intval (option, value, L"sound_max_buff", &p->sound_maxbsiz, 1)
|| cfgfile_intval (option, value, L"state_replay_rate", &p->statecapturerate, 1)
|| cfgfile_intval (option, value, L"state_replay_buffers", &p->statecapturebuffersize, 1)
|| cfgfile_yesno (option, value, L"denise_noehb", &p->cs_denisenoehb)
|| cfgfile_yesno (option, value, L"ics_agnus", &p->cs_dipagnus)
|| cfgfile_yesno (option, value, L"agnus_bltbusybug", &p->cs_agnusbltbusybug)
- || cfgfile_yesno (option, value, L"autoconfig", &p->autoconfig)
+ || cfgfile_yesno (option, value, L"fastmem_autoconfig", &p->fastmem_autoconfig)
|| cfgfile_yesno (option, value, L"kickshifter", &p->kickshifter)
|| cfgfile_yesno (option, value, L"ntsc", &p->ntscmode)
p->sound_mixed_stereo_delay = 0;
p->sound_freq = DEFAULT_SOUND_FREQ;
p->sound_maxbsiz = DEFAULT_SOUND_MAXB;
- p->sound_latency = 100;
p->sound_interpol = 1;
p->sound_filter = FILTER_SOUND_EMUL;
p->sound_filter_type = 0;
p->color_mode = 2;
p->gfx_blackerthanblack = 0;
p->gfx_apmode[0].gfx_backbuffers = 2;
- p->gfx_apmode[1].gfx_backbuffers = 2;
+ p->gfx_apmode[1].gfx_backbuffers = 1;
p->immediate_blits = 0;
p->waiting_blits = 0;
p->custom_memory_sizes[0] = 0;
p->custom_memory_addrs[1] = 0;
p->custom_memory_sizes[1] = 0;
- p->autoconfig = true;
+ p->fastmem_autoconfig = true;
p->nr_floppies = 2;
p->floppy_read_only = false;
p->cs_ramseyrev = 0x0f;
p->cs_ide = IDE_A4000;
p->cs_mbdmac = 0;
- p->cs_ksmirror_a8 = 1;
+ p->cs_ksmirror_a8 = 0;
+ p->cs_ksmirror_e0 = 0;
p->cs_ciaoverlay = 0;
break;
case CP_A4000T: // A4000T
p->cs_ramseyrev = 0x0f;
p->cs_ide = IDE_A4000;
p->cs_mbdmac = 2;
- p->cs_ksmirror_a8 = 1;
+ p->cs_ksmirror_a8 = 0;
+ p->cs_ksmirror_e0 = 0;
p->cs_ciaoverlay = 0;
break;
}
if (vs == -2 || vs == -3) {
// fastest possible
curr_time = vsync_busywait_end ();
- vsync_busywait_do (NULL, interlace_seen != 0, lof_store != 0);
+ vsync_busywait_do (NULL, (bplcon0 & 4) != 0 && !lof_changed && !lof_changing, lof_store != 0);
curr_time = read_processor_time ();
vsyncmintime = curr_time + vsynctime;
vsync_busywait_start ();
render_screen ();
bool show = show_screen_maybe (false);
- vsync_busywait_do (&freetime, interlace_seen != 0, lof_store != 0);
+ vsync_busywait_do (&freetime, (bplcon0 & 4) != 0 && !lof_changed && !lof_changing, lof_store != 0);
curr_time = read_processor_time ();
vsyncmintime = curr_time + vsynctime;
if (!show) {
uaecptr pt = disk_getpt ();
// disk_fifostatus() needed in >100% disk speed modes
if (w) {
+ // write to disk
if (disk_fifostatus () <= 0) {
dat = chipmem_wget_indirect (pt);
last_custom_value1 = dat;
DSKDAT (dat);
}
} else {
+ // read from disk
if (disk_fifostatus () >= 0) {
dat = DSKDATR ();
chipmem_wput_indirect (pt, dat);
} else if (currprefs.gfx_vresolution && (doublescan <= 0 || interlace_seen > 0)) {
lineno *= 2;
nextline_how = currprefs.gfx_vresolution > VRES_NONDOUBLE && currprefs.gfx_scanlines == false ? nln_doubled : nln_nblack;
- if ((bplcon0 & 4) || (interlace_seen > 0 && !lof_current)) {
+ if (interlace_seen) {
if (!lof_current) {
lineno++;
nextline_how = nln_lower;
#define FLOPPY_WRITE_MAXLEN 0x3800
/* This works out to 350 */
#define FLOPPY_GAP_LEN (FLOPPY_WRITE_LEN - 11 * 544)
-/* (cycles/bitcell) << 8, normal = ((2us/280ns)<<8) = ~1829.5714 */
-#define NORMAL_FLOPPY_SPEED (currprefs.ntscmode ? 1811 : 1829)
+/* (cycles/bitcell) << 8, normal = ((2us/280ns)<<8) = ~1828.5714 */
+#define NORMAL_FLOPPY_SPEED (currprefs.ntscmode ? 1812 : 1829)
/* max supported floppy drives, for small memory systems */
#define MAX_FLOPPY_DRIVES 4
uae_u32 odd, even, chksum, id, dlong;
uae_u8 *secdata;
uae_u8 secbuf[544];
- uae_u16 *mend = mbuf + length;
+ uae_u16 *mend = mbuf + length, *mstart;
int shift = 0;
memset (sectable, 0, MAX_SECTORS * sizeof (int));
+ mstart = mbuf;
memcpy (mbuf + fwlen, mbuf, fwlen * sizeof (uae_u16));
mend -= (4 + 16 + 8 + 512);
while (secwritten < drvsec) {
trackoffs = (id & 0xff00) >> 8;
if (trackoffs + 1 > drvsec) {
- write_log (L"Disk decode: weird sector number %d (%04x)\n", trackoffs, id);
+ write_log (L"Disk decode: weird sector number %d (%08X, %d)\n", trackoffs, id, mbuf - mstart);
if (filetype == ADF_EXT2)
return 2;
continue;
dskpt += 2;
}
}
- uae_u16 w = DSKDATR ();
- for (dr = 0; dr < MAX_FLOPPY_DRIVES ; dr++) {
- drive *drv2 = &floppy[dr];
- if (drives[dr]) {
- drv2->bigmfmbuf[drv2->mfmpos >> 4] = w;
- drv2->bigmfmbuf[(drv2->mfmpos >> 4) + 1] = 0x5555;
- drv2->writtento = 1;
+ if (disk_fifostatus () >= 0) {
+ uae_u16 w = DSKDATR ();
+ for (dr = 0; dr < MAX_FLOPPY_DRIVES ; dr++) {
+ drive *drv2 = &floppy[dr];
+ if (drives[dr]) {
+ drv2->bigmfmbuf[drv2->mfmpos >> 4] = w;
+ drv2->bigmfmbuf[(drv2->mfmpos >> 4) + 1] = 0x5555;
+ drv2->writtento = 1;
+ }
+ #ifdef AMAX
+ if (currprefs.amaxromfile[0])
+ amax_diskwrite (w);
+ #endif
}
-#ifdef AMAX
- if (currprefs.amaxromfile[0])
- amax_diskwrite (w);
-#endif
- }
- dsklength--;
- if (dsklength <= 0) {
- disk_dmafinished ();
- for (int dr = 0; dr < MAX_FLOPPY_DRIVES ; dr++) {
- drive *drv = &floppy[dr];
- drv->writtento = 0;
- if (drv->motoroff)
- continue;
- if (selected & (1 << dr))
- continue;
- drive_write_data (drv);
+ dsklength--;
+ if (dsklength <= 0) {
+ disk_dmafinished ();
+ for (int dr = 0; dr < MAX_FLOPPY_DRIVES ; dr++) {
+ drive *drv = &floppy[dr];
+ drv->writtento = 0;
+ if (drv->motoroff)
+ continue;
+ if (selected & (1 << dr))
+ continue;
+ drive_write_data (drv);
+ }
}
}
}
return 0;
}
-static bool doreaddma (void)
+static int doreaddma (void)
{
if (dmaen (DMA_DISK) && bitoffset == 15 && dma_enable && dskdmaen == DSKDMA_READ && dsklength >= 0) {
if (dsklength > 0) {
// DSKLEN == 1: finish without DMA transfer.
if (dsklength == 1 && dsklength2 == 1) {
disk_dmafinished ();
- return false;
+ return 0;
}
// fast disk modes, just flush the fifo
if (currprefs.floppy_speed > 100 && fifo_inuse[0] && fifo_inuse[1] && fifo_inuse[2]) {
dskpt += 2;
}
}
- DSKDAT (word);
- dsklength--;
+ if (disk_fifostatus () > 0) {
+ write_log (L"doreaddma() fifo overflow detected, retrying..\n");
+ return -1;
+ } else {
+ DSKDAT (word);
+ dsklength--;
+ }
}
- return true;
+ return 1;
}
- return false;
+ return 0;
}
static void disk_doupdate_read_nothing (int floppybits)
mfmbuf[7] = 0x4444;
*/
while (floppybits >= drv->trackspeed) {
+ int oldmfmpos = drv->mfmpos;
if (drv->tracktiming[0])
updatetrackspeed (drv, drv->mfmpos);
word <<= 1;
drv->mfmpos += disk_jitter;
drv->mfmpos %= drv->tracklen;
}
- doreaddma ();
+ if (doreaddma () < 0) {
+ drv->mfmpos = oldmfmpos;
+ return;
+ }
if ((bitoffset & 7) == 7) {
dskbytr_val = word & 0xff;
dskbytr_val |= 0x8000;
if (interlace_seen == 0) {
frame_redraw_necessary = 2;
changed = true;
- write_log (L"->lace\n");
+ write_log (L"->lace PC=%x\n", m68k_getpc ());
}
interlace_seen = currprefs.gfx_vresolution ? 1 : -1;
} else {
if (interlace_seen) {
changed = true;
- write_log (L"->non-lace\n");
+ write_log (L"->non-lace PC=%x\n", m68k_getpc ());
}
interlace_seen = 0;
}
allocate_expamem ();
expamem_bank.name = L"Autoconfig [reset]";
- if (!currprefs.autoconfig)
- do_mount = 0;
/* check if Kickstart version is below 1.3 */
if (kickstart_version && do_mount
&& (/* Kickstart 1.0 & 1.1! */
|| kickstart_version < 34))
{
/* warn user */
- write_log (L"Kickstart version is below 1.3! Disabling autoconfig devices.\n");
+ write_log (L"Kickstart version is below 1.3! Disabling automount devices.\n");
do_mount = 0;
}
if (need_uae_boot_rom () == 0)
do_mount = 0;
if (fastmemory != NULL && currprefs.chipmem_size <= 2 * 1024 * 1024) {
+ if (currprefs.fastmem_autoconfig) {
+ fastmem_bank.name = L"Fast memory";
card_name[cardno] = L"Z2Fast";
card_init[cardno] = expamem_init_fastcard;
card_map[cardno++] = expamem_map_fastcard;
- if (!currprefs.autoconfig || !do_mount)
+ } else {
+ fastmem_bank.name = L"Fast memory (non-autoconfig)";
map_banks (&fastmem_bank, 0x00200000 >> 16, allocated_fastmem >> 16, 0);
+ }
}
#ifdef CDTV
int sound_mixed_stereo_delay;
int sound_freq;
int sound_maxbsiz;
- int sound_latency;
int sound_interpol;
int sound_filter;
int sound_filter_type;
uae_u32 z3chipmem_size;
uae_u32 z3chipmem_start;
uae_u32 fastmem_size, fastmem2_size;
+ bool fastmem_autoconfig;
uae_u32 chipmem_size;
uae_u32 bogomem_size;
uae_u32 mbresmem_low_size;
int rtgmem_type;
uae_u32 custom_memory_addrs[MAX_CUSTOM_MEMORY_ADDRS];
uae_u32 custom_memory_sizes[MAX_CUSTOM_MEMORY_ADDRS];
- bool autoconfig;
bool kickshifter;
bool filesys_no_uaefsdb;
} else {
newport = num ? 1 : 0;
}
- if (currprefs.input_selected_setting == GAMEPORT_INPUT_SETTINGS) {
+ /* "GamePorts" switch if in GamePorts mode or Input mode and GamePorts port was not NONE */
+ if (currprefs.input_selected_setting == GAMEPORT_INPUT_SETTINGS || currprefs.jports[newport].id != JPORT_NONE) {
if ((num == 0 || num == 1) && currprefs.jports[newport].id != JPORT_CUSTOM) {
int om = jsem_ismouse (num, &currprefs);
int om1 = jsem_ismouse (0, &currprefs);
ap->gfx_vflip = true;
}
} else {
- // no vsync: wait if tripple bufferirng
+ // no vsync: wait if triple bufferirng
if (ap->gfx_backbuffers >= 2)
ap->gfx_vflip = true;
}
bnk = 0x20 + (currprefs.fastmem_size >> 16);
bnk_end = gayle ? 0xBF : 0xA0;
map_banks (&dummy_bank, bnk, bnk_end - bnk, 0);
- if (gayle)
- map_banks (&dummy_bank, 0xc0, 0xd8 - 0xc0, 0);
+ if (gayle) {
+ // a4000 = custom chips from 0xc0 to 0xd0
+ if (currprefs.cs_ide == IDE_A4000)
+ map_banks (&dummy_bank, 0xd0, 8, 0);
+ else
+ map_banks (&dummy_bank, 0xc0, 0xd8 - 0xc0, 0);
+ }
if (bogomemory != 0) {
int t = currprefs.bogomem_size >> 16;
v -= logicalrange + vcaps->LogicalMin;
- if (axisnum == 0)
- write_log (L"%d\n", v);
-
data = v;
digitalrange = logicalrange * 2 / 3;
#define IDC_DF0WPTEXTQ 1793
#define IDC_WINDOWEDMODE 1793
#define IDC_DF1WPTEXTQ 1794
-#define IDC_RTG_8BIT2 1794
#define IDC_RTG_Z2Z3 1794
+#define IDC_RTG_BACKBUFFERS 1795
+#define IDC_RTG_BUFFERCNT 1795
#define IDC_INPUTMAPLIST 1797
#define IDC_PORT1_REMAP 1798
#define IDC_PORT0_REMAP 1799
#define IDC_CD_TEXT 1805
#define IDC_CD_TYPE 1806
#define IDC_CD_SELECT 1807
+#define IDC_FASTMEMAUTOCONFIG 1808
#define ID__FLOPPYDRIVES 40004
#define ID_FLOPPYDRIVES_DF0 40005
#define ID_ST_CONFIGURATION 40010
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 370
#define _APS_NEXT_COMMAND_VALUE 40050
-#define _APS_NEXT_CONTROL_VALUE 1808
+#define _APS_NEXT_CONTROL_VALUE 1809
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
RTEXT "Chip:",IDC_STATIC,19,25,32,15,SS_CENTERIMAGE\r
RTEXT "Slow:",IDC_STATIC,144,25,32,15,SS_CENTERIMAGE\r
RTEXT "Z3 Fast:",IDC_STATIC,144,49,32,15,SS_CENTERIMAGE\r
- RTEXT "32-bit Chip:",IDC_STATIC,99,73,78,15,SS_CENTERIMAGE\r
+ RTEXT "32-bit Chip:",IDC_STATIC,136,74,41,15,SS_CENTERIMAGE\r
CONTROL "",IDC_Z3CHIPMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,179,71,60,20\r
EDITTEXT IDC_Z3CHIPRAM,243,76,34,12,ES_CENTER | ES_READONLY\r
+ CONTROL "Autoconfig Fast RAM",IDC_FASTMEMAUTOCONFIG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,29,76,101,10\r
END\r
\r
IDD_CPU DIALOGEX 0, 0, 300, 241\r
STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
FONT 8, "MS Sans Serif", 0, 0, 0x1\r
BEGIN\r
- RTEXT "Memory: [] Graphics card memory. Required for RTG (Picasso96) emulation.",IDC_GFXCARDTEXT,25,44,53,10,SS_NOTIFY | SS_CENTERIMAGE\r
- CONTROL "",IDC_P96MEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,88,40,60,20\r
- EDITTEXT IDC_P96RAM,152,43,34,12,ES_CENTER | ES_READONLY\r
- GROUPBOX "RTG Graphics Card",IDC_STATIC,5,12,291,113\r
+ RTEXT "Memory: [] Graphics card memory. Required for RTG (Picasso96) emulation.",IDC_GFXCARDTEXT,25,35,53,10,SS_NOTIFY | SS_CENTERIMAGE\r
+ CONTROL "",IDC_P96MEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,88,31,60,20\r
+ EDITTEXT IDC_P96RAM,152,34,34,12,ES_CENTER | ES_READONLY\r
+ GROUPBOX "RTG Graphics Card",IDC_STATIC,5,1,291,124\r
CONTROL "Scale if smaller than display size setting",IDC_RTG_SCALE,\r
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,74,162,10\r
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,65,162,10\r
CONTROL "Match host and RTG color depth if possible",IDC_RTG_MATCH_DEPTH,\r
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,62,163,10\r
- COMBOBOX IDC_RTG_8BIT,211,41,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_RTG_16BIT,211,56,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_RTG_24BIT,211,71,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_RTG_32BIT,211,86,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,53,163,10\r
+ COMBOBOX IDC_RTG_8BIT,211,21,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+ COMBOBOX IDC_RTG_16BIT,211,36,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+ COMBOBOX IDC_RTG_24BIT,211,51,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+ COMBOBOX IDC_RTG_32BIT,211,66,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
CONTROL "Always scale in windowed mode",IDC_RTG_SCALE_ALLOW,\r
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,86,162,10\r
- COMBOBOX IDC_RTG_SCALE_ASPECTRATIO,211,106,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- RTEXT "Aspect ratio:",IDC_STATIC,153,107,52,10,SS_CENTERIMAGE\r
- RTEXT "Refresh rate:",IDC_STATIC,22,108,51,10,SS_CENTERIMAGE\r
- COMBOBOX IDC_RTG_VBLANKRATE,77,106,68,150,CBS_DROPDOWN | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,77,162,10\r
+ COMBOBOX IDC_RTG_SCALE_ASPECTRATIO,211,108,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+ CTEXT "Aspect ratio:",IDC_STATIC,215,95,60,10,SS_CENTERIMAGE\r
+ CTEXT "Refresh rate:",IDC_STATIC,28,95,64,10,SS_CENTERIMAGE\r
+ COMBOBOX IDC_RTG_VBLANKRATE,24,108,68,150,CBS_DROPDOWN | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
CONTROL "bsdsocket.library [] bsdsocket network library emulation.",IDC_SOCKETS,\r
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,148,120,10\r
CONTROL "uaenet.device [] Sana 2 compatible network device emulation. WinPcap required.",IDC_SANA2,\r
CONTROL "Catweasel Z2 emulation [] Catweasel MK2 Zorro II card emulation. Physical Windows compatible Catweasel card and drivers required.",IDC_CATWEASEL,\r
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,148,101,10\r
GROUPBOX "Miscellaneous Expansions",IDC_STATIC,5,130,117,66\r
- COMBOBOX IDC_RTG_Z2Z3,211,21,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+ COMBOBOX IDC_RTG_Z2Z3,26,14,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+ CTEXT "Buffer mode:",IDC_STATIC,112,95,81,10,SS_CENTERIMAGE\r
+ COMBOBOX IDC_RTG_BUFFERCNT,111,108,84,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+ CTEXT "Color modes:",IDC_STATIC,215,9,62,10,SS_CENTERIMAGE\r
END\r
\r
IDD_INPUTMAP DIALOGEX 0, 0, 300, 240\r
IDS_SELECTFILESYSROOT "Please select the root directory of the file system..."\r
IDS_DEFAULTMIDIOUT "Default MIDI-Out Device"\r
IDS_CONTRIBUTORS1 "Bernd Schmidt - The Grand-Master\nSam Jordan - Custom-chip, floppy-DMA, etc.\nMathias Ortmann - Original WinUAE Main Guy, BSD Socket support\nBrian King - Picasso96 Support, Integrated GUI for WinUAE, previous WinUAE Main Guy\nToni Wilen - Core updates, WinUAE Main Guy\nGustavo Goedert/Peter Remmers/Michael Sontheimer/Tomi Hakala/Tim Gunn/Nemo Pohle - DOS Port Stuff\nSamuel Devulder/Olaf Barthel/Sam Jordan - Amiga Ports\nKrister Bergman - XFree86 and OS/2 Port\nA. Blanchard/Ernesto Corvi - MacOS Port\nChristian Bauer - BeOS Port\nIan Stephenson - NextStep Port\nPeter Teichmann - Acorn/RiscOS Port\nStefan Reinauer - ZorroII/III AutoConfig, Serial Support\nChristian Schmitt/Chris Hames - Serial Support\nHerman ten Brugge - 68020/68881 Emulation Code\nTauno Taipaleenmaki - Various UAE-Control/UAE-Library Support\nBrett Eden/Tim Gunn/Paolo Besser/Nemo Pohle - Various Docs and Web-Sites\nGeorg Veichtlbauer - Help File coordinator, German GUI\nFulvio Leonardi - Italian translator for WinUAE\n"\r
- IDS_CONTRIBUTORS2 "Bill Panagouleas - Hardware support\nSpecial thanks to Alexander Kneer and Tobias Abt (The Picasso96 Team)\nSteven Weiser - Postscript printing emulation idea and testing.\nPéter Tóth /Balázs Rátkai/Iván Herczeg/András Arató - Hungarian translation.\nKarsten Bock, Gavin Fance, Dirk Trowe and Christian Schindler - Freezer cartridge hardware support.\nMikko Nieminen - Demo compatibility testing.\nArabuusimiehet - [This information is on a need-to-know basis]"\r
+ IDS_CONTRIBUTORS2 "Arnljot Arntsen, Bill Panagouleas, Cloanto - Hardware support\nSpecial thanks to Alexander Kneer and Tobias Abt (The Picasso96 Team)\nSteven Weiser - Postscript printing emulation idea and testing.\nPéter Tóth /Balázs Rátkai/Iván Herczeg/András Arató - Hungarian translation.\nKarsten Bock, Gavin Fance, Dirk Trowe and Christian Schindler - Freezer cartridge hardware support.\nMikko Nieminen - Demo compatibility testing.\nArabuusimiehet - [This information is on a need-to-know basis]"\r
IDS_INVALIDPRTPORT "The printer you have in this configuration is not valid on this machine.\n"\r
IDS_RESTOREUSS "Restore a WinUAE snapshot file"\r
IDS_USS "WinUAE snapshot files"\r
stereo would have been enabled and we'd have done the shift by
two anyway). */
size >>= 2;
- if (size & (size - 1))
- size = DEFAULT_SOUND_MAXB;
+ size &= ~63;
if (size < 64)
size = 64;
dx_check ();
break;
case WM_ACTIVATE:
+ //write_log (L"active %d\n", LOWORD(wParam));
if (LOWORD (wParam) == WA_INACTIVE) {
minimized = HIWORD (wParam) ? 1 : 0;
winuae_inactive (hWnd, minimized);
switch (wParam & 0xfff0)
{
case SC_MINIMIZE:
+ winuae_inactive (hWnd, 1);
break;
case SC_RESTORE:
break;
L"sound_sync", L"sound_tweak", L"directx6", L"sound_style",
L"file_path", L"iconified_nospeed", L"activepriority", L"magic_mouse",
L"filesystem_codepage", L"aspi", L"no_overlay", L"soundcard_exclusive",
- L"specialkey",
+ L"specialkey", L"sound_speed_tweak", L"sound_lag",
0
};
#define LANG_DLL 1
//#define WINUAEBETA L""
-#define WINUAEBETA L"Beta 17"
-#define WINUAEDATE MAKEBD(2012, 2, 15)
+#define WINUAEBETA L"Beta 18"
+#define WINUAEDATE MAKEBD(2012, 2, 22)
#define WINUAEEXTRA L""
//#define WINUAEEXTRA L"AmiKit Preview"
#define WINUAEREV L""
static int frame_missed, frame_counted, frame_errors;
static int frame_usage, frame_usage_avg, frame_usage_total;
extern int log_vsync;
+static bool dooddevenskip;
bool vsync_busywait_check (void)
{
frame_time_t vsync_busywait_end (void)
{
- vsync_notvblank ();
- while (!vblank_found && vblankthread_mode == VBLANKTH_ACTIVE) {
- vsync_sleep (false);
+ if (!dooddevenskip) {
+ vsync_notvblank ();
+ while (!vblank_found && vblankthread_mode == VBLANKTH_ACTIVE) {
+ vsync_sleep (false);
+ }
}
changevblankthreadmode (VBLANKTH_ACTIVE_WAIT);
return thread_vblank_time;
void vsync_busywait_start (void)
{
- vsync_notvblank ();
+ if (!dooddevenskip) {
+ vsync_notvblank ();
+ }
changevblankthreadmode (VBLANKTH_ACTIVE_START);
vblank_prev_time = thread_vblank_time;
}
frame_time_t t;
frame_time_t prevtime = vblank_prev_time;
+ dooddevenskip = false;
+
if (lace)
vblankbaselace_chipset = oddeven;
else
return true;
}
- if (vblanklaceskip ())
+ if (vblanklaceskip ()) {
doskip = true;
+ dooddevenskip = true;
+ }
if (!doskip) {
while (!framelost && read_processor_time () - prevtime < vblankbasewait) {
#define MIN_REFRESH_RATE 1
#define MAX_REFRESH_RATE 10
#define MIN_SOUND_MEM 0
-#define MAX_SOUND_MEM 6
+#define MAX_SOUND_MEM 9
struct romscandata {
UAEREG *fkey;
TCHAR name[MAX_DPATH], desc[MAX_DPATH];
TCHAR path[MAX_DPATH];
static TCHAR full_path[MAX_DPATH];
+ int ok = 1;
full_path[0] = 0;
name[0] = 0;
switch (flag)
{
case CONFIG_SAVE_FULL:
- DiskSelection(hDlg, IDC_SAVE, 5, &workprefs, newpath);
+ ok = DiskSelection(hDlg, IDC_SAVE, 5, &workprefs, newpath);
break;
case CONFIG_LOAD_FULL:
- DiskSelection(hDlg, IDC_LOAD, 4, &workprefs, newpath);
- EnableWindow(GetDlgItem (hDlg, IDC_VIEWINFO), workprefs.info[0]);
+ if ((ok = DiskSelection(hDlg, IDC_LOAD, 4, &workprefs, newpath)))
+ EnableWindow(GetDlgItem (hDlg, IDC_VIEWINFO), workprefs.info[0]);
break;
case CONFIG_SAVE:
WIN32GUI_LoadUIString (IDS_COULDNOTLOADCONFIG, szMessage, MAX_DPATH);
pre_gui_message (szMessage);
config_filename[0] = 0;
+ ok = 0;
} else {
ew (hDlg, IDC_VIEWINFO, workprefs.info[0]);
}
DeleteFile (path);
write_log (L"deleted config '%s'\n", path);
config_filename[0] = 0;
+ } else {
+ ok = 0;
}
}
break;
}
setguititle (NULL);
- return full_path;
+ return ok ? full_path : NULL;
}
switch (LOWORD (wParam))
{
case IDC_SAVE:
- HandleConfiguration (hDlg, CONFIG_SAVE_FULL, config, newpath);
- DeleteConfigTree (hDlg);
- config = CreateConfigStore (config, TRUE);
- ConfigToRegistry (config, configtypepanel);
- config = initloadsave (hDlg, config);
- InitializeConfig (hDlg, config);
+ if (HandleConfiguration (hDlg, CONFIG_SAVE_FULL, config, newpath)) {
+ DeleteConfigTree (hDlg);
+ config = CreateConfigStore (config, TRUE);
+ ConfigToRegistry (config, configtypepanel);
+ config = initloadsave (hDlg, config);
+ InitializeConfig (hDlg, config);
+ }
break;
case IDC_QUICKSAVE:
- HandleConfiguration (hDlg, CONFIG_SAVE, config, NULL);
- DeleteConfigTree (hDlg);
- config = CreateConfigStore (config, TRUE);
- ConfigToRegistry (config, configtypepanel);
- config = initloadsave (hDlg, config);
- InitializeConfig (hDlg, config);
+ if (HandleConfiguration (hDlg, CONFIG_SAVE, config, NULL)) {
+ DeleteConfigTree (hDlg);
+ config = CreateConfigStore (config, TRUE);
+ ConfigToRegistry (config, configtypepanel);
+ config = initloadsave (hDlg, config);
+ InitializeConfig (hDlg, config);
+ }
break;
case IDC_QUICKLOAD:
*pcfgfile = HandleConfiguration (hDlg, CONFIG_LOAD, config, NULL);
- ConfigToRegistry (config, configtypepanel);
- InitializeConfig (hDlg, config);
- if (full_property_sheet) {
- inputdevice_updateconfig (&workprefs);
- } else {
- uae_restart (-1, *pcfgfile);
- exit_gui(1);
+ if (*pcfgfile) {
+ ConfigToRegistry (config, configtypepanel);
+ InitializeConfig (hDlg, config);
+ if (full_property_sheet) {
+ inputdevice_updateconfig (&workprefs);
+ } else {
+ uae_restart (-1, *pcfgfile);
+ exit_gui(1);
+ }
}
break;
case IDC_LOAD:
*pcfgfile = HandleConfiguration (hDlg, CONFIG_LOAD_FULL, config, newpath);
- ConfigToRegistry (config, configtypepanel);
- InitializeConfig (hDlg, config);
- if (full_property_sheet) {
- inputdevice_updateconfig (&workprefs);
- } else {
- uae_restart (-1, *pcfgfile);
- exit_gui(1);
+ if (*pcfgfile) {
+ ConfigToRegistry (config, configtypepanel);
+ InitializeConfig (hDlg, config);
+ if (full_property_sheet) {
+ inputdevice_updateconfig (&workprefs);
+ } else {
+ uae_restart (-1, *pcfgfile);
+ exit_gui(1);
+ }
}
break;
case IDC_DELETE:
- HandleConfiguration (hDlg, CONFIG_DELETE, config, NULL);
- DeleteConfigTree (hDlg);
- config = CreateConfigStore (config, TRUE);
- config = initloadsave (hDlg, config);
- InitializeConfig (hDlg, config);
+ if (HandleConfiguration (hDlg, CONFIG_DELETE, config, NULL)) {
+ DeleteConfigTree (hDlg);
+ config = CreateConfigStore (config, TRUE);
+ config = initloadsave (hDlg, config);
+ InitializeConfig (hDlg, config);
+ }
break;
case IDC_VIEWINFO:
if (workprefs.info[0]) {
struct ConfigStruct *config = (struct ConfigStruct*)pitem.lParam;
if (config && !config->Directory) {
cfgfile = HandleConfiguration (hDlg, CONFIG_LOAD, config, NULL);
- ConfigToRegistry (config, configtypepanel);
- if (!full_property_sheet)
- uae_restart (0, cfgfile);
- exit_gui (1);
+ if (cfgfile) {
+ ConfigToRegistry (config, configtypepanel);
+ if (!full_property_sheet)
+ uae_restart (0, cfgfile);
+ exit_gui (1);
+ }
}
}
}
ew (hDlg, IDC_Z3CHIPMEM, z3);
ew (hDlg, IDC_FASTMEM, fast);
ew (hDlg, IDC_FASTRAM, fast);
+ ew (hDlg, IDC_FASTMEMAUTOCONFIG, fast);
ew (hDlg, IDC_FASTTEXT, fast);
ew (hDlg, IDC_GFXCARDTEXT, z3);
ew (hDlg, IDC_P96RAM, z3);
ew (hDlg, IDC_RTG_SCALE_ALLOW, rtg2);
ew (hDlg, IDC_RTG_SCALE_ASPECTRATIO, rtg2);
ew (hDlg, IDC_RTG_VBLANKRATE, rtg2);
+ ew (hDlg, IDC_RTG_BUFFERCNT, rtg2);
}
static int manybits (int v, int mask)
CheckDlgButton (hDlg, IDC_SCSIDEVICE, workprefs.scsi == 1);
CheckDlgButton (hDlg, IDC_SANA2, workprefs.sana2);
CheckDlgButton (hDlg, IDC_A2065, workprefs.a2065name[0] ? 1 : 0);
+ SendDlgItemMessage (hDlg, IDC_RTG_BUFFERCNT, CB_SETCURSEL, workprefs.gfx_apmode[1].gfx_backbuffers == 0 ? 0 : workprefs.gfx_apmode[1].gfx_backbuffers - 1, 0);
cw = catweasel_detect ();
ew (hDlg, IDC_CATWEASEL, cw);
if (!cw && workprefs.catweasel < 100)
SendDlgItemMessage (hDlg, IDC_RTG_VBLANKRATE, CB_ADDSTRING, 0, (LPARAM)L"60");
SendDlgItemMessage (hDlg, IDC_RTG_VBLANKRATE, CB_ADDSTRING, 0, (LPARAM)L"70");
SendDlgItemMessage (hDlg, IDC_RTG_VBLANKRATE, CB_ADDSTRING, 0, (LPARAM)L"75");
+ SendDlgItemMessage(hDlg, IDC_RTG_BUFFERCNT, CB_RESETCONTENT, 0, 0);
+ WIN32GUI_LoadUIString(IDS_BUFFER_DOUBLE, tmp, sizeof tmp / sizeof (TCHAR));
+ SendDlgItemMessage(hDlg, IDC_RTG_BUFFERCNT, CB_ADDSTRING, 0, (LPARAM)tmp);
+ WIN32GUI_LoadUIString(IDS_BUFFER_TRIPLE, tmp, sizeof tmp / sizeof (TCHAR));
+ SendDlgItemMessage(hDlg, IDC_RTG_BUFFERCNT, CB_ADDSTRING, 0, (LPARAM)tmp);
case WM_USER:
recursive++;
uae_u32 mask = workprefs.picasso96_modeflags;
switch (LOWORD (wParam))
{
+ case IDC_RTG_BUFFERCNT:
+ v = SendDlgItemMessage (hDlg, IDC_RTG_BUFFERCNT, CB_GETCURSEL, 0, 0L);
+ if (v != CB_ERR) {
+ v++;
+ workprefs.gfx_apmode[1].gfx_backbuffers = v;
+ }
+ break;
case IDC_RTG_SCALE_ASPECTRATIO:
v = SendDlgItemMessage (hDlg, IDC_RTG_SCALE_ASPECTRATIO, CB_GETCURSEL, 0, 0L);
if (v != CB_ERR) {
SendDlgItemMessage (hDlg, IDC_Z3CHIPMEM, TBM_SETRANGE, TRUE, MAKELONG (MIN_Z3_MEM, MAX_Z3_CHIPMEM));
SendDlgItemMessage (hDlg, IDC_MBMEM1, TBM_SETRANGE, TRUE, MAKELONG (MIN_MB_MEM, MAX_MB_MEM));
SendDlgItemMessage (hDlg, IDC_MBMEM2, TBM_SETRANGE, TRUE, MAKELONG (MIN_MB_MEM, MAX_MB_MEM));
+ CheckDlgButton(hDlg, IDC_FASTMEMAUTOCONFIG, workprefs.fastmem_autoconfig);
+
case WM_USER:
- recursive++;
+ workprefs.fastmem_autoconfig = ischecked (hDlg, IDC_FASTMEMAUTOCONFIG);
fix_values_memorydlg ();
values_to_memorydlg (hDlg);
enable_for_memorydlg (hDlg);
recursive--;
break;
+ case WM_COMMAND:
+ recursive++;
+ workprefs.fastmem_autoconfig = ischecked (hDlg, IDC_FASTMEMAUTOCONFIG);
+ recursive--;
+ break;
+
case WM_HSCROLL:
workprefs.chipmem_size = memsizes[msi_chip[SendMessage (GetDlgItem (hDlg, IDC_CHIPMEM), TBM_GETPOS, 0, 0)]];
workprefs.bogomem_size = memsizes[msi_bogo[SendMessage (GetDlgItem (hDlg, IDC_SLOWMEM), TBM_GETPOS, 0, 0)]];
extern int soundpercent;
+static const int sndbufsizes[] = { 1024, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 32768, 65536, -1 };
+
+static int getsoundbufsizeindex (int size)
+{
+ int idx;
+ for (idx = 0; sndbufsizes[idx] < size && sndbufsizes[idx + 1] >= 0 ; idx++);
+ return idx;
+}
+
static void update_soundgui (HWND hDlg)
{
int bufsize;
TCHAR txt[20];
- bufsize = exact_log2 (workprefs.sound_maxbsiz / SOUND_BUFFER_MULTIPLIER) + 1;
+ bufsize = getsoundbufsizeindex (workprefs.sound_maxbsiz) + 1;
_stprintf (txt, L"%d", bufsize);
SetDlgItemText (hDlg, IDC_SOUNDBUFFERMEM, txt);
int i, selected;
LRESULT idx;
- if (workprefs.sound_maxbsiz & (workprefs.sound_maxbsiz - 1))
- workprefs.sound_maxbsiz = DEFAULT_SOUND_MAXB;
-
SendDlgItemMessage (hDlg, IDC_SOUNDFILTER, CB_RESETCONTENT, 0, 0);
WIN32GUI_LoadUIString (IDS_SOUND_FILTER_OFF, txt, sizeof (txt) / sizeof (TCHAR));
SendDlgItemMessage (hDlg, IDC_SOUNDFILTER, CB_ADDSTRING, 0, (LPARAM)txt);
CheckDlgButton (hDlg, IDC_SOUND_AUTO, workprefs.sound_auto);
- workprefs.sound_maxbsiz = 1 << exact_log2 (workprefs.sound_maxbsiz);
if (workprefs.sound_maxbsiz < SOUND_BUFFER_MULTIPLIER)
workprefs.sound_maxbsiz = SOUND_BUFFER_MULTIPLIER;
- SendDlgItemMessage (hDlg, IDC_SOUNDBUFFERRAM, TBM_SETPOS, TRUE, exact_log2 (workprefs.sound_maxbsiz / SOUND_BUFFER_MULTIPLIER));
+ SendDlgItemMessage (hDlg, IDC_SOUNDBUFFERRAM, TBM_SETPOS, TRUE, getsoundbufsizeindex (workprefs.sound_maxbsiz));
SendDlgItemMessage (hDlg, IDC_SOUNDVOLUME, TBM_SETPOS, TRUE, 0);
SendDlgItemMessage (hDlg, IDC_SOUNDDRIVEVOLUME, TBM_SETPOS, TRUE, 0);
break;
case WM_HSCROLL:
- workprefs.sound_maxbsiz = SOUND_BUFFER_MULTIPLIER << SendMessage (GetDlgItem (hDlg, IDC_SOUNDBUFFERRAM), TBM_GETPOS, 0, 0);
+ if ((HWND)lParam == GetDlgItem (hDlg, IDC_SOUNDBUFFERRAM)) {
+ int v = SendMessage (GetDlgItem (hDlg, IDC_SOUNDBUFFERRAM), TBM_GETPOS, 0, 0);
+ if (v >= 0)
+ workprefs.sound_maxbsiz = sndbufsizes[v];
+ }
workprefs.sound_volume = 100 - SendMessage (GetDlgItem (hDlg, IDC_SOUNDVOLUME), TBM_GETPOS, 0, 0);
workprefs.dfxclickvolume = 100 - SendMessage (GetDlgItem (hDlg, IDC_SOUNDDRIVEVOLUME), TBM_GETPOS, 0, 0);
update_soundgui (hDlg);
+Beta 18:
+
+- Z2 Fast Autoconfig on/off checkbox added.
+- RTG double/triple buffering option added ("no buffer" is not supported in RTG mode)
+- Do nothing if Load From or Save From file dialogs are canceled.
+- Input panel mode (Configuration #1-#3) also autoswitches joysticks/mice using "GamePorts" method
+ (GamePorts setting overrides Input settings) if GamePorts panel port is not set to "none".
+ (autoswitch = press button on non-configured joystick or mouse = enables it automatically)
+- Task bar click minimize didn't enable minimized state.
+- Accept non-power of 2 sound buffer size.
+- GUI sound buffer range changed, previously next size was always previous * 2. Now buffer sizes are
+ 256, 512, 768, 1024, 1536, 2048, 3072, 4096, 8192 and 16384 samples.
+- Fixed NTSC and 100% floppy speed mode disk errors in some situations.
+- A4000 Quickstart/advanced chipset configuration updates, 0xc0 to 0xcf is chipset mirror, ROM mirrors don't exist.
+
Beta 17:
- Fixed b16 low latency vsync issues.