]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2400b18
authorToni Wilen <twilen@winuae.net>
Wed, 22 Feb 2012 17:13:04 +0000 (19:13 +0200)
committerToni Wilen <twilen@winuae.net>
Wed, 22 Feb 2012 17:13:04 +0000 (19:13 +0200)
18 files changed:
cfgfile.cpp
custom.cpp
disk.cpp
drawing.cpp
expansion.cpp
include/options.h
inputdevice.cpp
main.cpp
memory.cpp
od-win32/dinput.cpp
od-win32/resources/resource
od-win32/resources/winuae.rc
od-win32/sounddep/sound.cpp
od-win32/win32.cpp
od-win32/win32.h
od-win32/win32gfx.cpp
od-win32/win32gui.cpp
od-win32/winuaechangelog.txt

index 7f9b41247d59d3aa73e4279b694b3a6746caf028..128986e9cfc78e08321ab997966ae54d4489c93b 100644 (file)
@@ -193,7 +193,7 @@ static const TCHAR *obsolete[] = {
        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",
@@ -709,7 +709,6 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
        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]);
@@ -1010,7 +1009,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int 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);
@@ -1449,12 +1448,6 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
                }
        }
 
-       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;
@@ -1464,7 +1457,7 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
                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)
@@ -2262,7 +2255,7 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCH
                || 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)
@@ -3930,7 +3923,6 @@ void default_prefs (struct uae_prefs *p, int type)
        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;
@@ -3988,7 +3980,7 @@ void default_prefs (struct uae_prefs *p, int type)
        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;
@@ -4097,7 +4089,7 @@ void default_prefs (struct uae_prefs *p, int type)
        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;
@@ -4860,7 +4852,8 @@ int built_in_chipset_prefs (struct uae_prefs *p)
                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
@@ -4869,7 +4862,8 @@ int built_in_chipset_prefs (struct uae_prefs *p)
                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;
        }
index c860d5b1b3614fb414d32d4e18cf301082aa5209..6e16fc12ce1837194ed4c9a9effe0c53b1b0ac6a 100644 (file)
@@ -5214,7 +5214,7 @@ static void framewait (void)
                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 ();
@@ -5223,7 +5223,7 @@ static void framewait (void)
 
                        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) {    
@@ -5619,12 +5619,14 @@ static void dmal_emu (uae_u32 v)
                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);
@@ -5928,7 +5930,7 @@ static void hsync_handler_post (bool onvsync)
                } 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;
index edb4144c169bc8ceaf07d927c17b9aa3d14063a8..3d686bc66f7d53f36f22b55ca4c4779f55c6af61 100644 (file)
--- a/disk.cpp
+++ b/disk.cpp
@@ -59,8 +59,8 @@ static int longwritemode = 0;
 #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
 
@@ -1736,10 +1736,11 @@ static int decode_buffer (uae_u16 *mbuf, int cyl, int drvsec, int ddhd, int file
        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) {
@@ -1767,7 +1768,7 @@ static int decode_buffer (uae_u16 *mbuf, int cyl, int drvsec, int ddhd, int file
 
                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;
@@ -2725,30 +2726,32 @@ static void disk_doupdate_write (drive * drv, int floppybits)
                                                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);
+                                               }
                                        }
                                }
                        }
@@ -2854,14 +2857,14 @@ int disk_fifostatus (void)
        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]) {
@@ -2871,12 +2874,17 @@ static bool doreaddma (void)
                                        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)
@@ -2919,6 +2927,7 @@ static void disk_doupdate_read (drive * drv, int floppybits)
        mfmbuf[7] = 0x4444;
        */
        while (floppybits >= drv->trackspeed) {
+               int oldmfmpos = drv->mfmpos;
                if (drv->tracktiming[0])
                        updatetrackspeed (drv, drv->mfmpos);
                word <<= 1;
@@ -2941,7 +2950,10 @@ static void disk_doupdate_read (drive * drv, int floppybits)
                        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;
index 19b750ebbd47170c76386448aa04a627de889a16..9ae901fe279098d8ceea02d29cc2ff72c2f8da1b 100644 (file)
@@ -2869,13 +2869,13 @@ bool notice_interlace_seen (bool lace)
                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;
        }
