]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2510b4
authorToni Wilen <twilen@winuae.net>
Tue, 18 Dec 2012 18:27:53 +0000 (20:27 +0200)
committerToni Wilen <twilen@winuae.net>
Tue, 18 Dec 2012 18:27:53 +0000 (20:27 +0200)
27 files changed:
blkdev.cpp
bsdsocket.cpp
disk.cpp
filesys.cpp
include/inputdevice.h
include/newcpu.h
inputdevice.cpp
inputrecord.cpp
keybuf.cpp
main.cpp
od-win32/bsdsock.cpp
od-win32/fsdb_mywin32.cpp
od-win32/keyboard_win32.cpp
od-win32/mman.cpp
od-win32/resources/winuae.rc
od-win32/rp.cpp
od-win32/sounddep/sound.cpp
od-win32/srcrelease.cmd
od-win32/sys/mman.h
od-win32/win32.cpp
od-win32/win32.h
od-win32/win32gfx.cpp
od-win32/win32gui.cpp
od-win32/winuaechangelog.txt
uaeexe.cpp
uaelib.cpp
zfile.cpp

index ff298a3f8f72990e8c2c03a6675caa542ee4019c..a8d62c042f789dcab4f07c363af81c3c1ac9046a 100644 (file)
@@ -84,14 +84,10 @@ void tolongbcd (uae_u8 *p, int v)
 
 static struct cd_toc *gettoc (struct cd_toc_head *th, int block)
 {
-       for (int i = th->first_track_offset; i < th->last_track_offset; i++) {
+       for (int i = th->first_track_offset + 1; i <= th->last_track_offset; i++) {
                struct cd_toc *t = &th->toc[i];
-               if (block < t->paddress) {
-                       if (i == th->first_track_offset)
-                               return t;
-                       else
-                               return t - 1;
-               }
+               if (block < t->paddress)
+                       return t - 1;
        }
        return &th->toc[th->last_track_offset];
 }
@@ -1437,7 +1433,7 @@ static int scsi_emulate (int unitnum, uae_u8 *cmdbuf, int scsi_cmd_len,
                                goto errreq;
                        if (format == 1) {
                                p[0] = 0;
-                               p[1] = 8;
+                               p[1] = 2 + 8;
                                p[2] = 1;
                                p[3] = 1;
                                p[4] = 0;
@@ -1475,10 +1471,10 @@ static int scsi_emulate (int unitnum, uae_u8 *cmdbuf, int scsi_cmd_len,
                                }
                                if (!addtocentry (&p2, &maxlen, 0xa2, 0xaa, msf, p, toc))
                                        goto errreq;
-                               int tlen = p2 - (p + 4);
+                               int tlen = p2 - (p + 2);
                                p[0] = tlen >> 8;
                                p[1] = tlen >> 0;
-                               scsi_len = tlen + 4;
+                               scsi_len = tlen + 2 + 4;
                        }
                }
                break;
index bdb876b1eb720d5c7ad0ce1f80f8252cbc3b6b25..773f5da1d0135554c25926ac9f8d439261c7b3ee 100644 (file)
@@ -1810,7 +1810,7 @@ void bsdlib_install (void)
        dl (datatable);
        dl (*sockfuncvecs);
 
-       write_log (_T("bsdsocked.library installed\n"));
+       write_log (_T("bsdsocket.library installed\n"));
 }
 
 #endif /* ! BSDSOCKET */
index 2add543707a05ea790884de9917f5de9b25d1d57..4e7c7e5256d78669d241bbaf7051e1295cfe08b9 100644 (file)
--- a/disk.cpp
+++ b/disk.cpp
@@ -2317,7 +2317,7 @@ static void diskfile_readonly (const TCHAR *name, bool readonly)
        struct mystat st;
        int mode, oldmode;
 
-       if (my_stat (name, &st))
+       if (!my_stat (name, &st))
                return;
        oldmode = mode = st.mode;
        mode &= ~FILEFLAG_WRITE;
index ed94add89d494dfd4041a6dec69cbfc58a4a6882..97d8ade0bd6113d3b4d68d013ae2c32113c151cd 100644 (file)
@@ -5848,7 +5848,7 @@ static uae_u32 REGPARAM2 filesys_diagentry (TrapContext *context)
        uaecptr start = resaddr;
        uaecptr residents, tmp;
 
-       TRACEI ((_T("filesystem: diagentry called\n")));
+       write_log (_T("filesystem: diagentry called: %x\n"), resaddr);
 
        filesys_configdev = m68k_areg (regs, 3);
        init_filesys_diagentry ();
index e561e77b560100470d725152ca3ea59acb2ab774..840be10b4ddc982d64772fc14ddb7eb2ebaca13a 100644 (file)
@@ -192,8 +192,8 @@ extern void setjoystickstate (int joy, int axle, int state, int max);
 extern int getjoystickstate (int mouse);
 void setmousestate (int mouse, int axis, int data, int isabs);
 extern int getmousestate (int mouse);
-extern void inputdevice_updateconfig (struct uae_prefs *prefs);
-extern void inputdevice_updateconfig_internal (struct uae_prefs *prefs);
+extern void inputdevice_updateconfig (const struct uae_prefs *srcprefs, struct uae_prefs *dstprefs);
+extern void inputdevice_updateconfig_internal (const struct uae_prefs *srcprefs, struct uae_prefs *dstprefs);
 extern void inputdevice_devicechange (struct uae_prefs *prefs);
 
 #define INTERNALEVENT_CPURESET 0
index eb08b6a02bf97e1bf74bebf350027333a206f05f..835a1fb4f8c817eca2145d67d18996caf8399eb1 100644 (file)
@@ -393,6 +393,7 @@ extern int getDivu68kCycles (uae_u32 dividend, uae_u16 divisor);
 extern int getDivs68kCycles (uae_s32 dividend, uae_s16 divisor);
 extern void m68k_do_rte (void);
 extern void protect_roms (bool);
+extern void unprotect_maprom (void);
 
 extern void mmu_op (uae_u32, uae_u32);
 extern void mmu_op30 (uaecptr, uae_u32, uae_u16, uaecptr);
index 2148303a2b899fbf76fe9a9667b7448f96c0bd91..9e659d6341b6022f577c155bb4ebcb032de9df68 100644 (file)
@@ -277,6 +277,8 @@ static void freejport (struct uae_prefs *dst, int num)
 }
 static void copyjport (const struct uae_prefs *src, struct uae_prefs *dst, int num)
 {
+       if (!src)
+               return;
        freejport (dst, num);
        _tcscpy (dst->jports[num].configname, src->jports[num].configname);
        _tcscpy (dst->jports[num].name, src->jports[num].name);
@@ -2811,7 +2813,7 @@ void inputdevice_handle_inputcode (void)
        case AKS_INPUT_CONFIG_3:
        case AKS_INPUT_CONFIG_4:
                changed_prefs.input_selected_setting = currprefs.input_selected_setting = code - AKS_INPUT_CONFIG_1;
-               inputdevice_updateconfig (&currprefs);
+               inputdevice_updateconfig (&changed_prefs, &currprefs);
                break;
        case AKS_DISK_PREV0:
        case AKS_DISK_PREV1:
@@ -3212,7 +3214,7 @@ static void inputdevice_checkconfig (void)
                        currprefs.input_autofire_linecnt = changed_prefs.input_autofire_linecnt;
                        currprefs.input_mouse_speed = changed_prefs.input_mouse_speed;
 
-                       inputdevice_updateconfig (&currprefs);
+                       inputdevice_updateconfig (&changed_prefs, &currprefs);
        }
        if (currprefs.dongle != changed_prefs.dongle) {
                currprefs.dongle = changed_prefs.dongle;
@@ -5042,56 +5044,56 @@ static void resetinput (void)
 }
 
 
