]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
3200b10
authorToni Wilen <twilen@winuae.net>
Fri, 28 Aug 2015 17:06:28 +0000 (20:06 +0300)
committerToni Wilen <twilen@winuae.net>
Fri, 28 Aug 2015 17:06:28 +0000 (20:06 +0300)
28 files changed:
blkdev.cpp
cfgfile.cpp
debug.cpp
devices.cpp
dosbox/keyboard.cpp
ethernet.cpp
expansion.cpp
filesys.cpp
ide.cpp
idecontrollers.cpp
include/ide.h
include/options.h
include/rommgr.h
od-win32/dinput.cpp
od-win32/resources/resource.h
od-win32/resources/winuae.rc
od-win32/serial_win32.cpp
od-win32/win32.cpp
od-win32/win32.h
od-win32/win32_uaenet.cpp
od-win32/win32gfx.cpp
od-win32/win32gui.cpp
od-win32/winuae_msvc14/winuae_msvc.sln
od-win32/winuae_msvc14/winuae_msvc.vcxproj
od-win32/winuaechangelog.txt
rommgr.cpp
scsi.cpp
x86.cpp

index 630c8759fa6522bddc5cfe83d46bb429d6351057..e2532092ad985a46aed585d871f49cdbe65d9d07 100644 (file)
@@ -170,11 +170,14 @@ static void install_driver (int flags)
                                }
                                break;
                        }
-                       // use image mode if driver disabled
-                       for (int j = 1; j < NUM_DEVICE_TABLE_ENTRIES; j++) {
-                               if (devicetable[j] == st->device_func && driver_installed[j] < 0) {
-                                       st->device_func = devicetable[SCSI_UNIT_IMAGE];
-                                       st->scsiemu = true;
+                       // do not default to image mode if unit 1+ and automount
+                       if (i == 0 || !currprefs.win32_automount_cddrives) {
+                               // use image mode if driver disabled
+                               for (int j = 1; j < NUM_DEVICE_TABLE_ENTRIES; j++) {
+                                       if (devicetable[j] == st->device_func && driver_installed[j] < 0) {
+                                               st->device_func = devicetable[SCSI_UNIT_IMAGE];
+                                               st->scsiemu = true;
+                                       }
                                }
                        }
                }
@@ -192,7 +195,7 @@ static void install_driver (int flags)
                                        if (!ok && st->device_func != devicetable[SCSI_UNIT_IMAGE]) {
                                                st->device_func = devicetable[SCSI_UNIT_IMAGE];
                                                st->scsiemu = true;
-                                               write_log (_T("Fallback to image mode\n"));
+                                               write_log (_T("Fallback to image mode, unit %d.\n"), i);
                                                driver_installed[j] = -1;
                                        } else {
                                                driver_installed[j] = 1;
index bb515a3f9332755b7ad6898b4d7ff503b640db97..c3d9848a62b4e3d2f0f105b6b8c74549cc52b641 100644 (file)
@@ -1810,6 +1810,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
                cfgfile_write_str (f, _T("cpu_speed"), p->m68k_speed < 0 ? _T("max") : _T("real"));
        }
        cfgfile_write (f, _T("cpu_throttle"), _T("%.1f"), p->m68k_speed_throttle);
+       cfgfile_dwrite(f, _T("cpu_x86_throttle"), _T("%.1f"), p->x86_speed_throttle);
 
        /* do not reorder start */
        write_compatibility_cpu(f, p);
@@ -4545,7 +4546,10 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCH
                p->m68k_speed *= CYCLE_UNIT;
                return 1;
        }