index b5940f4a5e6b0c7dba52317baf09d53310407b4d..ab41c0a6225621ad3d33f1273d9bf2b088d583f2 100644 (file)
@@ -1437,8 +1437,6 @@ void expamem_reset (void)
        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! */
@@ -1447,17 +1445,21 @@ void expamem_reset (void)
                || 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
index 9b2597c5be867ed199cecfff4773b5bd9564c426..ac844811f4e579ae44c43d2ce1c17b549adb4fd8 100644 (file)
@@ -214,7 +214,6 @@ struct uae_prefs {
        int sound_mixed_stereo_delay;
        int sound_freq;
        int sound_maxbsiz;
-       int sound_latency;
        int sound_interpol;
        int sound_filter;
        int sound_filter_type;
@@ -393,6 +392,7 @@ struct uae_prefs {
        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;
@@ -401,7 +401,6 @@ struct uae_prefs {
        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;
index ed93b8c7beac9662772e36b1da33b96dd79832ff..30e078de929562e287702bb5fe2b9d1b02a53afa 100644 (file)
@@ -3187,7 +3187,8 @@ static int switchdevice (struct uae_input_device *id, int num, bool buttonmode)
        } 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);
index 9de64529a74bed19bb3557065cd5592f267b06f3..632facf442395765811b0c10d532970c348e08a9 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -149,7 +149,7 @@ void fixup_prefs_dimensions (struct uae_prefs *prefs)
                                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;
                }
index cc4210b73b1a69a2bd165b396d2b504c14bdeadf..4105eb660b8252e287ab309cca268703b28fdff0 100644 (file)
@@ -2462,8 +2462,13 @@ void memory_reset (void)
                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;
index 4df9c86d508bc4add4f7c1bf122e6d051c2320f8..0c4ea3f6a1397809da086146851bb3b3c50dbca2 100644 (file)
@@ -1872,9 +1872,6 @@ static void handle_rawinput_2 (RAWINPUT *raw)
 
                                                                v -= logicalrange + vcaps->LogicalMin;
 
-                                                               if (axisnum == 0)
-                                                                       write_log (L"%d\n", v);
-
                                                                data = v;
 
                                                                digitalrange = logicalrange * 2 / 3;
index 64b0745485b1b5a30edddb7b40d11aa00224b8f9..448428e334fddba2f46cee8a2b0a680c3942233b 100644 (file)
 #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
index 5926393177f473242d1c985158e920857d161e59..6a7c980149b340a6d2a6f4b552fd520a6cf6b088 100644 (file)
@@ -182,9 +182,10 @@ BEGIN
     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
@@ -1007,24 +1008,24 @@ IDD_EXPANSION DIALOGEX 0, 0, 300, 206
 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
@@ -1037,7 +1038,10 @@ BEGIN
     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
@@ -1411,7 +1415,7 @@ BEGIN
     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
index f807fd3f8958ccc8f764b77a44cc9576639d30d8..c0b221b366816fa4fdb82408d31bb6623bdfd338 100644 (file)
@@ -1533,8 +1533,7 @@ static int open_sound (void)
        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;
 
index ff3f29ccc3574d8ef42f6bcd08cf1d494e06b6d2..c9dce8f511c25440a773077f38d2697d0cfa72a1 100644 (file)
@@ -949,6 +949,7 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
                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);