-void inputdevice_updateconfig_internal (struct uae_prefs *prefs)
+void inputdevice_updateconfig_internal (const struct uae_prefs *srcprrefs, struct uae_prefs *dstprefs)
 {
        int i;
 
        keyboard_default = keyboard_default_table[currprefs.input_keyboard_type];
 
-       copyjport (&changed_prefs, &currprefs, 0);
-       copyjport (&changed_prefs, &currprefs, 1);
-       copyjport (&changed_prefs, &currprefs, 2);
-       copyjport (&changed_prefs, &currprefs, 3);
+       copyjport (srcprrefs, dstprefs, 0);
+       copyjport (srcprrefs, dstprefs, 1);
+       copyjport (srcprrefs, dstprefs, 2);
+       copyjport (srcprrefs, dstprefs, 3);
 
        resetinput ();
 
-       joysticks = prefs->joystick_settings[prefs->input_selected_setting];
-       mice = prefs->mouse_settings[prefs->input_selected_setting];
-       keyboards = prefs->keyboard_settings[prefs->input_selected_setting];
-       internalevents = prefs->internalevent_settings[prefs->input_selected_setting];
+       joysticks = dstprefs->joystick_settings[dstprefs->input_selected_setting];
+       mice = dstprefs->mouse_settings[dstprefs->input_selected_setting];
+       keyboards = dstprefs->keyboard_settings[dstprefs->input_selected_setting];
+       internalevents = dstprefs->internalevent_settings[dstprefs->input_selected_setting];
 
-       matchdevices_all (prefs);
+       matchdevices_all (dstprefs);
 
        memset (joysticks2, 0, sizeof joysticks2);
        memset (mice2, 0, sizeof mice2);
 
-       joysticks = prefs->joystick_settings[GAMEPORT_INPUT_SETTINGS];
-       mice = prefs->mouse_settings[GAMEPORT_INPUT_SETTINGS];
-       keyboards = prefs->keyboard_settings[GAMEPORT_INPUT_SETTINGS];
-       internalevents = prefs->internalevent_settings[GAMEPORT_INPUT_SETTINGS];
+       joysticks = dstprefs->joystick_settings[GAMEPORT_INPUT_SETTINGS];
+       mice = dstprefs->mouse_settings[GAMEPORT_INPUT_SETTINGS];
+       keyboards = dstprefs->keyboard_settings[GAMEPORT_INPUT_SETTINGS];
+       internalevents = dstprefs->internalevent_settings[GAMEPORT_INPUT_SETTINGS];
 
        for (i = 0; i < MAX_INPUT_SETTINGS; i++) {
                joysticks[i].enabled = 0;
                mice[i].enabled = 0;
        }
 
-       compatibility_copy (prefs, true);
-       joysticks = prefs->joystick_settings[prefs->input_selected_setting];
-       mice = prefs->mouse_settings[prefs->input_selected_setting];
-       keyboards = prefs->keyboard_settings[prefs->input_selected_setting];
-       internalevents = prefs->internalevent_settings[prefs->input_selected_setting];
+       compatibility_copy (dstprefs, true);
+       joysticks = dstprefs->joystick_settings[dstprefs->input_selected_setting];
+       mice = dstprefs->mouse_settings[dstprefs->input_selected_setting];
+       keyboards = dstprefs->keyboard_settings[dstprefs->input_selected_setting];
+       internalevents = dstprefs->internalevent_settings[dstprefs->input_selected_setting];
 
-       if (prefs->input_selected_setting != GAMEPORT_INPUT_SETTINGS) {
-               compatibility_copy (prefs, false);
+       if (dstprefs->input_selected_setting != GAMEPORT_INPUT_SETTINGS) {
+               compatibility_copy (dstprefs, false);
        }
 
-       disableifempty (prefs);
-       scanevents (prefs);
+       disableifempty (dstprefs);
+       scanevents (dstprefs);
 }
 
-void inputdevice_updateconfig (struct uae_prefs *prefs)
+void inputdevice_updateconfig (const struct uae_prefs *srcprefs, struct uae_prefs *dstprefs)
 {
-       inputdevice_updateconfig_internal (prefs);
+       inputdevice_updateconfig_internal (srcprefs, dstprefs);
        
        config_changed = 1;
 
@@ -5115,10 +5117,13 @@ void inputdevice_devicechange (struct uae_prefs *prefs)
        int i, idx;
        TCHAR *jports[MAX_JPORTS];
        int jportskb[MAX_JPORTS], jportsmode[MAX_JPORTS];
+       int jportid[MAX_JPORTS], jportaf[MAX_JPORTS];
 
        for (i = 0; i < MAX_JPORTS; i++) {
                jports[i] = NULL;
                jportskb[i] = -1;
+               jportid[i] = prefs->jports[i].id;
+               jportaf[i] = prefs->jports[i].autofire;
                idx = inputdevice_getjoyportdevice (i, prefs->jports[i].id);
                if (idx >= JSEM_LASTKBD) {
                        struct inputdevice_functions *idf;
@@ -5146,14 +5151,17 @@ void inputdevice_devicechange (struct uae_prefs *prefs)
 
        for (i = 0; i < MAX_JPORTS; i++) {
                freejport (prefs, i);
-               if (jports[i]) {
+               if (jportid[i] == JPORT_CUSTOM) {
+                       inputdevice_joyport_config (prefs, _T("custom"), i, jportsmode[i], 0);
+               } else if (jports[i]) {
                        inputdevice_joyport_config (prefs, jports[i], i, jportsmode[i], 2);
-                       xfree (jports[i]);
                } else if (jportskb[i] >= 0) {
                        TCHAR tmp[10];
                        _stprintf (tmp, _T("kbd%d"), jportskb[i]);
                        inputdevice_joyport_config (prefs, tmp, i, jportsmode[i], 0);
                }
+               prefs->jports[i].autofire = jportaf[i];
+               xfree (jports[i]);
        }
 
        if (prefs == &changed_prefs)
@@ -5966,7 +5974,7 @@ void inputdevice_copyconfig (const struct uae_prefs *src, struct uae_prefs *dst)
                }
        }
 
-       inputdevice_updateconfig (dst);
+       inputdevice_updateconfig (src, dst);
 }
 
 static void swapjoydevice (struct uae_input_device *uid, int **swaps)
@@ -6020,7 +6028,7 @@ void inputdevice_swap_compa_ports (struct uae_prefs *prefs, int portswap)
        memcpy (&tmp, &prefs->jports[portswap], sizeof (struct jport));
        memcpy (&prefs->jports[portswap], &prefs->jports[portswap + 1], sizeof (struct jport));
        memcpy (&prefs->jports[portswap + 1], &tmp, sizeof (struct jport));
-       inputdevice_updateconfig (prefs);
+       inputdevice_updateconfig (NULL, prefs);
 }
 
 // swap device "devnum" ports 0<>1 and 2<>3
index ca5efcfd82f482a466cad6a3deed3aa7997ece57..06fb769c9103229f1371d77d491c5b7d94fd8c2f 100644 (file)
@@ -519,7 +519,7 @@ static void setwriteprotect (const TCHAR *fname, bool readonly)
 {
        struct mystat st;
        int mode, oldmode;
-       if (my_stat (fname, &st))
+       if (!my_stat (fname, &st))
                return;
        oldmode = mode = st.mode;
        mode &= ~FILEFLAG_WRITE;
index c06744bd7de0ac405498b09660fc732b4fcae4b7..72e1395695162c6dfd9f13f680993ea3b4a11337 100644 (file)
@@ -81,5 +81,5 @@ int record_key_direct (int kc)
 void keybuf_init (void)
 {
        kpb_first = kpb_last = 0;
-       inputdevice_updateconfig (&currprefs);
+       inputdevice_updateconfig (&changed_prefs, &currprefs);
 }
index c9795c904e9bfbec4f998c6aa57ee6304206799c..0754e4a792f523a3e8163e2ddcf41827299dabb8 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -804,7 +804,7 @@ void do_start_program (void)
        if (canbang && candirect < 0)
                candirect = 1;
        /* Do a reset on startup. Whether this is elegant is debatable. */
-       inputdevice_updateconfig (&currprefs);
+       inputdevice_updateconfig (&changed_prefs, &currprefs);
        if (quit_program >= 0)
                quit_program = UAE_RESET;
 #if (defined (_WIN32) || defined (_WIN64)) && !defined (NO_WIN32_EXCEPTION_HANDLER)
@@ -904,10 +904,15 @@ void virtualdevice_init (void)
 #endif
 #ifdef AUTOCONFIG
        expansion_init ();
+       emulib_install ();
+       uaeexe_install ();
 #endif
 #ifdef FILESYS
        filesys_install ();
 #endif
+#if defined (BSDSOCKET)
+       bsdlib_install ();
+#endif
 }
 
 static int real_main2 (int argc, TCHAR **argv)
@@ -1007,11 +1012,6 @@ static int real_main2 (int argc, TCHAR **argv)
        memory_reset ();
 
 #ifdef AUTOCONFIG
-#if defined (BSDSOCKET)
-       bsdlib_install ();
-#endif
-       emulib_install ();
-       uaeexe_install ();
        native2amiga_install ();
 #endif
 
index b38dbbaa6d1c88ed65c94f4dc9d8adbcef3c564b..69516842c0296b451461fd2165934259d35d9722 100644 (file)
@@ -189,6 +189,8 @@ int init_socket_layer (void)
 {
        int result = 0;
 
+       if (bsd)
+               return -1;
        deinit_socket_layer ();
        if (currprefs.socket_emu) {
                if((result = mySockStartup())) {
@@ -287,6 +289,8 @@ void deinit_socket_layer(void)
        }
        close_selectget_threads ();
        WSACleanup();
+       xfree (bsd);
+       bsd = NULL;
 }
 
 #ifdef BSDSOCKET
index 88c3fe7d98c514402b630a938d642934ff8b35aa..c744c88515783df3982ef98a7e94dade3bc828c9 100644 (file)
@@ -583,10 +583,8 @@ bool my_stat (const TCHAR *name, struct mystat *statbuf)
 
        // FILE_FLAG_BACKUP_SEMANTICS = can also "open" directories
        h = CreateFile (namep, 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL);
-       if (h == INVALID_HANDLE_VALUE) {
-               write_log (_T("Stat CreateFile(%s) failed: %d\n"), name, GetLastError ());
+       if (h == INVALID_HANDLE_VALUE)
                return false;
-       }
        ok = GetFileInformationByHandle (h, &fi);
        CloseHandle (h);
 
index 651e9b685c8e53d28d63415a42b9373449a37a36..3bf98e1baa6371995a91ac0e251d99d1995cc362 100644 (file)
@@ -376,7 +376,7 @@ int getcapslock (void)
 
 void clearallkeys (void)
 {
-       inputdevice_updateconfig (&currprefs);
+       inputdevice_updateconfig (&changed_prefs, &currprefs);
 }
 
 static const int np[] = {
index b3a5483edafd8d0d32ce879e917fdb4d675e8d2e..4dbd7b15b14d4553aaa7e546e689fd3e63d01492 100644 (file)
@@ -135,7 +135,8 @@ bool preinit_shm (void)
        p96mem_offset = NULL;
 
        GetSystemInfo (&si);
-       max_allowed_mman = 512;
+       max_allowed_mman = 512 + 256;
+#if 1
        if (os_64bit) {
 #ifdef WIN64
                max_allowed_mman = 3072;
@@ -143,6 +144,7 @@ bool preinit_shm (void)
                max_allowed_mman = 2048;
 #endif
        }
+#endif
 
        memstats.dwLength = sizeof(memstats);
        GlobalMemoryStatus(&memstats);
@@ -172,6 +174,10 @@ bool preinit_shm (void)
                size64 = 8 * 1024 * 1024;
        if (max_allowed_mman * 1024 * 1024 > size64)
                max_allowed_mman = size64 / (1024 * 1024);
+       if (!os_64bit) {
+               if (max_allowed_mman * 1024 * 1024 > (size64 / 2))
+                       max_allowed_mman = (size64 / 2) / (1024 * 1024);
+       }
 
        natmem_size = (max_allowed_mman + 1) * 1024 * 1024;
        if (natmem_size < 256 * 1024 * 1024)
@@ -179,14 +185,14 @@ bool preinit_shm (void)
 
        write_log (_T("Total physical RAM %lluM. Attempting to reserve: %uM.\n"), totalphys64 >> 20, natmem_size >> 20);
        natmem_offset = 0;
-       if (natmem_size <= 640 * 1024 * 1024) {
+       if (natmem_size <= 768 * 1024 * 1024) {
                uae_u32 p = 0x78000000 - natmem_size;
                for (;;) {
                        natmem_offset = (uae_u8*)VirtualAlloc ((void*)p, natmem_size, MEM_RESERVE | (VAMODE == 1 ? MEM_WRITE_WATCH : 0), PAGE_READWRITE);
                        if (natmem_offset)
                                break;
-                       p -= 256 * 1024 * 1024;
-                       if (p <= 256 * 1024 * 1024)
+                       p -= 128 * 1024 * 1024;
+                       if (p <= 128 * 1024 * 1024)
                                break;
                }
        }
@@ -418,7 +424,7 @@ static int doinit_shm (void)
        uae_u32 size, totalsize, z3size, natmemsize;
        uae_u32 rtgbarrier, z3chipbarrier, rtgextra;
        int rounds = 0;
-       ULONG z3rtgmem_size = changed_prefs.rtgmem_type ? changed_prefs.rtgmem_size : 0;
+       ULONG z3rtgmem_size;
 
        for (;;) {
                int lowround = 0;
@@ -432,6 +438,7 @@ static int doinit_shm (void)
                rtgextra = 0;
                z3chipbarrier = 0;
                rtgbarrier = si.dwPageSize;
+               z3rtgmem_size = changed_prefs.rtgmem_type ? changed_prefs.rtgmem_size : 0;
                if (changed_prefs.cpu_model >= 68020)
                        size = 0x10000000;
                if (changed_prefs.z3fastmem_size || changed_prefs.z3fastmem2_size || changed_prefs.z3chipmem_size) {
@@ -674,7 +681,7 @@ int mprotect (void *addr, size_t len, int prot)
 void *shmat (int shmid, void *shmaddr, int shmflg)
 {
        void *result = (void *)-1;
-       BOOL got = FALSE, readonly = FALSE;
+       BOOL got = FALSE, readonly = FALSE, maprom = FALSE;
        int p96special = FALSE;
 
 #ifdef NATMEM_OFFSET
@@ -695,14 +702,17 @@ void *shmat (int shmid, void *shmaddr, int shmflg)
                        got = TRUE;
                        size += BARRIER;
                        readonly = TRUE;
+                       maprom = TRUE;
                } else if(!_tcscmp (shmids[shmid].name, _T("rom_a8"))) {
                        shmaddr=natmem_offset + 0xa80000;
                        got = TRUE;
                        readonly = TRUE;
+                       maprom = TRUE;
                } else if(!_tcscmp (shmids[shmid].name, _T("rom_e0"))) {
                        shmaddr=natmem_offset + 0xe00000;
                        got = TRUE;
                        readonly = TRUE;
+                       maprom = TRUE;
                } else if(!_tcscmp (shmids[shmid].name, _T("rom_f0"))) {
                        shmaddr=natmem_offset + 0xf00000;
                        got = TRUE;
@@ -817,6 +827,7 @@ void *shmat (int shmid, void *shmaddr, int shmflg)
                shmids[shmid].mode = protect;
                shmids[shmid].rosize = readonlysize;
                shmids[shmid].natmembase = natmem_offset;
+               shmids[shmid].maprom = maprom ? 1 : 0;
                if (shmaddr)
                        virtualfreewithlock (shmaddr, size, MEM_DECOMMIT);
                result = virtualallocwithlock (shmaddr, size, MEM_COMMIT, PAGE_READWRITE);
@@ -838,10 +849,29 @@ void *shmat (int shmid, void *shmaddr, int shmflg)
        return result;
 }
 
+void unprotect_maprom (void)
+{
+       bool protect = false;
+       for (int i = 0; i < MAX_SHMID; i++) {
+               DWORD old;
+               struct shmid_ds *shm = &shmids[i];
+               if (shm->mode != PAGE_READONLY)
+                       continue;
+               if (!shm->attached || !shm->rosize)
+                       continue;
+               if (shm->maprom <= 0)
+                       continue;
+               shm->maprom = -1;
+               if (!VirtualProtect (shm->attached, shm->rosize, protect ? PAGE_READONLY : PAGE_READWRITE, &old)) {
+                       write_log (_T("VP %08X - %08X %x (%dk) failed %d\n"),
+                               (uae_u8*)shm->attached - natmem_offset, (uae_u8*)shm->attached - natmem_offset + shm->size,
+                               shm->size, shm->size >> 10, GetLastError ());
+               }
+       }
+}
+
 void protect_roms (bool protect)
 {
-       struct shmid_ds *shm;
-       
        if (protect) {
                // protect only if JIT enabled, always allow unprotect
                if (!currprefs.cachesize || currprefs.comptrustbyte || currprefs.comptrustword || currprefs.comptrustlong)
@@ -849,11 +879,13 @@ void protect_roms (bool protect)
        }
        for (int i = 0; i < MAX_SHMID; i++) {
                DWORD old;
-               shm = &shmids[i];
+               struct shmid_ds *shm = &shmids[i];
                if (shm->mode != PAGE_READONLY)
                        continue;
                if (!shm->attached || !shm->rosize)
                        continue;
+               if (shm->maprom < 0 && protect)
+                       continue;
                if (!VirtualProtect (shm->attached, shm->rosize, protect ? PAGE_READONLY : PAGE_READWRITE, &old)) {
                        write_log (_T("VP %08X - %08X %x (%dk) failed %d\n"),
                                (uae_u8*)shm->attached - natmem_offset, (uae_u8*)shm->attached - natmem_offset + shm->size,
index ddfe29bedd9757ab610282303ef698d450b74696..a85a9fcc86d7f80744beeef41968d8aa1717d932 100644 (file)
@@ -1293,7 +1293,7 @@ BEGIN
 \r
     IDD_IOPORTS, DIALOG\r
     BEGIN\r
-        BOTTOMMARGIN, 275\r
+        BOTTOMMARGIN, 293\r
     END\r
 \r
     IDD_GAMEPORTS, DIALOG\r
index cda36dd05786a3ecf648c12b95ef0ea2bb82c4ce..8c81e2b661a0e399ecd2dad42aab8c0286823552 100644 (file)
@@ -278,9 +278,9 @@ int port_insert_custom (int inputmap_port, int devicetype, DWORD flags, const TC
 
        kb = inputdevice_get_device_total (IDTYPE_JOYSTICK) + inputdevice_get_device_total (IDTYPE_MOUSE);
 
-       inputdevice_updateconfig_internal (&changed_prefs);
+       inputdevice_updateconfig_internal (NULL, &changed_prefs);
        inputdevice_compa_prepare_custom (&changed_prefs, inputmap_port, devicetype);
-       inputdevice_updateconfig_internal (&changed_prefs);
+       inputdevice_updateconfig_internal (NULL, &changed_prefs);
        max = inputdevice_get_compatibility_input (&changed_prefs, inputmap_port, &mode, &events, &axistable);
        write_log (_T("custom='%s' max=%d port=%d dt=%d kb=%d kbnum=%d\n"), custom, max, inputmap_port, devicetype, kb, inputdevice_get_device_total (IDTYPE_KEYBOARD));
        if (!max)
@@ -355,8 +355,8 @@ int port_insert_custom (int inputmap_port, int devicetype, DWORD flags, const TC
                }
        }
 
-       inputdevice_updateconfig_internal (&changed_prefs);
-       inputdevice_updateconfig (&currprefs);
+       inputdevice_updateconfig_internal (NULL, &changed_prefs);
+       inputdevice_updateconfig (NULL, &currprefs);
        return TRUE;
 }
 
@@ -993,7 +993,7 @@ static LRESULT CALLBACK RPHostMsgFunction2 (UINT uMessage, WPARAM wParam, LPARAM
                        case RP_DEVICECATEGORY_INPUTPORT:
                                ok = port_insert (num, dc->dwInputDevice, dc->dwFlags, n);
                                if (ok)
-                                       inputdevice_updateconfig (&currprefs);
+                                       inputdevice_updateconfig (&changed_prefs, &currprefs);
                                break;
                        case RP_DEVICECATEGORY_CD:
                                ok = cd_insert (num, n);
index 85ee1b295d04cdfefecb9d68ff43edecccb724ff..426993aa522510aa7339a880a68f3eea2783d605 100644 (file)
@@ -1582,6 +1582,8 @@ static int open_sound (void)
        num = enumerate_sound_devices ();
        if (currprefs.win32_soundcard >= num)
                currprefs.win32_soundcard = changed_prefs.win32_soundcard = 0;
+       if (num == 0)
+               return 0;
        ch = get_audio_nativechannels (currprefs.sound_stereo);
        ret = open_sound_device (sdp, currprefs.win32_soundcard, size, currprefs.sound_freq, ch);
        if (!ret)
index 185c125883845701dc211c6fdeb64d38541a5f89..3fe942622e55b8024566d63c95bd287ba27c3267 100644 (file)
@@ -169,7 +169,7 @@ zip -9 -r winuaesrc *
 copy winuaesrc.zip d:\amiga\winuaepackets\winuaesrc%1.zip
 move winuaesrc.zip d:\amiga
 cd c:\projects\winuae\src\od-win32
-zip -9 winuaedebug%1 winuae_msvc11\release\winuae.pdb  winuae_msvc11\fullrelease\winuae.pdb 
+zip -9 winuaedebug%1 winuae_msvc10\release\winuae.pdb  winuae_msvc10\fullrelease\winuae.pdb 
 move winuaedebug%1.zip d:\amiga\winuaepackets\debug\
-copy winuae_msvc11\fullrelease\winuae.pdb d:\amiga\dump
+copy winuae_msvc10\fullrelease\winuae.pdb d:\amiga\dump
 copy d:\amiga\winuae.exe d:\amiga\dump
index 2edb8febbbcd865bd980e5488242c3ce1b52f7be..1925b551e3ff907702978a6c5cded04eb01ff0c7 100644 (file)
@@ -28,6 +28,7 @@ struct shmid_ds {
     int mode;
     void *natmembase;
        bool fake;
+       int maprom;
 };
 
 int mprotect (void *addr, size_t len, int prot);
index 69adad44f5119a6431163c0a3eed785c32fd8d50..09d52c2576e58511d01173e301f8d57bc90a6166 100644 (file)
@@ -125,6 +125,7 @@ HMODULE hUIDLL = NULL;
 HWND (WINAPI *pHtmlHelp)(HWND, LPCWSTR, UINT, LPDWORD) = NULL;
 HWND hAmigaWnd, hMainWnd, hHiddenWnd, hGUIWnd;
 RECT amigawin_rect, mainwin_rect;
+int setcursoroffset_x, setcursoroffset_y;
 static int mouseposx, mouseposy;
 static UINT TaskbarRestart;
 static HWND TaskbarRestartHWND;
@@ -409,8 +410,8 @@ static void figure_processor_speed (void)
 
 static void setcursor (int oldx, int oldy)
 {
-       int x = (amigawin_rect.right - amigawin_rect.left) / 2;
-       int y = (amigawin_rect.bottom - amigawin_rect.top) / 2;
+       int x = abs (amigawin_rect.right - amigawin_rect.left) / 2;
+       int y = abs (amigawin_rect.bottom - amigawin_rect.top) / 2;
        mouseposx = oldx - x;
        mouseposy = oldy - y;
 
@@ -419,9 +420,11 @@ static void setcursor (int oldx, int oldy)
                return;
        }
 #if 0
-       write_log (_T("%d %d %d %d %d - %d %d %d %d %d\n"),
-               x, amigawin_rect.left, amigawin_rect.right, mouseposx, oldx,
-               y, amigawin_rect.top, amigawin_rect.bottom, mouseposy, oldy);
+       write_log (_T("%dx%d %dx%d %dx%d (%dx%d %dx%d)\n"),
+               x, y,
+               mouseposx, mouseposy, oldx, oldy,
+               amigawin_rect.left, amigawin_rect.top,
+               amigawin_rect.right, amigawin_rect.bottom);
 #endif
        if (oldx >= 30000 || oldy >= 30000 || oldx <= -30000 || oldy <= -30000) {
                mouseposx = mouseposy = 0;
@@ -436,7 +439,10 @@ static void setcursor (int oldx, int oldy)
                        amigawin_rect.left, amigawin_rect.top, amigawin_rect.right, amigawin_rect.bottom);
                return;
        }
-       SetCursorPos (amigawin_rect.left + x, amigawin_rect.top + y);
+       int cx = amigawin_rect.left + x;
+       int cy = amigawin_rect.top + y;
+       //write_log (_T("SetCursorPos(%d,%d)\n"), cx, cy);
+       SetCursorPos (cx, cy);
 }
 
 static int pausemouseactive;
@@ -594,14 +600,18 @@ void updatemouseclip (void)
 {
        if (showcursor) {
                ClipCursor (&amigawin_rect);
-               write_log (_T("CLIP %dx%d %dx%d\n"), amigawin_rect.left, amigawin_rect.top, amigawin_rect.right, amigawin_rect.bottom);
+               write_log (_T("CLIP %dx%d %dx%d %d\n"), amigawin_rect.left, amigawin_rect.top, amigawin_rect.right, amigawin_rect.bottom, isfullscreen ());
        }
 }
 
-void  updatewinrect (void)
+void updatewinrect (bool allowfullscreen)
 {
+       int f = isfullscreen ();
+       if (!allowfullscreen && f > 0)
+               return;
        GetWindowRect (hAmigaWnd, &amigawin_rect);
-       if (isfullscreen () == 0) {
+       write_log (_T("GetWindowRect %dx%d %dx%d %d\n"), amigawin_rect.left, amigawin_rect.top, amigawin_rect.right, amigawin_rect.bottom, f);
+       if (f == 0) {
                changed_prefs.gfx_size_win.x = amigawin_rect.left;
                changed_prefs.gfx_size_win.y = amigawin_rect.top;
                currprefs.gfx_size_win.x = changed_prefs.gfx_size_win.x;
@@ -679,7 +689,7 @@ static void setmouseactive2 (int active, bool allowpause)
                        if (!showcursor) {
                                ShowCursor (FALSE);
                                SetCapture (hAmigaWnd);
-                               updatewinrect ();
+                               updatewinrect (false);
                                showcursor = 1;
                                updatemouseclip ();
                        }
@@ -1201,7 +1211,7 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
                        WINDOWPOS *wp = (WINDOWPOS*)lParam;
                        if (isfullscreen () <= 0) {
                                if (!IsIconic (hWnd) && hWnd == hAmigaWnd) {
-                                       updatewinrect ();
+                                       updatewinrect (false);
                                        config_changed = 1;
                                        updatemouseclip ();
                                }
@@ -1229,10 +1239,10 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
 
                        mx = (signed short) LOWORD (lParam);
                        my = (signed short) HIWORD (lParam);
+                       //write_log (_T("%d %d %d %d %d %d %dx%d %dx%d\n"), wm, mouseactive, focus, showcursor, recapture, isfullscreen (), mx, my, mouseposx, mouseposy);
                        mx -= mouseposx;
                        my -= mouseposy;
 
-                       //write_log (_T("%d %d %d %d %d %d %dx%d %dx%d\n"), wm, mouseactive, focus, showcursor, recapture, isfullscreen (), mx, my, mouseposx, mouseposy);
                        if (recapture && isfullscreen () <= 0) {
                                enablecapture ();
                                return 0;
@@ -1941,7 +1951,7 @@ void handle_events (void)
                        TranslateMessage (&msg);
                        DispatchMessage (&msg);
                }
-               sleep_millis (20);
+               sleep_millis (100);
                inputdevicefunc_keyboard.read ();
                inputdevicefunc_mouse.read ();
                inputdevicefunc_joystick.read ();
@@ -1971,10 +1981,12 @@ void handle_events (void)
        while (checkIPC (globalipc, &currprefs));
 #endif
        if (was_paused) {
+               updatedisplayarea ();
+               manual_painting_needed--;
                pause_emulation = was_paused;
+               setmouseactive (0);
                resumepaused (was_paused);
                sound_closed = 0;
-               manual_painting_needed--;
        }
        cnt1--;
        if (cnt1 <= 0) {
@@ -5549,7 +5561,7 @@ LONG WINAPI WIN32_ExceptionFilter (struct _EXCEPTION_POINTERS *pExceptionPointer
                        }
        }
 #endif
-#ifndef        _DEBUG
+//#ifndef      _DEBUG
        if (lRet == EXCEPTION_CONTINUE_SEARCH) {
                TCHAR path[MAX_DPATH];
                TCHAR path2[MAX_DPATH];
@@ -5560,7 +5572,9 @@ LONG WINAPI WIN32_ExceptionFilter (struct _EXCEPTION_POINTERS *pExceptionPointer
                __time64_t now;
 
                if (os_winnt && GetModuleFileName (NULL, path, MAX_DPATH)) {
+                       TCHAR dumpfilename[100];
                        TCHAR beta[100];
+                       TCHAR path3[MAX_DPATH];
                        TCHAR *slash = _tcsrchr (path, '\\');
                        _time64 (&now);
                        when = *_localtime64 (&now);
@@ -5574,10 +5588,11 @@ LONG WINAPI WIN32_ExceptionFilter (struct _EXCEPTION_POINTERS *pExceptionPointer
                                p = slash + 1;
                        else
                                p = path2;
+                       p[0] = 0;
                        beta[0] = 0;
                        if (WINUAEPUBLICBETA > 0)
                                _stprintf (beta, _T("b%s"), WINUAEBETA);
-                       _stprintf (p, _T("winuae_%d%d%d%s_%d%02d%02d_%02d%02d%02d.dmp"),
+                       _stprintf (dumpfilename, _T("winuae_%d%d%d%s_%d%02d%02d_%02d%02d%02d.dmp"),
                                UAEMAJOR, UAEMINOR, UAESUBREV, beta,
                                when.tm_year + 1900, when.tm_mon + 1, when.tm_mday, when.tm_hour, when.tm_min, when.tm_sec);
                        if (dll == NULL)
@@ -5585,13 +5600,26 @@ LONG WINAPI WIN32_ExceptionFilter (struct _EXCEPTION_POINTERS *pExceptionPointer
                        if (dll) {
                                MINIDUMPWRITEDUMP dump = (MINIDUMPWRITEDUMP)GetProcAddress (dll, "MiniDumpWriteDump");
                                if (dump) {
-                                       HANDLE f = CreateFile (path2, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+                                       _tcscpy (path3, path2);
+                                       _tcscat (path3, dumpfilename);
+                                       HANDLE f = CreateFile (path3, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+                                       if (f == INVALID_HANDLE_VALUE) {
+                                               _tcscpy (path3, start_path_data);
+                                               _tcscat (path3, dumpfilename);
+                                               f = CreateFile (path3, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+                                       }
+                                       if (f == INVALID_HANDLE_VALUE) {
+                                               if (GetTempPath (MAX_DPATH, path3) > 0) {
+                                                       _tcscat (path3, dumpfilename);
+                                                       f = CreateFile (path3, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+                                               }
+                                       }
                                        if (f != INVALID_HANDLE_VALUE) {
                                                flush_log ();
                                                savedump (dump, f, pExceptionPointers);
                                                CloseHandle (f);
                                                if (isfullscreen () <= 0) {
-                                                       _stprintf (msg, _T("Crash detected. MiniDump saved as:\n%s\n"), path2);
+                                                       _stprintf (msg, _T("Crash detected. MiniDump saved as:\n%s\n"), path3);
                                                        MessageBox (NULL, msg, _T("Crash"), MB_OK | MB_ICONWARNING | MB_TASKMODAL | MB_SETFOREGROUND);
                                                }
                                        }
@@ -5599,7 +5627,7 @@ LONG WINAPI WIN32_ExceptionFilter (struct _EXCEPTION_POINTERS *pExceptionPointer
                        }
                }
        }
-#endif
+//#endif
 #if 0
        HMODULE hFaultRepDll = LoadLibrary (_T("FaultRep.dll")) ;
        if (hFaultRepDll) {
index 7d36bd02a7e0f41b198a39cbc91a13611b83be68..09fb5dfe74fe25a92ed186360b8be45f60e59d81 100644 (file)
@@ -19,8 +19,8 @@
 #define LANG_DLL 1
 
 //#define WINUAEBETA _T("")
-#define WINUAEBETA _T("2")
-#define WINUAEDATE MAKEBD(2012, 12, 12)
+#define WINUAEBETA _T("4")
+#define WINUAEDATE MAKEBD(2012, 12, 18)
 #define WINUAEEXTRA _T("")
 //#define WINUAEEXTRA _T("AmiKit Preview")
 #define WINUAEREV _T("")
@@ -64,7 +64,7 @@ extern void setmouseactive (int active);
 extern void minimizewindow (void);
 extern uae_u32 OSDEP_minimize_uae (void);
 extern void updatemouseclip (void);
-extern void updatewinrect (void);
+extern void updatewinrect (bool);
 
 extern void resumepaused (int priority);
 extern void setpaused (int priority);
index cf4035d6327fc4534fb1001d03fd818a8d2a73be..a6eeebfa3808fc3f254358e9500d76f3d72475f2 100644 (file)
@@ -473,7 +473,7 @@ static int set_ddraw_2 (void)
                                goto oops;
                        return -1;
                }
-               GetWindowRect (hAmigaWnd, &amigawin_rect);
+               updatewinrect (true);
        }
 
        if (dd) {
@@ -1127,6 +1127,10 @@ void unlockscr (struct vidbuffer *vb)
 
 void flush_clear_screen (struct vidbuffer *vb)
 {
+       struct vidbuffer vb2 = { 0 };
+
+       if (!vb)
+               vb = &vb2;
        if (lockscr (vb, true)) {
                int y;
                for (y = 0; y < vb->height_allocated; y++) {
@@ -1513,7 +1517,7 @@ static void update_gfxparams (void)
 
 }
 
-static int open_windows (bool full)
+static int open_windows (bool mousecapture)
 {
        static bool started = false;
        int ret, i;
@@ -1560,7 +1564,7 @@ static int open_windows (bool full)
        bool startpaused = !started && ((currprefs.win32_start_minimized && currprefs.win32_iconified_pause) || (currprefs.win32_start_uncaptured && currprefs.win32_inactive_pause && isfullscreen () <= 0));
        bool startminimized = !started && currprefs.win32_start_minimized && isfullscreen () <= 0;
 
-       if (!rp_isactive () && full && startactive)
+       if (!rp_isactive () && mousecapture && startactive)
                setmouseactive (-1);
 
        if (startactive) {
@@ -1585,7 +1589,7 @@ static int open_windows (bool full)
 
 static void reopen_gfx (void)
 {
-       open_windows (0);
+       open_windows (false);
 
        if (isvsync () < 0)
                vblank_calibrate (0, false);
@@ -1836,7 +1840,7 @@ int check_prefs_changed_gfx (void)
                                unacquired = true;
                        }
                        close_windows ();
-                       graphics_init (false);
+                       graphics_init (dontcapture ? false : true);
                        graphics_mode_changed = 1;
                }
                init_custom ();
@@ -2112,7 +2116,7 @@ void DX_Invalidate (int x, int y, int width, int height)
 static void open_screen (void)
 {
        close_windows ();
-       open_windows (1);
+       open_windows (true);
 }
 
 static int ifs (struct uae_prefs *p)
@@ -2348,7 +2352,7 @@ void gfx_set_picasso_state (int on)
                        goto end;
        }
        if (mode < 0) {
-               open_windows (0);
+               open_windows (true);
        } else {
                open_screen (); // reopen everything
        }
@@ -2373,7 +2377,7 @@ void gfx_set_picasso_modeinfo (uae_u32 w, uae_u32 h, uae_u32 depth, RGBFTYPE rgb
        if (need > 0) {
                open_screen ();
        } else if (need < 0) {
-               open_windows (0);
+               open_windows (true);
        }
 #ifdef RETROPLATFORM
        rp_set_hwnd (hAmigaWnd);
@@ -2423,13 +2427,13 @@ void machdep_free (void)
 #endif
 }
 
-int graphics_init (bool first)
+int graphics_init (bool mousecapture)
 {
        systray (hHiddenWnd, TRUE);
        systray (hHiddenWnd, FALSE);
        gfxmode_reset ();
        graphics_mode_changed = 1;
-       return open_windows (first);
+       return open_windows (mousecapture);
 }
 
 int graphics_setup (void)
@@ -3532,6 +3536,12 @@ fail:
        return -1;
 }
 
+static void movecursor (int x, int y)
+{
+       write_log (_T("SetCursorPos %dx%d\n"), x, y);
+       SetCursorPos (x, y);
+}
+
 static int create_windows_2 (void)
 {
        static bool firstwindow = true;
@@ -3614,10 +3624,10 @@ static int create_windows_2 (void)
                        y = ny;
                }
                createstatuswindow ();
-               updatewinrect ();
+               updatewinrect (false);
                GetWindowRect (hMainWnd, &mainwin_rect);
                if (d3dfs || dxfs)
-                       SetCursorPos (x + w / 2, y + h / 2);
+                       movecursor (x + w / 2, y + h / 2);
                write_log (_T("window already open (%dx%d %dx%d)\n"),
                        amigawin_rect.left, amigawin_rect.top, amigawin_rect.right - amigawin_rect.left, amigawin_rect.bottom - amigawin_rect.top);
                updatemouseclip ();
@@ -3756,10 +3766,10 @@ static int create_windows_2 (void)
                hMainWnd = hAmigaWnd;
        }
 
-       updatewinrect ();
+       updatewinrect (true);
        GetWindowRect (hMainWnd, &mainwin_rect);
        if (dxfs || d3dfs)
-               SetCursorPos (x + w / 2, y + h / 2);
+               movecursor (x + w / 2, y + h / 2);
        addnotifications (hAmigaWnd, FALSE, FALSE);
        createblankwindows ();
 
@@ -4015,6 +4025,7 @@ static BOOL doInit (void)
                        goto oops;
                }
                target_graphics_buffer_update ();
+               updatewinrect (true);
        }
 
        screen_is_initialized = 1;
@@ -4074,8 +4085,6 @@ void updatedisplayarea (void)
                return;
        if (dx_islost ())
                return;
-       if (picasso_on)
-               return;
 #if defined (GFXFILTER)
        if (currentmode->flags & DM_D3D) {
 #if defined (D3D)
@@ -4085,8 +4094,10 @@ void updatedisplayarea (void)
 #endif
                if (currentmode->flags & DM_DDRAW) {
 #if defined (GFXFILTER)
-                       if (currentmode->flags & DM_SWSCALE)
-                               S2X_refresh ();
+                       if (!picasso_on) {
+                               if (currentmode->flags & DM_SWSCALE)
+                                       S2X_refresh ();
+                       }
 #endif
                        DirectDraw_Flip (0);
                }
index 2c1e3ac8c8e89409fb3b276b422af64b17334b30..54c7f88bb886c6581931ef88c1a69a758fe84d1f 100644 (file)
@@ -4383,7 +4383,7 @@ static void loadsavecommands (HWND hDlg, WPARAM wParam, struct ConfigStruct **co
                        ConfigToRegistry (config, configtypepanel);
                        InitializeConfig (hDlg, config);
                        if (full_property_sheet) {
-                               inputdevice_updateconfig (&workprefs);
+                               inputdevice_updateconfig (NULL, &workprefs);
                        } else {
                                uae_restart (-1, *pcfgfile);
                                exit_gui(1);
@@ -4396,7 +4396,7 @@ static void loadsavecommands (HWND hDlg, WPARAM wParam, struct ConfigStruct **co
                        ConfigToRegistry (config, configtypepanel);
                        InitializeConfig (hDlg, config);
                        if (full_property_sheet) {
-                               inputdevice_updateconfig (&workprefs);
+                               inputdevice_updateconfig (NULL, &workprefs);
                        } else {
                                uae_restart (-1, *pcfgfile);
                                exit_gui(1);
@@ -10088,9 +10088,10 @@ static INT_PTR CALLBACK HarddiskDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPA
                CheckDlgButton (hDlg, IDC_NOUAEFSDB, workprefs.filesys_no_uaefsdb);
                CheckDlgButton (hDlg, IDC_NORECYCLEBIN, workprefs.win32_norecyclebin);
                CheckDlgButton (hDlg, IDC_MAPDRIVES_LIMIT, workprefs.filesys_limit != 0);
+               InitializeListView (hDlg);
+               setautocomplete (hDlg, IDC_CD_TEXT);
                addfloppyhistory_2 (hDlg, 0, IDC_CD_TEXT, HISTORY_CD);
                addcdtype (hDlg, IDC_CD_TYPE);
-               InitializeListView (hDlg);
                hilitehd (hDlg);
                break;
 
@@ -11710,7 +11711,7 @@ static void processport (HWND hDlg, bool reset, int port)
        values_from_gameportsdlg (hDlg, 0);
        enable_for_gameportsdlg (hDlg);
        updatejoyport (hDlg);
-       inputdevice_updateconfig (&workprefs);
+       inputdevice_updateconfig (NULL, &workprefs);
        inputdevice_config_change ();
 }
 
@@ -11779,7 +11780,7 @@ static INT_PTR CALLBACK GamePortsDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LP
                        SendDlgItemMessage (hDlg, id, CB_ADDSTRING, 0, (LPARAM)tmp);
                }
 
-               inputdevice_updateconfig (&workprefs);
+               inputdevice_updateconfig (NULL, &workprefs);
                enable_for_gameportsdlg (hDlg);
                updatejoyport (hDlg);
                recursive--;
@@ -11870,7 +11871,7 @@ static INT_PTR CALLBACK IOPortsDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR
                pages[IOPORTS_ID] = hDlg;
                currentpage = IOPORTS_ID;
                init_portsdlg (hDlg);
-               inputdevice_updateconfig (&workprefs);
+               inputdevice_updateconfig (NULL, &workprefs);
                enable_for_portsdlg (hDlg);
                values_to_portsdlg (hDlg);
                recursive--;
@@ -11902,7 +11903,7 @@ static INT_PTR CALLBACK IOPortsDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR
                                case IDC_MIDIINLIST:
                                case IDC_DONGLELIST:
                                        values_from_portsdlg (hDlg);
-                                       inputdevice_updateconfig (&workprefs);
+                                       inputdevice_updateconfig (NULL, &workprefs);
                                        inputdevice_config_change ();
                                        enable_for_portsdlg (hDlg);
                                        break;
@@ -12216,7 +12217,7 @@ static void values_from_inputdlg (HWND hDlg, int inputchange)
                if (item != workprefs.input_selected_setting) {
                        workprefs.input_selected_setting = (int)item;
                        input_selected_widget = -1;
-                       inputdevice_updateconfig (&workprefs);
+                       inputdevice_updateconfig (NULL, &workprefs);
                        enable_for_inputdlg (hDlg);
                        InitializeListView (hDlg);
                        doselect = 1;
@@ -12267,7 +12268,7 @@ static void values_from_inputdlg (HWND hDlg, int inputchange)
                        eventnames[input_selected_event], _tcslen (custom) == 0 ? NULL : custom,
                        flags, -1, input_selected_sub_num);
                update_listview_input (hDlg);
-               inputdevice_updateconfig (&workprefs);
+               inputdevice_updateconfig (NULL, &workprefs);
        }
 }
 
@@ -12758,10 +12759,10 @@ static INT_PTR CALLBACK InputMapDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPA
        {
                pages[INPUTMAP_ID] = hDlg;
                currentpage = INPUTMAP_ID;
-               inputdevice_updateconfig (&workprefs);
+               inputdevice_updateconfig (NULL, &workprefs);
                if (inputmap_remap_counter == 0) {
                        inputdevice_compa_prepare_custom (&workprefs, inputmap_port, -1);
-                       inputdevice_updateconfig (&workprefs);
+                       inputdevice_updateconfig (NULL, &workprefs);
                }
                InitializeListView (hDlg);
                HWND h = GetDlgItem (hDlg, IDC_INPUTMAPLIST);
@@ -13119,7 +13120,7 @@ static INT_PTR CALLBACK InputDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM
                recursive++;
                pages[INPUT_ID] = hDlg;
                currentpage = INPUT_ID;
-               inputdevice_updateconfig (&workprefs);
+               inputdevice_updateconfig (NULL, &workprefs);
                inputdevice_config_change ();
                input_selected_widget = -1;
                init_inputdlg (hDlg);
@@ -14487,9 +14488,9 @@ static int ignorewindows[] = {
        -1,
        IDD_DISPLAY, IDC_DISPLAYSELECT,
        -1,
-       IDD_FILTER, IDC_FILTERPRESETS,
+       IDD_FILTER, IDC_FILTERMODE, IDC_FILTEROVERLAY, IDC_FILTERPRESETS,
        -1,
-       IDD_HARDDISK, IDC_VOLUMELIST,
+       IDD_HARDDISK, IDC_VOLUMELIST, IDC_CD_TEXT,
        -1,
        IDD_INPUT, IDC_INPUTDEVICE, IDC_INPUTLIST, IDC_INPUTAMIGA,
        -1,
@@ -14497,14 +14498,18 @@ static int ignorewindows[] = {
        -1,
        IDD_LOADSAVE, IDC_CONFIGTREE, IDC_EDITNAME, IDC_EDITDESCRIPTION, IDC_CONFIGLINK, IDC_EDITPATH,
        -1,
-       IDD_MISC1, IDC_LANGUAGE,
+       IDD_MISC1, IDC_LANGUAGE, IDC_STATENAME,
        -1,
-       IDD_PATHS, IDC_PATHS_ROM, IDC_PATHS_CONFIG, IDC_PATHS_SCREENSHOT, IDC_PATHS_SAVESTATE, IDC_PATHS_AVIOUTPUT, IDC_PATHS_SAVEIMAGE, IDC_PATHS_RIP,
+       IDD_PATHS, IDC_PATHS_ROM, IDC_PATHS_CONFIG, IDC_PATHS_SCREENSHOT, IDC_PATHS_SAVESTATE, IDC_PATHS_AVIOUTPUT, IDC_PATHS_SAVEIMAGE, IDC_PATHS_RIP, IDC_LOGPATH,
        -1,
-       IDD_IOPORTS, IDC_PRINTERLIST, IDC_SAMPLERLIST, IDC_PS_PARAMS, IDC_SERIAL, IDC_MIDIOUTLIST, IDC_MIDIINLIST,
+       IDD_IOPORTS, IDC_PRINTERLIST, IDC_SAMPLERLIST, IDC_PS_PARAMS, IDC_SERIAL, IDC_MIDIOUTLIST, IDC_MIDIINLIST, IDC_DONGLELIST,
        -1,
        IDD_SOUND, IDC_SOUNDCARDLIST, IDC_SOUNDDRIVESELECT,
        -1,
+       IDD_EXPANSION, IDC_RTG_DISPLAYSELECT,
+       -1,
+       IDD_GAMEPORTS, IDC_PORT0_JOYS, IDC_PORT1_JOYS, IDC_PORT2_JOYS, IDC_PORT3_JOYS,
+       -1,
        0
 };
 
@@ -14988,7 +14993,7 @@ static int do_filesys_insert (const TCHAR *root)
 {
        if (filesys_insert (-1, NULL, root, 0, 0) == 0)
                return filesys_media_change (root, 2, NULL);
-       return 1;
+       return 0;
 }
 
 int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int        currentpage)
@@ -15087,9 +15092,16 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int        currentpage)
 
                if (drvdrag) {
                        type = ZFILE_DISKIMAGE;
-               } else if (zip || harddrive) {
-                       do_filesys_insert (file);
-                       continue;
+               } else if ((zip || harddrive) && type != ZFILE_DISKIMAGE) {
+                       if (do_filesys_insert (file))
+                               continue;
+                       if (zip) {
+                               struct zfile *z2 = zfile_fopen (file, _T("rb"), mask);
+                               if (z2) {
+                                       type = zfile_gettype (z2);
+                                       zfile_fclose (z2);
+                               }
+                       }
                }
 
                switch (type)
@@ -15147,7 +15159,7 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int currentpage)
                case ZFILE_CONFIGURATION:
                        if (target_cfgfile_load (&workprefs, file, 0, 0)) {
                                if (full_property_sheet) {
-                                       inputdevice_updateconfig (&workprefs);
+                                       inputdevice_updateconfig (NULL, &workprefs);
                                        if (!workprefs.start_gui)
                                                ret = 1;
                                } else {
@@ -15803,7 +15815,7 @@ int gui_init (void)
        int ret;
 
        read_rom_list ();
-       inputdevice_updateconfig (&workprefs);
+       inputdevice_updateconfig (NULL, &workprefs);
        for (;;) {
                ret = GetSettings (1, currprefs.win32_notaskbarbutton ? hHiddenWnd : NULL);
                if (!restart_requested)
index 4fe1da8d3767efd9bcc001faaf10db0afd81b51b..c1b3a246ab6a1cb89b716fcf9313a90ae5ad207e 100644 (file)
@@ -4,6 +4,27 @@
 This is usual quick 2.5.0 bug fix version. Estimated release date: before Christmas.
 I try not to do any GUI changes this time, 2.5.0 translation DLLs should still work with 2.5.1.
 
+Beta 4:
+
+- Floppy read/write checkboxes didn't work (b1 filesystem update)
+- Writing to Maprom region crashed in JIT mode, ROM protection introduced in 25b6 is now disabled when maprom address is queried for the first time.
+- Inserting or ejecting USB game controller removed all Game Ports panel custom mappings. (older bug)
+- Only attempt to mount dragged zip as a harddrive if harddrive emulation is enabled, if no harddrives, attempt to insert as a disk image in DF0:.
+- Some mouse tweaks when fullscreen mode on secondary monitor positioned on left side of primary monitor (negative coordinates).
+- Harddrives panel CD file selection box file name was truncated if path contained "][" string.
+- uaeexe_server UAE boot ROM hook was set even if uae boot rom was disabled (Does something use this hook? seems ancient..)
+  This corrupted part of CDTV extended ROM in b2 and 2.5.0 versions. (b3 initialization order change partially fixed it)
+
+Beta 3:
+
+- bsdsocket was initialized too early, didn't configure if memory config changed due to not enough physical memory etc.. (old bug)
+- 32-bit Windows memory reservation limit was too small, some old configs had more memory available under 2.4.x and older versions (2.5)
+- Crash dump file is written to data path or TEMP if winuae.exe directory is write protected.
+- Do not crash if sound is enabled and number of sound output devices is zero.
+- Archive directory filesystem crash fixed (b1)
+- SCSI emulation READ commands returned data from wrong track (following track if CD had more than 1 tracks). Argh.
+- Back to MSVC 2010, 2012 seems to have some optimization and XP compatibility issues to solve, later..
+
 Beta 2:
 
 - Resuming pause with input event didn't restore sound. (b1)
index 1914d2b9a76d1c64be39e57d3ecf6e6cb95d0924..5f0a8cf6724b145f22b29d07714f54c5f238b98d 100644 (file)
@@ -28,6 +28,8 @@ void uaeexe_install (void)
 {
        uaecptr loop;
 
+       if (!uae_boot_rom)
+               return;
        loop = here ();
        org (UAEEXE_ORG);
        calltrap (deftrapres (uaeexe_server, 0, _T("uaeexe_server")));
index bc20ff6dda9a3d1b928bcf28825a96141a8dc3f1..df9fa61337db5b52b6b9839e652ce122db619009 100644 (file)
@@ -401,7 +401,12 @@ static uae_u32 REGPARAM2 uaelib_demux2 (TrapContext *context)
 
        case 70: return 0; /* RESERVED. Something uses this.. */
 
-       case 80: return currprefs.maprom ? currprefs.maprom : 0xffffffff;
+       case 80:
+               if (!currprefs.maprom)
+                       return 0xffffffff;
+               /* Disable possible ROM protection */
+               unprotect_maprom ();
+               return currprefs.maprom;
        case 81: return cfgfile_uaelib (ARG1, ARG2, ARG3, ARG4);
        case 82: return cfgfile_uaelib_modify (ARG1, ARG2, ARG3, ARG4, ARG5);
        case 83: currprefs.mmkeyboard = ARG1 ? 1 : 0; return currprefs.mmkeyboard;
index e532ad96ac483ca80264405c6db975e7ae70c794..f391859d00ace1f0d64fe10f278f94e7d413d8c2 100644 (file)
--- a/zfile.cpp
+++ b/zfile.cpp
@@ -3325,7 +3325,7 @@ int zfile_stat_archive (const TCHAR *path, struct mystat *s)
        struct zvolume *zv = get_zvolume (path);
        struct znode *zn = get_znode (zv, path, TRUE);
 
-       memset (s, 0, sizeof (struct _stat64));
+       memset (s, 0, sizeof (struct mystat));
        if (!zn)
                return 0;
        s->size = zn->size;