-       if (cfgfile_doubleval (option, value, _T("cpu_throttle"), &p->m68k_speed_throttle)) {
+       if (cfgfile_doubleval(option, value, _T("cpu_throttle"), &p->m68k_speed_throttle)) {
+               return 1;
+       }
+       if (cfgfile_doubleval(option, value, _T("cpu_x86_throttle"), &p->x86_speed_throttle)) {
                return 1;
        }
        if (cfgfile_intval (option, value, _T("finegrain_cpu_speed"), &p->m68k_speed, 1)) {
index 1ff4afb54d47488fde9f4d168820f0b60e9d9e59..bba3425cd68eb07bc678236707728b4b8311e6dd 100644 (file)
--- a/debug.cpp
+++ b/debug.cpp
@@ -1178,7 +1178,7 @@ static void decode_dma_record (int hpos, int vpos, int toggle, bool logfile)
        int h, i, maxh, cnt;
        uae_u32 cycles;
 
-       if (!dma_record[0])
+       if (!dma_record[0] || hpos < 0 || vpos < 0)
                return;
        dr = &dma_record[dma_record_toggle ^ toggle][vpos * NR_DMA_REC_HPOS];
        if (logfile)
index 25b29225b8635879148d710f84bc942c8b701e08..4498e6aa22c31b0a22ab68c89ee141902ec4fec9 100644 (file)
@@ -57,6 +57,7 @@
 #include "pci.h"
 #include "pci_hw.h"
 #include "x86.h"
+#include "ethernet.h"
 #ifdef RETROPLATFORM
 #include "rp.h"
 #endif
@@ -353,6 +354,7 @@ void do_leave_program (void)
        cfgfile_addcfgparam (0);
        machdep_free ();
        driveclick_free();
+       ethernet_enumerate_free();
 }
 
 void virtualdevice_init (void)
index 5f86de02e3e7bf5b4f33ab5359cca05309669bc4..c857cddd69dcd3f4e0a0549d606235e6a7009c28 100644 (file)
@@ -58,7 +58,7 @@ static struct {
        Bit8u outport;
 } keyb;
 
-extern void x86_doirq(unsigned char);
+extern void x86_doirq_keyboard(void);
 
 bool x86_is_keyboard(void)
 {
@@ -72,7 +72,7 @@ static void KEYBOARD_SetPort60(Bit8u val) {
 //             PIC_ActivateIRQ(6);
 //     else
 //             PIC_ActivateIRQ(1);
-       x86_doirq(1);
+       x86_doirq_keyboard();
 }
 
 static void KEYBOARD_TransferBuffer(Bitu val) {
index e62740fa6b3582ed3670a03e27ac37795c1c0fea..5f2a7696976e070661953444db4cd4394be668e9 100644 (file)
@@ -9,6 +9,7 @@
 #endif
 #include "threaddep/thread.h"
 #include "options.h"
+#include "sana2.h"
 
 struct ethernet_data
 {
@@ -210,8 +211,9 @@ bool ethernet_enumerate (struct netdriverdata **nddp, const TCHAR *name)
 #ifdef WITH_UAENET_PCAP
        nd = uaenet_enumerate (NULL);
        if (nd) {
-               for (int i = 0; nd[i].active; i++) {
-                       nddp[j++] = &nd[i];
+               for (int i = 0; i < MAX_TOTAL_NET_DEVICES; i++) {
+                       if (nd[i].active)
+                               nddp[j++] = &nd[i];
                }
        }
 #endif
index 0ffd8a879ce95c8dc745924361e9cbccb2385a60..f5c421907471ad9087bbd1eeae9719bbbb216793 100644 (file)
@@ -2803,8 +2803,8 @@ const struct expansionromtype expansionroms[] = {
                bridge_settings
        },
        {
-               _T("apollo"), _T("Apollo"), _T("ACT"),
-               apollo_init_hd, NULL, apollo_add_scsi_unit, ROMTYPE_APOLLO, 0, 0, BOARD_AUTOCONFIG_Z2, false,
+               _T("apollo"), _T("Apollo 500/2000"), _T("3-State"),
+               apollo_init_hd, NULL, apollo_add_scsi_unit, ROMTYPE_APOLLOHD, 0, 0, BOARD_AUTOCONFIG_Z2, false,
                NULL, 0,
                false, EXPANSIONTYPE_SCSI | EXPANSIONTYPE_IDE,
                8738, 0, 0
index 7da0b8ec4b84f37477b4ade724b7615345bd0f60..3fca53832f13e6026ed1f895aa08e7779dfb09c2 100644 (file)
@@ -1077,7 +1077,7 @@ int sprintf_filesys_unit (TCHAR *buffer, int num)
 
        if (uip[num].volname != 0)
                _stprintf (buffer, _T("(DH%d:) Filesystem, %s: %s %s"), num, uip[num].volname,
-               uip[num].rootdir, uip[num].readonly ? "ro" : "");
+               uip[num].rootdir, uip[num].readonly ? _T("ro") : _T(""));
        else
                _stprintf (buffer, _T("(DH%d:) Hardfile, \"%s\", size %d Mbytes"), num,
                uip[num].rootdir, (int)(uip[num].hf.virtsize / (1024 * 1024)));
@@ -5134,7 +5134,6 @@ static void
                        /* it really crosses memory boundary */
                        uae_u8 *buf;
                        
-                       write_log (_T("unixfs warning: Bad pointer passed for read: %08x, size %d\n"), addr, size);
                        /* ugh this is inefficient but easy */
 
                        if (key_seek(k, k->file_pos, SEEK_SET) < 0) {
@@ -5235,7 +5234,6 @@ static void
 
                actual = fs_write (k->fd, realpt, size);
        } else {
-               write_log (_T("unixfs warning: Bad pointer passed for write: %08x, size %d\n"), addr, size);
                /* ugh this is inefficient but easy */
 
                if (key_seek(k, k->file_pos, SEEK_SET) < 0) {
diff --git a/ide.cpp b/ide.cpp
index 88a7b22fd5f0afa710369045bdf6530fae986578..dc618ade458b97a213dae8bba73fb2eaf57cb1a1 100644 (file)
--- a/ide.cpp
+++ b/ide.cpp
@@ -714,7 +714,7 @@ static void do_process_packet_command (struct ide_hdf *ide)
 
 static void do_process_rw_command (struct ide_hdf *ide)
 {
-       unsigned int cyl, head, sec, nsec;
+       unsigned int cyl, head, sec, nsec, nsec_total;
        uae_u64 lba;
        bool last;
 
@@ -733,18 +733,29 @@ static void do_process_rw_command (struct ide_hdf *ide)
                ide_fail_err (ide, IDE_ERR_IDNF);
                return;
        }
+       nsec_total = nsec;
+       ide_grow_buffer(ide, nsec_total * ide->blocksize);
+
        if (nsec > ide->data_multi)
                nsec = ide->data_multi;
 
-       ide_grow_buffer(ide, nsec * ide->blocksize);
+       if (ide->buffer_offset == 0) {
+               // store initial lba and number of sectors to transfer
+               ide->start_lba = lba;
+               ide->start_nsec = nsec_total;
+       }
+
        if (ide->direction) {
-               hdf_write (&ide->hdhfd.hfd, ide->secbuf, lba * ide->blocksize, nsec * ide->blocksize);
                if (IDE_LOG > 1)
-                       write_log (_T("IDE%d write, %d bytes written\n"), ide->num, nsec * ide->blocksize);
+                       write_log (_T("IDE%d write, %d/%d bytes, buffer offset %d\n"), ide->num, nsec * ide->blocksize, nsec_total * ide->blocksize, ide->buffer_offset);
        } else {
-               hdf_read (&ide->hdhfd.hfd, ide->secbuf, lba * ide->blocksize, nsec * ide->blocksize);
+               if (ide->buffer_offset == 0) {
+                       hdf_read(&ide->hdhfd.hfd, ide->secbuf, ide->start_lba * ide->blocksize, ide->start_nsec * ide->blocksize);
+                       if (IDE_LOG > 1)
+                               write_log(_T("IDE%d initial read, %d bytes\n"), ide->num, nsec_total * ide->blocksize);
+               }
                if (IDE_LOG > 1)
-                       write_log (_T("IDE%d read, read %d bytes\n"), ide->num, nsec * ide->blocksize);
+                       write_log (_T("IDE%d read, read %d/%d bytes, buffer offset=%d\n"), ide->num, nsec * ide->blocksize, nsec_total * ide->blocksize, ide->buffer_offset);
        }
        ide->intdrq = true;
        last = dec_nsec (ide, nsec) == 0;
@@ -754,10 +765,24 @@ static void do_process_rw_command (struct ide_hdf *ide)
        }
        if (last && ide->direction) {
                ide->intdrq = false;
+               hdf_write (&ide->hdhfd.hfd, ide->secbuf, ide->start_lba * ide->blocksize, ide->start_nsec * ide->blocksize);
                if (IDE_LOG > 1)
-                       write_log (_T("IDE%d write finished\n"), ide->num);
+                       write_log (_T("IDE%d write finished, %d bytes\n"), ide->num, ide->start_nsec * ide->blocksize);
+       }
+
+       if (ide->direction) {
+               if (last) {
+                       ide_fast_interrupt(ide);
+               } else {
+                       ide->irq_delay = 1;
+               }
+       } else {
+               if (ide->buffer_offset == 0) {
+                       ide_fast_interrupt(ide);
+               } else {
+                       ide->irq_delay = 1;
+               }
        }
-       ide_fast_interrupt (ide);
 }
 
 static void ide_read_sectors (struct ide_hdf *ide, int flags)
@@ -792,6 +817,7 @@ static void ide_read_sectors (struct ide_hdf *ide, int flags)
        ide->data_offset = 0;
        ide->data_size = nsec * ide->blocksize;
        ide->direction = 0;
+       ide->buffer_offset = 0;
        // read start: preload sector(s), then trigger interrupt.
        process_rw_command (ide);
 }
@@ -829,6 +855,7 @@ static void ide_write_sectors (struct ide_hdf *ide, int flags)
        ide->data_offset = 0;
        ide->data_size = nsec * ide->blocksize;
        ide->direction = 1;
+       ide->buffer_offset = 0;
        // write start: set DRQ and clear BSY. No interrupt.
        ide->regs.ide_status |= IDE_STATUS_DRQ;
        ide->regs.ide_status &= ~IDE_STATUS_BSY;
@@ -956,9 +983,9 @@ static uae_u16 ide_get_data_2(struct ide_hdf *ide, int bussize)
                }
        } else {
                if (bussize) {
-                       v = ide->secbuf[ide->data_offset + 1] | (ide->secbuf[ide->data_offset + 0] << 8);
+                       v = ide->secbuf[ide->buffer_offset + ide->data_offset + 1] | (ide->secbuf[ide->buffer_offset + ide->data_offset + 0] << 8);
                } else {
-                       v = ide->secbuf[ide->data_offset];
+                       v = ide->secbuf[ide->buffer_offset + ide->data_offset];
                }
                if (IDE_LOG > 4)
                        write_log (_T("IDE%d DATA read %04x\n"), ide->num, v);
@@ -968,8 +995,10 @@ static uae_u16 ide_get_data_2(struct ide_hdf *ide, int bussize)
                } else {
                        ide->data_size -= inc;
                        if (((ide->data_offset % ide->blocksize) == 0) && ((ide->data_offset / ide->blocksize) % ide->data_multi) == 0) {
-                               if (ide->data_size)
-                                       process_rw_command (ide);
+                               if (ide->data_size) {
+                                       ide->buffer_offset += ide->data_offset;
+                                       do_process_rw_command(ide);
+                               }
                        }
                }
                if (ide->data_size == 0) {
@@ -1006,11 +1035,20 @@ static void ide_put_data_2(struct ide_hdf *ide, uae_u16 v, int bussize)
                return;
        }
        ide_grow_buffer(ide, ide->packet_data_offset + ide->data_offset + 2);
-       if (bussize) {
-               ide->secbuf[ide->packet_data_offset + ide->data_offset + 1] = v & 0xff;
-               ide->secbuf[ide->packet_data_offset + ide->data_offset + 0] = v >> 8;
+       if (ide->packet_state) {
+               if (bussize) {
+                       ide->secbuf[ide->packet_data_offset + ide->data_offset + 1] = v & 0xff;
+                       ide->secbuf[ide->packet_data_offset + ide->data_offset + 0] = v >> 8;
+               } else {
+                       ide->secbuf[ide->packet_data_offset + ide->data_offset] = v;
+               }
        } else {
-               ide->secbuf[ide->packet_data_offset + ide->data_offset] = v;
+               if (bussize) {
+                       ide->secbuf[ide->buffer_offset + ide->data_offset + 1] = v & 0xff;
+                       ide->secbuf[ide->buffer_offset + ide->data_offset + 0] = v >> 8;
+               } else {
+                       ide->secbuf[ide->buffer_offset + ide->data_offset] = v;
+               }
        }
        ide->data_offset += inc;
        ide->data_size -= inc;
@@ -1026,7 +1064,9 @@ static void ide_put_data_2(struct ide_hdf *ide, uae_u16 v, int bussize)
                if (ide->data_size == 0) {
                        process_rw_command (ide);
                } else if (((ide->data_offset % ide->blocksize) == 0) && ((ide->data_offset / ide->blocksize) % ide->data_multi) == 0) {
-                       process_rw_command (ide);
+                       int off = ide->data_offset;
+                       do_process_rw_command(ide);
+                       ide->buffer_offset += off;
                }
        }
 }
index df46859748b8fc096db3335ea412c762c3dc3724..f5bd7755834aa504ae79dad9ee3fd7ed1e6a0e58 100644 (file)
@@ -1234,7 +1234,7 @@ void alf_add_ide_unit(int ch, struct uaedev_config_info *ci, struct romconfig *r
 // prod 0x23 = SCSI only
 // prod 0x33 = IDE only
 
-const uae_u8 apollo_autoconfig[16] = { 0xd2, 0x23, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, APOLLO_ROM_OFFSET >> 8, APOLLO_ROM_OFFSET & 0xff };
+const uae_u8 apollo_autoconfig[16] = { 0xd1, 0x22, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, APOLLO_ROM_OFFSET >> 8, APOLLO_ROM_OFFSET & 0xff };
 const uae_u8 apollo_autoconfig_cpuboard[16] = { 0xd2, 0x23, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, APOLLO_ROM_OFFSET >> 8, APOLLO_ROM_OFFSET & 0xff };
 const uae_u8 apollo_autoconfig_cpuboard_060[16] = { 0xd2, 0x23, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x00, 0x02, APOLLO_ROM_OFFSET >> 8, APOLLO_ROM_OFFSET & 0xff };
 
@@ -1251,7 +1251,6 @@ static addrbank *apollo_init(struct romconfig *rc, bool cpuboard)
        ide->configured = 0;
        ide->bank = &ide_bank_generic;
        ide->rom_size = 32768;
-       ide->mask = 131072 - 1;
        ide->type = APOLLO_IDE;
 
        memset(ide->acmemory, 0xff, sizeof ide->acmemory);
@@ -1259,6 +1258,7 @@ static addrbank *apollo_init(struct romconfig *rc, bool cpuboard)
        ide->rom = xcalloc(uae_u8, ide->rom_size);
        memset(ide->rom, 0xff, ide->rom_size);
        ide->rom_mask = ide->rom_size - 1;
+       ide->keepautoconfig = false;
        autoconfig = apollo_autoconfig;
        if (cpuboard) {
                if (currprefs.cpu_model == 68060)
@@ -1266,22 +1266,28 @@ static addrbank *apollo_init(struct romconfig *rc, bool cpuboard)
                else
                        autoconfig = apollo_autoconfig_cpuboard;
        }
-       struct zfile *z = read_device_from_romconfig(rc, roms);
        for (int i = 0; i < 16; i++) {
                uae_u8 b = autoconfig[i];
                ew(ide, i * 4, b);
        }
-       if (z) {
-               int len = zfile_size(z);
-               // skip 68060 $f0 ROM block
-               if (len >= 65536)
-                       zfile_fseek(z, 32768, SEEK_SET);
-               for (int i = 0; i < 32768; i++) {
-                       uae_u8 b;
-                       zfile_fread(&b, 1, 1, z);
-                       ide->rom[i] = b;
+       if (cpuboard) {
+               ide->mask = 131072 - 1;
+               struct zfile *z = read_device_from_romconfig(rc, roms);
+               if (z) {
+                       int len = zfile_size(z);
+                       // skip 68060 $f0 ROM block
+                       if (len >= 65536)
+                               zfile_fseek(z, 32768, SEEK_SET);
+                       for (int i = 0; i < 32768; i++) {
+                               uae_u8 b;
+                               zfile_fread(&b, 1, 1, z);
+                               ide->rom[i] = b;
+                       }
+                       zfile_fclose(z);
                }
-               zfile_fclose(z);
+       } else {
+               ide->mask = 65536 - 1;
+               load_rom_rc(rc, roms, 16384, 0, ide->rom, 32768, LOADROM_EVENONLY_ODDONE | LOADROM_FILL);
        }
        return ide->bank;
 }
@@ -1297,7 +1303,7 @@ addrbank *apollo_init_cpu(struct romconfig *rc)
 
 void apollo_add_ide_unit(int ch, struct uaedev_config_info *ci, struct romconfig *rc)
 {
-       add_ide_standard_unit(ch, ci, rc, apollo_board, APOLLO_IDE, false, false, 2);
+       add_ide_standard_unit(ch, ci, rc, apollo_board, APOLLO_IDE, true, false, 2);
 }
 
 addrbank *masoboshi_init(struct romconfig *rc)
@@ -1417,10 +1423,11 @@ void mtec_add_ide_unit(int ch, struct uaedev_config_info *ci, struct romconfig *
 addrbank *rochard_init(struct romconfig *rc)
 {
        struct ide_board *ide = getide(rc);
-       int roms[2];
+       int roms[3];
 
        roms[0] = 138;
-       roms[1] = -1;
+       roms[1] = 146;
+       roms[2] = -1;
        ide->configured = 0;
        ide->bank = &ide_bank_generic;
        ide->rom_size = 32768;
index 440e465a83b7ee875c88d47046bea06b05bc9131..689e4b34601161482ccb7e97abe9a4a72a8f98d4 100644 (file)
@@ -61,6 +61,7 @@ struct ide_hdf
 
        uae_u8 *secbuf;
        int secbuf_size;
+       int buffer_offset;
        int data_offset;
        int data_size;
        int data_multi;
@@ -68,6 +69,8 @@ struct ide_hdf
        bool intdrq;
        bool lba48;
        bool lba48cmd;
+       uae_u64 start_lba;
+       int start_nsec;
        uae_u8 multiple_mode;
        int irq_delay;
        int irq;
index bad74784be5f1e5e0e157a00ffc4aff9d0ab5b91..5065be9c258b12cc0f0a7f237c7655bf2d436bb2 100644 (file)
@@ -552,6 +552,7 @@ struct uae_prefs {
 
        int m68k_speed;
        double m68k_speed_throttle;
+       double x86_speed_throttle;
        int cpu_model;
        int mmu_model;
        int cpu060_revision;
@@ -673,6 +674,7 @@ struct uae_prefs {
        TCHAR win32_guipage[32];
        TCHAR win32_guiactivepage[32];
        bool win32_filesystem_mangle_reserved_names;
+       bool right_control_is_right_win_key;
 #ifdef WITH_SLIRP
        struct slirp_redir slirp_redirs[MAX_SLIRP_REDIRS]; 
 #endif
index 047c7fd5025292027fa101c147cb706774185dda..035ef895203914906243f8dbfc3063898e4d8d0a 100644 (file)
@@ -98,6 +98,7 @@ extern int decode_cloanto_rom_do (uae_u8 *mem, int size, int real_size);
 #define ROMTYPE_X86_XT_IDE     0x00100033
 #define ROMTYPE_PICASSOIV      0x00100034
 #define ROMTYPE_x86_VGA                0x00100035
+#define ROMTYPE_APOLLOHD       0x00100036
 
 #define ROMTYPE_NOT                    0x00800000
 #define ROMTYPE_QUAD           0x01000000
index 15942790a264bba26ad3839e1b633cc05d10c12c..ca4cfb25609df3cd639fadbb22c6b0bc1ea10f08 100644 (file)
@@ -2261,6 +2261,9 @@ static void handle_rawinput_2 (RAWINPUT *raw)
                if (scancode == 0xaa || scancode == 0)
                        return;
 
+               if (currprefs.right_control_is_right_win_key && scancode == DIK_RCONTROL) {
+                       scancode = DIK_RWIN;
+               }
 
                if (!istest) {
                        if (scancode == DIK_SYSRQ)
@@ -3424,6 +3427,8 @@ static void read_kb (void)
                                int pressed = (didod[j].dwData & 0x80) ? 1 : 0;
 
                                //write_log (_T("%d: %02X %d\n"), j, scancode, pressed);
+                               if (currprefs.right_control_is_right_win_key && scancode == DIK_RCONTROL)
+                                       scancode = DIK_RWIN;
                                if (!istest)
                                        scancode = keyhack (scancode, pressed, i);
                                if (scancode < 0)
index 310011f9a6e4deb278c6c6c8f228175f333b515b..b484027a218395ddf8edeb64f8ec712635db0f3f 100644 (file)
 #define IDC_PPC_CPUIDLE                 1231
 #define IDC_11KHZ                       1232
 #define IDC_22KHZ                       1233
+#define IDC_SPEED_x86                   1233
 #define IDC_44KHZ                       1234
 #define IDC_48KHZ                       1235
 #define IDC_SOUNDSIZE                   1236
 #define IDC_FLUSHPRINTER                1510
 #define IDC_MAPDRIVES_REMOVABLE         1510
 #define IDC_PORT0_TEST                  1510
+#define IDC_CPUTEXT_x86                 1510
 #define IDC_SCREENRESTEXT               1511
 #define IDC_MAPDRIVES_AUTO              1511
 #define IDC_WIDTHTEXT                   1512
 #define IDC_DBG_AMEM                    1745
 #define IDC_CS_DIPAGNUS                 1745
 #define IDC_DBG_SP_VBR                  1746
-#define IDC_CS_CDTVRAMEXP2              1746
 #define IDC_CS_CDTVCR                   1746
 #define IDC_DBG_MMISC                   1747
 #define IDC_DBG_PC                      1748
 #define IDC_DBG_FPREG                   1750
 #define IDC_DBG_FPSR                    1751
 #define IDC_DBG_OUTPUT2                 1752
-#define IDC_CS_RESETWARNING2            1752
 #define IDC_CS_CIATODBUG                1752
 #define IDC_DBG_MEMINPUT                1753
 #define IDC_CS_Z3AUTOCONFIG             1753
index 3ea262e1c376fd187defa6dee8c8e8aedbd475f8..78c752d9779f4c19a6eaaf1da99148349b0212ea 100644 (file)
@@ -201,7 +201,7 @@ BEGIN
     CONTROL         "Autoconfig Z2 Fast RAM",IDC_FASTMEMAUTOCONFIG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,194,120,10
 END
 
-IDD_CPU DIALOGEX 0, 0, 396, 292
+IDD_CPU DIALOGEX 0, 0, 396, 317
 STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
 FONT 8, "MS Sans Serif", 0, 0, 0x0
 BEGIN
@@ -221,7 +221,7 @@ BEGIN
                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,148,120,11
     CONTROL         "Unimplemented CPU emu [] Emulate 68060 unimplemented integer instructions",IDC_CPU_UNIMPLEMENTED,
                     "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,8,161,118,10
-    GROUPBOX        "CPU Emulation Speed",IDC_STATIC,136,3,258,95
+    GROUPBOX        "CPU Emulation Speed",IDC_STATIC,136,1,258,97
     CONTROL         "Fastest possible",IDC_CS_HOST,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_GROUP | WS_TABSTOP,143,19,195,10
     CONTROL         "Approximate A500/A1200 or cycle-exact",IDC_CS_68000,
                     "Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,143,33,195,10
@@ -234,7 +234,7 @@ BEGIN
     RTEXT           "CPU Frequency",IDC_STATIC,139,121,67,10,SS_CENTERIMAGE
     COMBOBOX        IDC_CPU_FREQUENCY,215,120,89,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
     EDITTEXT        IDC_CPU_FREQUENCY2,312,119,70,15
-    GROUPBOX        "FPU",IDC_STATIC,1,188,129,101,BS_LEFT
+    GROUPBOX        "FPU",IDC_STATIC,1,188,129,128,BS_LEFT
     CONTROL         "None",IDC_FPU0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,8,202,87,10
     CONTROL         "68881",IDC_FPU1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,216,87,10
     CONTROL         "68882",IDC_FPU2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,229,87,10
@@ -243,21 +243,25 @@ BEGIN
                     "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,8,259,117,10
     CONTROL         "Unimplemented FPU emu [] Emulate FPU unimplemented instructions",IDC_FPU_UNIMPLEMENTED,
                     "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,8,272,116,10
-    GROUPBOX        "Advanced JIT Settings",IDC_STATIC,136,209,258,80
-    RTEXT           "Cache size:",IDC_STATIC,143,225,66,10,SS_CENTERIMAGE
-    CONTROL         "Slider1",IDC_CACHE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,212,219,115,20
-    EDITTEXT        IDC_CACHETEXT,331,224,30,12,ES_CENTER | ES_READONLY
-    CONTROL         "Hard flush",IDC_HARDFLUSH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,146,244,84,11
-    CONTROL         "Constant jump",IDC_CONSTJUMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,146,258,84,11
-    CONTROL         "FPU support",IDC_JITFPU,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,146,272,84,11
-    CONTROL         "No flags",IDC_NOFLAGS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,313,244,68,11
-    CONTROL         "Direct",IDC_TRUST0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,313,261,72,10
-    CONTROL         "Indirect",IDC_TRUST1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,313,275,72,10
+    GROUPBOX        "Advanced JIT Settings",IDC_STATIC,136,245,258,70
+    RTEXT           "Cache size:",IDC_STATIC,143,261,66,10,SS_CENTERIMAGE
+    CONTROL         "Slider1",IDC_CACHE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,212,255,115,20
+    EDITTEXT        IDC_CACHETEXT,331,260,30,12,ES_CENTER | ES_READONLY
+    CONTROL         "Hard flush",IDC_HARDFLUSH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,299,281,84,11
+    CONTROL         "Constant jump",IDC_CONSTJUMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,221,281,71,11
+    CONTROL         "FPU support",IDC_JITFPU,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,143,281,71,11
+    CONTROL         "No flags",IDC_NOFLAGS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,299,299,68,11
+    CONTROL         "Direct",IDC_TRUST0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,143,299,72,10
+    CONTROL         "Indirect",IDC_TRUST1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,221,299,72,10
     CONTROL         "PPC CPU emulation (Blizzard PPC / CyberStorm PPC) [] Automatically configure CyberStorm PPC or Blizzard PPC setup.",IDC_CPU_PPC,
                     "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,145,161,236,10
-    GROUPBOX        "PPC CPU options",IDC_STATIC,136,144,258,62
+    GROUPBOX        "PPC CPU options",IDC_STATIC,136,144,258,57
     RTEXT           "Stopped M68K CPU idle mode",IDC_STATIC,180,183,121,9
     CONTROL         "",IDC_PPC_CPUIDLE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,308,177,69,21
+    CONTROL         "",IDC_SPEED_x86,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,278,215,108,20
+    RTEXT           "CPU Speed",IDC_STATIC,147,221,55,9,SS_CENTERIMAGE
+    GROUPBOX        "x86 Bridgeboard CPU options",IDC_STATIC,136,202,258,42
+    EDITTEXT        IDC_CPUTEXT_x86,224,220,39,12,ES_CENTER | ES_READONLY
 END
 
 IDD_FLOPPY DIALOGEX 0, 0, 396, 261
@@ -1425,7 +1429,7 @@ BEGIN
 
     IDD_CPU, DIALOG
     BEGIN
-        BOTTOMMARGIN, 291
+        BOTTOMMARGIN, 316
     END
 
     IDD_FLOPPY, DIALOG
index 2cb0529258d00c920f8aaf1b248a652d23b49a60..925f2ecc3649384fe00d17e943a4c2b88c73fa1e 100644 (file)
@@ -445,9 +445,6 @@ static void serdatcopy(void)
        serdatshift_masked = serdatshift & ((1 << bits) - 1);
        data_in_sershift = 1;
        data_in_serdat = 0;
-       INTREQ(0x8000 | 0x0001);
-       serial_check_irq();
-       checksend();
 
        if (seriallog) {
                gotlogwrite = true;
@@ -487,6 +484,8 @@ static void serdatcopy(void)
                event2_newevent_x(-1, per, 0, sersend_ce);
        }
 
+       INTREQ(0x8000 | 0x0001);
+       checksend();
 }
 
 void serial_hsynchandler (void)
index 091410556f4e8315dc4c701255976e11842fb85b..48ded305f0605a911818ae2aec6d259e4740ec7b 100644 (file)
@@ -3540,7 +3540,8 @@ void target_save_options (struct zfile *f, struct uae_prefs *p)
        cfgfile_target_dwrite_str (f, _T("parjoyport1"), p->win32_parjoyport1);
        cfgfile_target_dwrite_str (f, _T("gui_page"), p->win32_guipage);
        cfgfile_target_dwrite_str (f, _T("gui_active_page"), p->win32_guiactivepage);
-       cfgfile_target_dwrite_bool (f, _T("filesystem_mangle_reserved_names"), p->win32_filesystem_mangle_reserved_names);
+       cfgfile_target_dwrite_bool(f, _T("filesystem_mangle_reserved_names"), p->win32_filesystem_mangle_reserved_names);
+       cfgfile_target_dwrite_bool(f, _T("right_control_is_right_win"), p->right_control_is_right_win_key);
 
        cfgfile_target_dwrite (f, _T("extraframewait"), _T("%d"), extraframewait);
        cfgfile_target_dwrite (f, _T("framelatency"), _T("%d"), forcedframelatency);
@@ -3591,47 +3592,48 @@ int target_parse_option (struct uae_prefs *p, const TCHAR *option, const TCHAR *
        int i, v;
        bool tbool;
 
-       int result = (cfgfile_yesno (option, value, _T("middle_mouse"), &p->win32_middle_mouse)
-               || cfgfile_yesno (option, value, _T("map_drives"), &p->win32_automount_drives)
-               || cfgfile_yesno (option, value, _T("map_drives_auto"), &p->win32_automount_removable)
-               || cfgfile_yesno (option, value, _T("map_cd_drives"), &p->win32_automount_cddrives)
-               || cfgfile_yesno (option, value, _T("map_net_drives"), &p->win32_automount_netdrives)
-               || cfgfile_yesno (option, value, _T("map_removable_drives"), &p->win32_automount_removabledrives)
-               || cfgfile_yesno (option, value, _T("logfile"), &p->win32_logfile)
-               || cfgfile_yesno (option, value, _T("networking"), &p->socket_emu)
-               || cfgfile_yesno (option, value, _T("borderless"), &p->win32_borderless)
-               || cfgfile_yesno (option, value, _T("blank_monitors"), &p->win32_blankmonitors)
-               || cfgfile_yesno (option, value, _T("active_not_captured_pause"), &p->win32_active_nocapture_pause)
-               || cfgfile_yesno (option, value, _T("active_not_captured_nosound"), &p->win32_active_nocapture_nosound)
-               || cfgfile_yesno (option, value, _T("inactive_pause"), &p->win32_inactive_pause)
-               || cfgfile_yesno (option, value, _T("inactive_nosound"), &p->win32_inactive_nosound)
+       int result = (cfgfile_yesno(option, value, _T("middle_mouse"), &p->win32_middle_mouse)
+               || cfgfile_yesno(option, value, _T("map_drives"), &p->win32_automount_drives)
+               || cfgfile_yesno(option, value, _T("map_drives_auto"), &p->win32_automount_removable)
+               || cfgfile_yesno(option, value, _T("map_cd_drives"), &p->win32_automount_cddrives)
+               || cfgfile_yesno(option, value, _T("map_net_drives"), &p->win32_automount_netdrives)
+               || cfgfile_yesno(option, value, _T("map_removable_drives"), &p->win32_automount_removabledrives)
+               || cfgfile_yesno(option, value, _T("logfile"), &p->win32_logfile)
+               || cfgfile_yesno(option, value, _T("networking"), &p->socket_emu)
+               || cfgfile_yesno(option, value, _T("borderless"), &p->win32_borderless)
+               || cfgfile_yesno(option, value, _T("blank_monitors"), &p->win32_blankmonitors)
+               || cfgfile_yesno(option, value, _T("active_not_captured_pause"), &p->win32_active_nocapture_pause)
+               || cfgfile_yesno(option, value, _T("active_not_captured_nosound"), &p->win32_active_nocapture_nosound)
+               || cfgfile_yesno(option, value, _T("inactive_pause"), &p->win32_inactive_pause)
+               || cfgfile_yesno(option, value, _T("inactive_nosound"), &p->win32_inactive_nosound)
                || cfgfile_intval(option, value, _T("inactive_input"), &p->win32_inactive_input, 1)
                || cfgfile_yesno(option, value, _T("iconified_pause"), &p->win32_iconified_pause)
-               || cfgfile_yesno (option, value, _T("iconified_nosound"), &p->win32_iconified_nosound)
+               || cfgfile_yesno(option, value, _T("iconified_nosound"), &p->win32_iconified_nosound)
                || cfgfile_intval(option, value, _T("iconified_input"), &p->win32_iconified_input, 1)
                || cfgfile_yesno(option, value, _T("ctrl_f11_is_quit"), &p->win32_ctrl_F11_is_quit)
-               || cfgfile_yesno (option, value, _T("no_recyclebin"), &p->win32_norecyclebin)
-               || cfgfile_intval (option, value, _T("midi_device"), &p->win32_midioutdev, 1)
-               || cfgfile_intval (option, value, _T("midiout_device"), &p->win32_midioutdev, 1)
-               || cfgfile_intval (option, value, _T("midiin_device"), &p->win32_midiindev, 1)
-               || cfgfile_yesno (option, value, _T("midirouter"), &p->win32_midirouter)
-               || cfgfile_intval (option, value, _T("samplersoundcard"), &p->win32_samplersoundcard, 1)
-               || cfgfile_yesno (option, value, _T("notaskbarbutton"), &p->win32_notaskbarbutton)
-               || cfgfile_yesno (option, value, _T("nonotificationicon"), &p->win32_nonotificationicon)
-               || cfgfile_yesno (option, value, _T("always_on_top"), &p->win32_alwaysontop)
-               || cfgfile_yesno (option, value, _T("powersavedisabled"), &p->win32_powersavedisabled)
-               || cfgfile_string (option, value, _T("exec_before"), p->win32_commandpathstart, sizeof p->win32_commandpathstart / sizeof (TCHAR))
-               || cfgfile_string (option, value, _T("exec_after"), p->win32_commandpathend, sizeof p->win32_commandpathend / sizeof (TCHAR))
-               || cfgfile_string (option, value, _T("parjoyport0"), p->win32_parjoyport0, sizeof p->win32_parjoyport0 / sizeof (TCHAR))
-               || cfgfile_string (option, value, _T("parjoyport1"), p->win32_parjoyport1, sizeof p->win32_parjoyport1 / sizeof (TCHAR))
-               || cfgfile_string (option, value, _T("gui_page"), p->win32_guipage, sizeof p->win32_guipage / sizeof (TCHAR))
-               || cfgfile_string (option, value, _T("gui_active_page"), p->win32_guiactivepage, sizeof p->win32_guiactivepage / sizeof (TCHAR))
-               || cfgfile_intval (option, value, _T("guikey"), &p->win32_guikey, 1)
-               || cfgfile_intval (option, value, _T("kbledmode"), &p->win32_kbledmode, 1)
-               || cfgfile_yesno (option, value, _T("filesystem_mangle_reserved_names"), &p->win32_filesystem_mangle_reserved_names)
-               || cfgfile_intval (option, value, _T("extraframewait"), &extraframewait, 1)
-               || cfgfile_intval (option, value, _T("framelatency"), &forcedframelatency, 1)
-               || cfgfile_intval (option, value, _T("cpu_idle"), &p->cpu_idle, 1));
+               || cfgfile_yesno(option, value, _T("no_recyclebin"), &p->win32_norecyclebin)
+               || cfgfile_intval(option, value, _T("midi_device"), &p->win32_midioutdev, 1)
+               || cfgfile_intval(option, value, _T("midiout_device"), &p->win32_midioutdev, 1)
+               || cfgfile_intval(option, value, _T("midiin_device"), &p->win32_midiindev, 1)
+               || cfgfile_yesno(option, value, _T("midirouter"), &p->win32_midirouter)
+               || cfgfile_intval(option, value, _T("samplersoundcard"), &p->win32_samplersoundcard, 1)
+               || cfgfile_yesno(option, value, _T("notaskbarbutton"), &p->win32_notaskbarbutton)
+               || cfgfile_yesno(option, value, _T("nonotificationicon"), &p->win32_nonotificationicon)
+               || cfgfile_yesno(option, value, _T("always_on_top"), &p->win32_alwaysontop)
+               || cfgfile_yesno(option, value, _T("powersavedisabled"), &p->win32_powersavedisabled)
+               || cfgfile_string(option, value, _T("exec_before"), p->win32_commandpathstart, sizeof p->win32_commandpathstart / sizeof (TCHAR))
+               || cfgfile_string(option, value, _T("exec_after"), p->win32_commandpathend, sizeof p->win32_commandpathend / sizeof (TCHAR))
+               || cfgfile_string(option, value, _T("parjoyport0"), p->win32_parjoyport0, sizeof p->win32_parjoyport0 / sizeof (TCHAR))
+               || cfgfile_string(option, value, _T("parjoyport1"), p->win32_parjoyport1, sizeof p->win32_parjoyport1 / sizeof (TCHAR))
+               || cfgfile_string(option, value, _T("gui_page"), p->win32_guipage, sizeof p->win32_guipage / sizeof (TCHAR))
+               || cfgfile_string(option, value, _T("gui_active_page"), p->win32_guiactivepage, sizeof p->win32_guiactivepage / sizeof (TCHAR))
+               || cfgfile_intval(option, value, _T("guikey"), &p->win32_guikey, 1)
+               || cfgfile_intval(option, value, _T("kbledmode"), &p->win32_kbledmode, 1)
+               || cfgfile_yesno(option, value, _T("filesystem_mangle_reserved_names"), &p->win32_filesystem_mangle_reserved_names)
+               || cfgfile_yesno(option, value, _T("right_control_is_right_win"), &p->right_control_is_right_win_key)
+               || cfgfile_intval(option, value, _T("extraframewait"), &extraframewait, 1)
+               || cfgfile_intval(option, value, _T("framelatency"), &forcedframelatency, 1)
+               || cfgfile_intval(option, value, _T("cpu_idle"), &p->cpu_idle, 1));
 
 
        if (cfgfile_string(option, value, _T("expansion_gui_page"), tmpbuf, sizeof tmpbuf / sizeof(TCHAR))) {
index eac908c0e51d4e9c6079848a73153513b8f3978a..5917f33e52cbe54a20323f5ed3715430cb5af342 100644 (file)
 #define LANG_DLL_FULL_VERSION_MATCH 1
 
 #if WINUAEPUBLICBETA
-#define WINUAEBETA _T("9")
+#define WINUAEBETA _T("10")
 #else
 #define WINUAEBETA _T("")
 #endif
 
-#define WINUAEDATE MAKEBD(2015, 8, 20)
+#define WINUAEDATE MAKEBD(2015, 8, 28)
 
 //#define WINUAEEXTRA _T("AmiKit Preview")
 //#define WINUAEEXTRA _T("Amiga Forever Edition")
index 37483baddf6b95faed1fcf4aef7f8dc7f71bb7d0..2f528a545120b0ef48b44812278c6334b49166e7 100644 (file)
@@ -283,6 +283,7 @@ void uaenet_enumerate_free (void)
        for (i = 0; i < MAX_TOTAL_NET_DEVICES; i++) {
                tds[i].active = 0;
        }
+       enumerated = 0;
 }
 
 static struct netdriverdata *enumit (const TCHAR *name)
@@ -399,12 +400,13 @@ struct netdriverdata *uaenet_enumerate (const TCHAR *name)
                                if (!done)
                                        write_log (_T("- MAC %02X:%02X:%02X:%02X:%02X:%02X (%d)\n"),
                                        tc->mac[0], tc->mac[1], tc->mac[2],
-                                       tc->mac[3], tc->mac[4], tc->mac[5], cnt++);
+                                       tc->mac[3], tc->mac[4], tc->mac[5], cnt);
                                tc->type = UAENET_PCAP;
                                tc->active = 1;
                                tc->mtu = 1522;
                                tc->name = au (d->name);
                                tc->desc = au (d->description);
+                               cnt++;
                        } else {
                                write_log (_T(" - failed to get MAC\n"));
                        }
@@ -413,7 +415,7 @@ struct netdriverdata *uaenet_enumerate (const TCHAR *name)
                PacketCloseAdapter (lpAdapter);
        }
        if (!done)
-               write_log (_T("uaenet: end of detection\n"));
+               write_log (_T("uaenet: end of detection, %d devices found.\n"), cnt);
        done = 1;
        pcap_freealldevs (alldevs);
        enumerated = 1;
index d888ec8e4aabbd6e6e2c8b8e20cf5774bcd9c67a..1459cc9e2f9ce4aaf60471780a3ec37cc4192ad8 100644 (file)
@@ -2137,7 +2137,8 @@ int check_prefs_changed_gfx (void)
                currprefs.win32_iconified_nosound != changed_prefs.win32_iconified_nosound ||
                currprefs.win32_iconified_pause != changed_prefs.win32_iconified_pause ||
                currprefs.win32_iconified_input != changed_prefs.win32_iconified_input ||
-               currprefs.win32_ctrl_F11_is_quit != changed_prefs.win32_ctrl_F11_is_quit)
+               currprefs.win32_ctrl_F11_is_quit != changed_prefs.win32_ctrl_F11_is_quit ||
+               currprefs.right_control_is_right_win_key != changed_prefs.right_control_is_right_win_key)
        {
                currprefs.win32_minimize_inactive = changed_prefs.win32_minimize_inactive;
                currprefs.leds_on_screen = changed_prefs.leds_on_screen;
@@ -2157,6 +2158,7 @@ int check_prefs_changed_gfx (void)
                currprefs.win32_iconified_pause = changed_prefs.win32_iconified_pause;
                currprefs.win32_iconified_input = changed_prefs.win32_iconified_input;
                currprefs.win32_ctrl_F11_is_quit = changed_prefs.win32_ctrl_F11_is_quit;
+               currprefs.right_control_is_right_win_key = changed_prefs.right_control_is_right_win_key;
                inputdevice_unacquire ();
                currprefs.keyboard_leds_in_use = changed_prefs.keyboard_leds_in_use = (currprefs.keyboard_leds[0] | currprefs.keyboard_leds[1] | currprefs.keyboard_leds[2]) != 0;
                pause_sound ();
index 70e84a430dad44a04ff78dec34067a9ddc5b0451..1bd6ebfc25e711cd71c1188f5e6d00c8d49e1293 100644 (file)
@@ -1696,7 +1696,8 @@ static void show_rom_list (void)
                127, 140, -1, -1, // kommos
                128, -1, -1, // vector falcon
                132, -1, -1, // add500
-               139, -1, -2, // nexus
+               139, -1, -1, // nexus
+               138, 146, -1, -2, // roctec
 
                18, -1, 19, -1, 74, 23, -1, -1,  // CD32 FMV
                91, -1, -2, // Picasso IV
@@ -1750,6 +1751,7 @@ static void show_rom_list (void)
                _T("Vector Falcon 8000 SCSI\0")
                _T("Archos ADD-500\0")
                _T("Preferred Technologies Nexus\0")
+               _T("Roctec RH800C\0")
 
                _T("CD32 Full Motion Video\0")
                _T("Picasso IV\0")
@@ -4034,6 +4036,7 @@ static struct miscentry misclist[] = {
        { 0, 1, _T("100/120Hz VSync black frame insertion"), &workprefs.lightboost_strobo },
        { 0, 0, _T("Master floppy write protection"), &workprefs.floppy_read_only },
        { 0, 0, _T("Hide all UAE autoconfig boards"), &workprefs.uae_hide_autoconfig },
+       { 0, 1, _T("Right Control = Right Windows key"), &workprefs.right_control_is_right_win_key },
        { 0, NULL }
 };
 
@@ -10280,19 +10283,21 @@ static void enable_for_cpudlg (HWND hDlg)
        BOOL enable = FALSE, jitenable = FALSE;
        BOOL cpu_based_enable = FALSE;
 
-       ew (hDlg, IDC_SPEED, !workprefs.cpu_cycle_exact);
-       ew (hDlg, IDC_COMPATIBLE24, workprefs.cpu_model <= 68030);
-       //ew (hDlg, IDC_CS_HOST, !workprefs.cpu_cycle_exact);
-       //ew (hDlg, IDC_CS_68000, !workprefs.cpu_cycle_exact);
-       //ew (hDlg, IDC_CS_ADJUSTABLE, !workprefs.cpu_cycle_exact);
-       ew (hDlg, IDC_CPUIDLE, workprefs.m68k_speed != 0 ? TRUE : FALSE);
-       ew (hDlg, IDC_PPC_CPUIDLE, workprefs.ppc_mode != 0);
+       ew(hDlg, IDC_SPEED, !workprefs.cpu_cycle_exact);
+       ew(hDlg, IDC_COMPATIBLE24, workprefs.cpu_model <= 68030);
+       //ew(hDlg, IDC_CS_HOST, !workprefs.cpu_cycle_exact);
+       //ew(hDlg, IDC_CS_68000, !workprefs.cpu_cycle_exact);
+       //ew(hDlg, IDC_CS_ADJUSTABLE, !workprefs.cpu_cycle_exact);
+       ew(hDlg, IDC_CPUIDLE, workprefs.m68k_speed != 0 ? TRUE : FALSE);
+       ew(hDlg, IDC_PPC_CPUIDLE, workprefs.ppc_mode != 0);
+       ew(hDlg, IDC_SPEED_x86, is_x86_cpu(&workprefs));
+       ew(hDlg, IDC_CPUTEXT_x86, is_x86_cpu(&workprefs));
 #if !defined(CPUEMU_0) || defined(CPUEMU_68000_ONLY)
-       ew (hDlg, IDC_CPU1, FALSE);
-       ew (hDlg, IDC_CPU2, FALSE);
-       ew (hDlg, IDC_CPU3, FALSE);
-       ew (hDlg, IDC_CPU4, FALSE);
-       ew (hDlg, IDC_CPU5, FALSE);
+       ew(hDlg, IDC_CPU1, FALSE);
+       ew(hDlg, IDC_CPU2, FALSE);
+       ew(hDlg, IDC_CPU3, FALSE);
+       ew(hDlg, IDC_CPU4, FALSE);
+       ew(hDlg, IDC_CPU5, FALSE);
 #endif
 
        cpu_based_enable = workprefs.cpu_model >= 68020 && workprefs.address_space_24 == 0;
@@ -10328,8 +10333,10 @@ static void enable_for_cpudlg (HWND hDlg)
        ew (hDlg, IDC_MMUENABLE, workprefs.cpu_model >= 68030 && workprefs.cachesize == 0);
        ew (hDlg, IDC_CPU_PPC, workprefs.cpu_model >= 68040 && (workprefs.ppc_mode == 1 || (workprefs.ppc_mode == 0 && !is_ppc_cpu(&workprefs))));
 
-       SendDlgItemMessage (hDlg, IDC_SPEED, TBM_SETRANGE, TRUE, workprefs.m68k_speed < 0 ? MAKELONG (-9, 0) : MAKELONG (-9, 50));
-       SendDlgItemMessage (hDlg, IDC_SPEED, TBM_SETPAGESIZE, 0, 1);
+       SendDlgItemMessage(hDlg, IDC_SPEED, TBM_SETRANGE, TRUE, workprefs.m68k_speed < 0 ? MAKELONG(-9, 0) : MAKELONG(-9, 50));
+       SendDlgItemMessage(hDlg, IDC_SPEED, TBM_SETPAGESIZE, 0, 1);
+       SendDlgItemMessage(hDlg, IDC_SPEED_x86, TBM_SETRANGE, TRUE, MAKELONG(-1, 100));
+       SendDlgItemMessage(hDlg, IDC_SPEED_x86, TBM_SETPAGESIZE, 0, 1);
 }
 
 static double getcpufreq (int m)
@@ -10345,6 +10352,13 @@ static void values_to_cpudlg (HWND hDlg)
        TCHAR buffer[8] = _T("");
        int cpu;
 
+       SendDlgItemMessage(hDlg, IDC_SPEED_x86, TBM_SETPOS, TRUE, (int)(workprefs.x86_speed_throttle / 100));
+       if (workprefs.x86_speed_throttle < 0)
+               _tcscpy(buffer, _T("Max"));
+       else
+               _stprintf(buffer, _T("%+d%%"), (int)(workprefs.x86_speed_throttle / 10));
+       SetDlgItemText(hDlg, IDC_CPUTEXT_x86, buffer);
+
        SendDlgItemMessage (hDlg, IDC_SPEED, TBM_SETPOS, TRUE, (int)(workprefs.m68k_speed_throttle / 100));
        _stprintf (buffer, _T("%+d%%"), (int)(workprefs.m68k_speed_throttle / 10));
        SetDlgItemText (hDlg, IDC_CPUTEXT, buffer);
@@ -10410,6 +10424,7 @@ static void values_from_cpudlg (HWND hDlg)
        workprefs.m68k_speed_throttle = SendMessage (GetDlgItem (hDlg, IDC_SPEED), TBM_GETPOS, 0, 0) * 100;
        if (workprefs.m68k_speed_throttle > 0 && workprefs.m68k_speed < 0)
                workprefs.m68k_speed_throttle = 0;
+       workprefs.x86_speed_throttle = SendMessage(GetDlgItem(hDlg, IDC_SPEED_x86), TBM_GETPOS, 0, 0) * 100;
 
        newcpu = ischecked (hDlg, IDC_CPU0) ? 68000
                : ischecked (hDlg, IDC_CPU1) ? 68010
@@ -18188,6 +18203,10 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int        currentpage)
        return ret;
 }
 
+#ifndef WM_DPICHANGED
+#define WM_DPICHANGED       0x02E0
+#endif
+
 static int dialogreturn;
 static INT_PTR CALLBACK DialogProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
 {
@@ -18197,6 +18216,16 @@ static INT_PTR CALLBACK DialogProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
 
        switch (msg)
        {
+       case  WM_DPICHANGED:
+       {
+               int dx = LOWORD(wParam);
+               int dy = HIWORD(wParam);
+               RECT *r = (RECT*)lParam;
+               gui_width = r->right - r->left;
+               gui_height = r->bottom - r->top;
+               gui_size_changed = 1;
+       }
+       break;
        case WM_SIZING:
        {
                if (!recursive && gui_resize_enabled) {
index 4f76480277b76e86fcc4315d7838c3941be3db6f..938ade2bec4b2b034b8797b9ee5bf667c3450e02 100644 (file)
@@ -1,6 +1,6 @@
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.40121.0
+# Visual Studio 14
+VisualStudioVersion = 14.0.23107.0
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winuae", "winuae_msvc.vcxproj", "{4ADAA943-1AC8-4FB5-82E5-4FB753B6C2DA}"
 EndProject
index f328c37bb4b02b939c39082f1806ef3e19c02d20..223e7d7de6dc3d82356dea09f30910d2e7473d60 100644 (file)
     </Link>
     <Manifest>
       <AdditionalManifestFiles>../resources/winuae.exe.manifest</AdditionalManifestFiles>
-      <EnableDPIAwareness>true</EnableDPIAwareness>
+      <EnableDPIAwareness>PerMonitorHighDPIAware</EnableDPIAwareness>
     </Manifest>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     </Link>
     <Manifest>
       <AdditionalManifestFiles>..\resources\winuae64.exe.manifest</AdditionalManifestFiles>
-      <EnableDPIAwareness>true</EnableDPIAwareness>
+      <EnableDPIAwareness>PerMonitorHighDPIAware</EnableDPIAwareness>
     </Manifest>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     </Link>
     <Manifest>
       <AdditionalManifestFiles>../resources/winuae.exe.manifest</AdditionalManifestFiles>
-      <EnableDPIAwareness>true</EnableDPIAwareness>
+      <EnableDPIAwareness>PerMonitorHighDPIAware</EnableDPIAwareness>
       <OutputManifestFile>$(IntDir)$(TargetName)$(TargetExt).embed.manifest</OutputManifestFile>
       <AdditionalOptions>/validate_manifest %(AdditionalOptions)</AdditionalOptions>
     </Manifest>
     </Link>
     <Manifest>
       <AdditionalManifestFiles>../resources/winuae.exe.manifest</AdditionalManifestFiles>
-      <EnableDPIAwareness>true</EnableDPIAwareness>
+      <EnableDPIAwareness>PerMonitorHighDPIAware</EnableDPIAwareness>
       <OutputManifestFile>$(IntDir)$(TargetName)$(TargetExt).embed.manifest</OutputManifestFile>
       <AdditionalOptions>/validate_manifest %(AdditionalOptions)</AdditionalOptions>
     </Manifest>
     </Link>
     <Manifest>
       <AdditionalManifestFiles>..\resources\winuae64.exe.manifest</AdditionalManifestFiles>
-      <EnableDPIAwareness>true</EnableDPIAwareness>
+      <EnableDPIAwareness>PerMonitorHighDPIAware</EnableDPIAwareness>
     </Manifest>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Test|x64'">
     </Link>
     <Manifest>
       <AdditionalManifestFiles>..\resources\winuae64.exe.manifest</AdditionalManifestFiles>
-      <EnableDPIAwareness>true</EnableDPIAwareness>
+      <EnableDPIAwareness>PerMonitorHighDPIAware</EnableDPIAwareness>
     </Manifest>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='FullRelease|Win32'">
     </Link>
     <Manifest>
       <AdditionalManifestFiles>../resources/winuae.exe.manifest</AdditionalManifestFiles>
-      <EnableDPIAwareness>true</EnableDPIAwareness>
+      <EnableDPIAwareness>PerMonitorHighDPIAware</EnableDPIAwareness>
     </Manifest>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='FullRelease|x64'">
     </Link>
     <Manifest>
       <AdditionalManifestFiles>..\resources\winuae64.exe.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
-      <EnableDPIAwareness>true</EnableDPIAwareness>
+      <EnableDPIAwareness>PerMonitorHighDPIAware</EnableDPIAwareness>
     </Manifest>
   </ItemDefinitionGroup>
   <ItemGroup>
index 1fc726756689eb71ac761314e2dbab7e7d78d959..3388bb17e2c970ebd9e6680503886820187488fd 100644 (file)
@@ -1,4 +1,24 @@
 
+Beta 10:
+
+- IDE emulation internal operation change. Previously next block was read from hardfile after previous
+  block was transferred. Now all blocks are buffered first before transferring (or if write: all data
+  is received first and then all buffered data is written to HDF). Fixes A2286 BIOS built-in IDE driver
+  which does not wait for interrupt or DRQ status bit between transferred blocks. (Which technically is
+  a bug, driver is depending on some specific HD manufacturer/model internal implementation detail)
+- Amiga to PC bridgeboard interrupt enable/disable state fixed. A2286 Janus hardfile access does not hang
+  anymore.
+- Added x86 CPU speed adjustment (CPU panel, full left = fastest possible mode). Note that some BIOS
+  drivers use CPU delay loops, unexpected things can happen.. Fastest possible enables extra hack
+  ("immediate" floppy to prevent floppy detection fail). Speed adjustment is only enabled after initial
+  BIOS diagnostics checks have been done because some timer tests fail if CPU is too fast..
+- Added right control = right Windows key option. (Keyboards without right Windows key, quicker to use
+  than creating custom mapping, note that it also disables keyboard layout B RCTRL=fire mapping)
+- GUI window is now per-monitor high DPI aware.
+- 3-State Apollo 500/2000 IDE/SCSI combo HD controller fully implemented. ROM added to ROM scanner.
+  3rd party replacement ROM available from Aminet. (http://aminet.net/package/disk/cdrom/AT_ApolloDev)
+- CDFS automount without physical drives mounted 10 empty image drives (b1).
+
 Beta 9:
 
 - x86 floppy controller EOT parameter was read from wrong offset. Note that previously 1.4M floppy in
index a96d8f62a7dcde0de44456404251c98cd1b969c9..49fffbc56d615b16189afc66cb2b7f28b6647b6c 100644 (file)
@@ -95,7 +95,7 @@ struct romdata *getromdatabypath (const TCHAR *path)
        return NULL;
 }
 
-#define NEXT_ROM_ID 145
+#define NEXT_ROM_ID 147
 
 static struct romheader romheaders[] = {
        { _T("Freezer Cartridges"), 1 },
@@ -419,10 +419,16 @@ static struct romdata roms[] = {
        0xe8201bad, 0xdefea015,0x596fce32,0x11e84397,0x23046a31,0x5a7726dc, NULL, NULL },
        { _T("Masoboshi MC-702"), 2, 201, 2, 201, _T("MASOBOSHI\0"), 32768, 120, 0, 0, ROMTYPE_MASOBOSHI, 0, 0, NULL,
        0xcd99b98a, 0x3897e46a,0x66d5833f,0x849b8e81,0x30acb3cb,0x319a2fa0, NULL, NULL },
-       { _T("Roctec RocHard RH800C"), 1, 0, 1, 0, _T("ROCHARD\0"), 16384, 138, 0, 0, ROMTYPE_ROCHARD, 0, 0, NULL,
+       { _T("Roctec RocHard RH800C v1"), 1, 0, 1, 0, _T("ROCHARD\0"), 16384, 138, 0, 0, ROMTYPE_ROCHARD, 0, 0, NULL,
        0x0e980aec, 0xbcafa14d,0xe80576cb,0xe3e0c638,0x1ca90379,0xe078a8bd, NULL, NULL },
        ALTROMPN(138, 1, 1, 8192, ROMTYPE_ODD  | ROMTYPE_8BIT, NULL, 0xde3a855b, 0xda2fe069, 0xd78c9ccc, 0xc221711f, 0x1e598298, 0x2bdabffd)
        ALTROMPN(138, 1, 2, 8192, ROMTYPE_EVEN | ROMTYPE_8BIT, NULL, 0xb0ed3006, 0x0a88d84e, 0x2094f9e5, 0x18d37f90, 0x34764f22, 0x9696c3d9)
+       { _T("Roctec RocHard RH800C v2"), 2, 0, 2, 0, _T("ROCHARD\0"), 16384, 146, 0, 0, ROMTYPE_ROCHARD, 0, 0, NULL,
+       0x5c27be3f, 0xacdb8bc7,0x64493f65,0x9da4c1e8,0x3005ceeb,0xced73dbc, NULL, NULL },
+       ALTROMPN(146, 1, 1, 8192, ROMTYPE_ODD |  ROMTYPE_8BIT, NULL, 0xc5b8f068, 0x6ada1205, 0x44d284d0, 0x326d68cb, 0x7a2d9fb4, 0x77f35852)
+       ALTROMPN(146, 1, 2, 8192, ROMTYPE_EVEN | ROMTYPE_8BIT, NULL, 0xc88843cb, 0x3d7eb1b6, 0x8139b81b, 0x0665684c, 0x536ab3d0, 0x52a5dd9d)
+       { _T("Apollo 500/2000"), 0, 0, 0, 0, _T("APOLLOHD\0"), 16384, 145, 0, 0, ROMTYPE_APOLLOHD, 0, 0, NULL,
+       0x931bad25, 0x24b4ee4c,0x129c7a93,0xf83ad570,0x66afd80c,0x4179f39c, NULL, NULL },
 
        { _T("CyberStorm MK I 68040"), 0, 0, 0, 0, _T("CSMKI\0"), 32768, 95, 0, 0, ROMTYPE_CB_CSMK1, 0, 0, NULL,
          0, 0, 0, 0, 0, 0, NULL, _T("cyberstormmk1_040.rom") },
index d7a41bc6d0f89a95e9578236920ed7df77e46b1e..01579d2def9775c62e6f3563f9d54af85d3f2f11 100644 (file)
--- a/scsi.cpp
+++ b/scsi.cpp
@@ -1285,10 +1285,18 @@ void apollo_add_ide_unit(int ch, struct uaedev_config_info *ci, struct romconfig
 
 void apollo_add_scsi_unit(int ch, struct uaedev_config_info *ci, struct romconfig *rc)
 {
-       generic_soft_scsi_add(ch, ci, rc, NONCR_APOLLO, -1, -1, ROMTYPE_APOLLO);
-       // make sure IDE side is also initialized
-       struct uaedev_config_info ci2 = { 0 };
-       apollo_add_ide_unit(-1, &ci2, rc);
+       if (ch < 0) {
+               generic_soft_scsi_add(-1, ci, rc, NONCR_APOLLO, -1, -1, ROMTYPE_APOLLO);
+               // make sure IDE side is also initialized
+               struct uaedev_config_info ci2 = { 0 };
+               apollo_add_ide_unit(-1, &ci2, rc);
+       } else {
+               if (ci->controller_type < HD_CONTROLLER_TYPE_SCSI_FIRST) {
+                       apollo_add_ide_unit(ch, ci, rc);
+               } else {
+                       generic_soft_scsi_add(ch, ci, rc, NONCR_APOLLO, -1, -1, ROMTYPE_APOLLO);
+               }
+       }
 }
 
 uae_u8 ncr5380_bget(struct soft_scsi *scsi, int reg);
diff --git a/x86.cpp b/x86.cpp
index bccb2dbca2f41c65c5bfbb5d85e6771278f4f8c1..5616e1b473460fe5a9519c7aacc87930a5e59025 100644 (file)
--- a/x86.cpp
+++ b/x86.cpp
@@ -62,6 +62,8 @@ void intcall86(uint8_t intnum);
 void x86_doirq(uint8_t irqnum);
 
 static frame_time_t last_cycles;
+#define DEFAULT_X86_INSTRUCTION_COUNT 40
+static int x86_instruction_count;
 static bool x86_turbo_allowed;
 static bool x86_turbo_enabled;
 bool x86_turbo_on;
@@ -249,16 +251,12 @@ static uae_u8 x86_bridge_put_io(struct x86_bridge *xb, uaecptr addr, uae_u8 v)
 #if X86_DEBUG_BRIDGE_IRQ
                        write_log(_T("IO_PC_INTERRUPT_CONTROL %02x\n"), v);
 #endif
-                       if (xb->amiga_forced_interrupts) {
-                               if (v & 1)
-                                       x86_doirq(1);
-                               if (xb->amiga_io[IO_CONTROL_REGISTER] & 8) {
-                                       if (!(v & 2) || !(v & 4))
-                                               x86_doirq(3);
-                                       if (!(v & 8))
-                                               x86_doirq(7);
-                               }
-                       }
+                       if (xb->type < TYPE_2286 && (v & 1))
+                               x86_doirq(1);
+                       if (!(v & 2) || !(v & 4))
+                               x86_doirq(3);
+                       if (!(v & 8))
+                               x86_doirq(7);
                }
                break;
                case IO_CONTROL_REGISTER:
@@ -875,7 +873,10 @@ void x86_doirq(uint8_t irqnum)
                keyboardwaitack = 1;
 }
 
-bool x86_is_keyboard(void);
+void x86_doirq_keyboard(void)
+{
+       x86_doirq(1);
+}
 
 void check_x86_irq(void)
 {
@@ -925,7 +926,7 @@ static void floppy_reset(void)
        floppy_idx = 0;
        floppy_dir = 0;
        floppy_did_reset = true;
-       if (0 && xb->type == TYPE_2286) {
+       if (xb->type == TYPE_2286) {
                // apparently A2286 BIOS AT driver assumes
                // floppy reset also resets IDE.
                // Perhaps this is forgotten feature from
@@ -2780,6 +2781,30 @@ void x86_bridge_reset(void)
        }
 }
 
+static void check_floppy_delay(void)
+{
+       for (int i = 0; i < 4; i++) {
+               if (floppy_seeking[i]) {
+                       bool neg = floppy_seeking[i] < 0;
+                       if (floppy_seeking[i] > 0)
+                               floppy_seeking[i]--;
+                       else if (neg)
+                               floppy_seeking[i]++;
+                       if (floppy_seeking[i] == 0)
+                               do_floppy_seek(i, neg);
+               }
+       }
+       if (floppy_delay_hsync > 1 || floppy_delay_hsync < -1) {
+               if (floppy_delay_hsync > 0)
+                       floppy_delay_hsync--;
+               else
+                       floppy_delay_hsync++;
+               if (floppy_delay_hsync == 1 || floppy_delay_hsync == -1)
+                       do_floppy_irq();
+       }
+}
+
+
 static void x86_cpu_execute(int cnt)
 {
        struct x86_bridge *xb = bridges[0];
@@ -2796,6 +2821,9 @@ static void x86_cpu_execute(int cnt)
                        exec86(cnt);
                }
        }
+
+       // BIOS has CPU loop delays in floppy driver...
+       check_floppy_delay();
 }
 
 void x86_bridge_execute_until(int until)
@@ -2821,37 +2849,29 @@ void x86_bridge_hsync(void)
        if (!xb)
                return;
 
-       for (int i = 0; i < 4; i++) {
-               if (floppy_seeking[i]) {
-                       bool neg = floppy_seeking[i] < 0;
-                       if (floppy_seeking[i] > 0)
-                               floppy_seeking[i]--;
-                       else if (neg)
-                               floppy_seeking[i]++;
-                       if (floppy_seeking[i] == 0)
-                               do_floppy_seek(i, neg);
-               }
-       }
-       if (floppy_delay_hsync > 1 || floppy_delay_hsync < -1) {
-               if (floppy_delay_hsync > 0)
-                       floppy_delay_hsync--;
-               else
-                       floppy_delay_hsync++;
-               if (floppy_delay_hsync == 1 || floppy_delay_hsync == -1)
-                       do_floppy_irq();
-       }
+       check_floppy_delay();
 
        for (int i = 0; i < 3; i++) {
-               x86_cpu_execute(40);
+               x86_cpu_execute(x86_instruction_count);
                timing(maxhpos / 3);
        }
 
+       if (currprefs.x86_speed_throttle != changed_prefs.x86_speed_throttle) {
+               currprefs.x86_speed_throttle = changed_prefs.x86_speed_throttle;
+               x86_instruction_count = DEFAULT_X86_INSTRUCTION_COUNT;
+               if (currprefs.x86_speed_throttle < 0) {
+                       x86_turbo_enabled = true;
+               } else {
+                       x86_turbo_enabled = false;
+                       x86_instruction_count = DEFAULT_X86_INSTRUCTION_COUNT + DEFAULT_X86_INSTRUCTION_COUNT * currprefs.x86_speed_throttle / 1000;
+               }
+       }
+
        if (x86_turbo_allowed && x86_turbo_enabled && !x86_turbo_on) {
                x86_turbo_on = true;
        } else if ((!x86_turbo_allowed || !x86_turbo_enabled) && x86_turbo_on) {
                x86_turbo_on = false;
        }
-       
 }
 
 static void ew(uae_u8 *acmemory, int addr, uae_u8 value)
@@ -2875,6 +2895,7 @@ static void bridge_reset(struct x86_bridge *xb)
        xb->pc_irq3a = xb->pc_irq3b = xb->pc_irq7 = false;
        x86_turbo_allowed = false;
        x86_cpu_active = false;
+       x86_instruction_count = DEFAULT_X86_INSTRUCTION_COUNT;
        memset(xb->amiga_io, 0, 0x10000);
        memset(xb->io_ports, 0, 0x10000);
        for (int i = 0; i < 2; i++) {
@@ -2922,15 +2943,17 @@ int is_x86_cpu(struct uae_prefs *p)
                        return X86_STATE_STOP;
                else if (x86_found < 0)
                        return X86_STATE_INACTIVE;
-               if (is_device_rom(&currprefs, ROMTYPE_A1060, 0) < 0 &&
-                       is_device_rom(&currprefs, ROMTYPE_A2088, 0) < 0 &&
-                       is_device_rom(&currprefs, ROMTYPE_A2088T, 0) < 0 &&
-                       is_device_rom(&currprefs, ROMTYPE_A2286, 0) < 0 &&
-                       is_device_rom(&currprefs, ROMTYPE_A2386, 0) < 0) {
-                       x86_found = -1;
+               if (is_device_rom(p, ROMTYPE_A1060, 0) < 0 &&
+                       is_device_rom(p, ROMTYPE_A2088, 0) < 0 &&
+                       is_device_rom(p, ROMTYPE_A2088T, 0) < 0 &&
+                       is_device_rom(p, ROMTYPE_A2286, 0) < 0 &&
+                       is_device_rom(p, ROMTYPE_A2386, 0) < 0) {
+                       if (p == &currprefs)
+                               x86_found = -1;
                        return X86_STATE_INACTIVE;
                } else {
-                       x86_found = 1;
+                       if (p == &currprefs)
+                               x86_found = 1;
                }
        }
        if (!xb || xb->x86_reset)