@@ -1328,6 +1329,7 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
                                switch (wParam & 0xfff0)
                                {
                                case SC_MINIMIZE:
+                                       winuae_inactive (hWnd, 1);
                                        break;
                                case SC_RESTORE:
                                        break;
@@ -2967,7 +2969,7 @@ static const TCHAR *obsolete[] = {
        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
 };
 
index 539a6663c42b80ce02dfe26115c6b52dc97d7de9..65b4bd6179539fa05095ed0cbd8127fba7631fc0 100644 (file)
@@ -19,8 +19,8 @@
 #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""
index ccbfc4971019d7e127423b8ef4606d4efb672a1f..c9d2ab96f1852b8fa6d5ab72279a76614d4a442b 100644 (file)
@@ -2491,6 +2491,7 @@ static unsigned int __stdcall vblankthread (void *dummy)
 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)
 {
@@ -2513,9 +2514,11 @@ static void vsync_notvblank (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;
@@ -2523,7 +2526,9 @@ frame_time_t vsync_busywait_end (void)
 
 void vsync_busywait_start (void)
 {
-       vsync_notvblank ();
+       if (!dooddevenskip) {
+               vsync_notvblank ();
+       }
        changevblankthreadmode (VBLANKTH_ACTIVE_START);
        vblank_prev_time = thread_vblank_time;
 }
@@ -2541,6 +2546,8 @@ bool vsync_busywait_do (int *freetime, bool lace, bool oddeven)
        frame_time_t t;
        frame_time_t prevtime = vblank_prev_time;
 
+       dooddevenskip = false;
+
        if (lace)
                vblankbaselace_chipset = oddeven;
        else
@@ -2595,8 +2602,10 @@ bool vsync_busywait_do (int *freetime, bool lace, bool oddeven)
                        return true;
                }
                
-               if (vblanklaceskip ())
+               if (vblanklaceskip ()) {
                        doskip = true;
+                       dooddevenskip = true;
+               }
 
                if (!doskip) {
                        while (!framelost && read_processor_time () - prevtime < vblankbasewait) {
index 7f3592dfb06338a81454c397f64743ce6b15e37d..ad0c715d38e7361db928112727b54ab4f1bbb51a 100644 (file)
@@ -1161,7 +1161,7 @@ static HWND cachedlist = NULL;
 #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;
@@ -3178,6 +3178,7 @@ static TCHAR *HandleConfiguration (HWND hDlg, int flag, struct ConfigStruct *con
        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;
@@ -3203,12 +3204,12 @@ static TCHAR *HandleConfiguration (HWND hDlg, int flag, struct ConfigStruct *con
        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:
@@ -3233,6 +3234,7 @@ static TCHAR *HandleConfiguration (HWND hDlg, int flag, struct ConfigStruct *con
                                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]);
                        }
@@ -3255,13 +3257,15 @@ static TCHAR *HandleConfiguration (HWND hDlg, int flag, struct ConfigStruct *con
                                        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;
 }
 
 
@@ -4216,49 +4220,56 @@ static void loadsavecommands (HWND hDlg, WPARAM wParam, struct ConfigStruct **co
        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]) {
@@ -4366,10 +4377,12 @@ static INT_PTR CALLBACK LoadSaveDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPA
                                                                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);
+                                                                       }
                                                                }
                                                        }
                                                }
@@ -6497,6 +6510,7 @@ static void enable_for_memorydlg (HWND hDlg)
        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);
@@ -6516,6 +6530,7 @@ static void enable_for_memorydlg (HWND hDlg)
        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)
@@ -6847,6 +6862,7 @@ static void values_to_expansiondlg (HWND hDlg)
        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)
@@ -6918,6 +6934,11 @@ static INT_PTR CALLBACK ExpansionDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LP
                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++;
@@ -6979,6 +7000,13 @@ static INT_PTR CALLBACK ExpansionDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LP
                                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) {
@@ -7119,15 +7147,23 @@ static INT_PTR CALLBACK MemoryDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARA
                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)]];
@@ -8206,12 +8242,21 @@ static void sound_loaddrivesamples (void)
 
 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);
 
@@ -8237,9 +8282,6 @@ static void values_to_sounddlg (HWND hDlg)
        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);
@@ -8338,10 +8380,9 @@ static void values_to_sounddlg (HWND hDlg)
 
        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);
@@ -8564,7 +8605,11 @@ static INT_PTR CALLBACK SoundDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM
                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);
index cc266305518f17977309e04ea106103769b9afdc..584872aefed7102c375ef9cac55ebf8a1c903cc2 100644 (file)
@@ -1,4 +1,19 @@
 
+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.