]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
imported winuaesrc1500b14.zip
authorToni Wilen <twilen@winuae.net>
Thu, 1 May 2008 11:35:52 +0000 (14:35 +0300)
committerToni Wilen <twilen@winuae.net>
Mon, 22 Feb 2010 19:39:54 +0000 (21:39 +0200)
53 files changed:
a2091.c
autoconf.c
cdtv.c
cfgfile.c
cia.c
custom.c
disk.c
drawing.c
driveclick.c
expansion.c
filesys.c
gayle.c
hardfile.c
include/autoconf.h
include/drawing.h
include/gfxfilter.h
include/inputdevice.h
include/memory.h
include/options.h
inputdevice.c
jit/compemu_support.c
main.c
memory.c
newcpu.c
od-win32/ahidsound.c
od-win32/avioutput.c
od-win32/blkdev_win32_spti.c
od-win32/caps/caps_win32.c
od-win32/dinput.c
od-win32/direct3d.c
od-win32/dxwrap.c
od-win32/dxwrap.h
od-win32/ioport.c
od-win32/keyboard_win32.c
od-win32/lcd.c
od-win32/mman.c
od-win32/opengl.c
od-win32/picasso96_win.c
od-win32/posixemu.c
od-win32/resources/resource
od-win32/resources/resource.h
od-win32/resources/winuae.rc
od-win32/rp.c
od-win32/rp.h
od-win32/screenshot.c
od-win32/sounddep/sound.c
od-win32/win32.c
od-win32/win32.h
od-win32/win32_scale2x.c
od-win32/win32gfx.c
od-win32/win32gui.c
od-win32/winuaechangelog.txt
savestate.c

diff --git a/a2091.c b/a2091.c
index b9944f394d77c10904d31614bf3cb23bf2f214a8..ba9c0d08497291a6e91f4fc4f0c39cf9bd9ca1f6 100755 (executable)
--- a/a2091.c
+++ b/a2091.c
@@ -302,7 +302,7 @@ static void wd_cmd_sel_xfer(void)
     write_log ("* %s select and transfer, ID=%d phase=%02X\n", WD33C93, wdregs[WD_DESTINATION_ID] & 0x7, phase);
 #endif
     if (!SCSIID) {
-       set_status(CSR_TIMEOUT, 0);
+       set_status (CSR_TIMEOUT, 0);
        return;
     }
     SCSIID->buffer[0] = 0;
@@ -313,19 +313,19 @@ static void wd_cmd_sel_xfer(void)
     }
     wdregs[WD_COMMAND_PHASE] = phase;
     wd_phase = CSR_XFER_DONE | PHS_MESS_IN;
-    set_status(wd_phase, 1);
+    set_status (wd_phase, 1);
 }
 
 static void do_dma(void)
 {
     if (currprefs.cs_cdtvscsi)
-       cdtv_getdmadata(&dmac_acr);
+       cdtv_getdmadata (&dmac_acr);
     if (SCSIID->direction == 0) {
        write_log ("%s DMA but no data!?\n", WD33C93);
     } else if (SCSIID->direction < 0) {
        for (;;) {
            uae_u8 v;
-           int status = scsi_receive_data(SCSIID, &v);
+           int status = scsi_receive_data (SCSIID, &v);
            put_byte (dmac_acr, v);
            if (wd_dataoffset < sizeof wd_data)
                wd_data[wd_dataoffset++] = v;
@@ -339,7 +339,7 @@ static void do_dma(void)
            uae_u8 v = get_byte (dmac_acr);
            if (wd_dataoffset < sizeof wd_data)
                wd_data[wd_dataoffset++] = v;
-           status = scsi_send_data(SCSIID, v);
+           status = scsi_send_data (SCSIID, v);
            dmac_acr++;
            if (status)
                break;
@@ -357,13 +357,13 @@ static void wd_do_transfer_out(void)
        wd_phase = CSR_XFER_DONE | PHS_COMMAND;
     } else if (wdregs[WD_COMMAND_PHASE] == 0x30) {
        /* command was sent */
-       SCSIID->direction = scsi_data_dir(SCSIID);
+       SCSIID->direction = scsi_data_dir (SCSIID);
        if (SCSIID->direction > 0) {
            /* if write command, need to wait for data */
            wd_phase = CSR_XFER_DONE | PHS_DATA_OUT;
            wdregs[WD_COMMAND_PHASE] = 0x46;
        } else {
-           scsi_emulate_cmd(SCSIID);
+           scsi_emulate_cmd (SCSIID);
            if (SCSIID->data_len <= 0 || SCSIID->status != 0 || SCSIID->direction == 0) {
                wd_phase = CSR_XFER_DONE | PHS_STATUS;
                wdregs[WD_COMMAND_PHASE] = 0x47;
@@ -375,13 +375,13 @@ static void wd_do_transfer_out(void)
     } else if (wdregs[WD_COMMAND_PHASE] == 0x46) {
        if (SCSIID->direction > 0) {
            /* data was sent */
-           scsi_emulate_cmd(SCSIID);
+           scsi_emulate_cmd (SCSIID);
            wd_phase = CSR_XFER_DONE | PHS_STATUS;
        }
        wdregs[WD_COMMAND_PHASE] = 0x47;
     }
     wd_dataoffset = 0;
-    set_status(wd_phase, SCSIID->direction ? 0 : 1);
+    set_status (wd_phase, SCSIID->direction ? 0 : 1);
     wd_busy = 0;
 }
 
@@ -401,7 +401,7 @@ static void wd_do_transfer_in(void)
        wdregs[WD_COMMAND_PHASE] = 0x60;
        wd_phase = CSR_DISC;
     }
-    set_status(wd_phase, 1);
+    set_status (wd_phase, 1);
     wd_busy = 0;
     SCSIID->direction = 0;
 }
@@ -418,7 +418,7 @@ static void wd_cmd_sel_xfer_atn(void)
     if (wdregs[WD_COMMAND] & 0x80)
        wd_tc = 1;
     if (!SCSIID) {
-       set_status(CSR_TIMEOUT, 0);
+       set_status (CSR_TIMEOUT, 0);
        return;
     }
     SCSIID->buffer[0] = 0;
@@ -426,17 +426,17 @@ static void wd_cmd_sel_xfer_atn(void)
     if (wdregs[WD_COMMAND_PHASE] <= 0x30) {
        wd_tc = 6;
        wd_dataoffset = 0;
-       scsi_start_transfer(SCSIID, 6);
+       scsi_start_transfer (SCSIID, 6);
        for (i = 0; i < wd_tc; i++) {
            uae_u8 b = wdregs[3 + i];
            wd_data[i] = b;
-           scsi_send_data(SCSIID, b);
+           scsi_send_data (SCSIID, b);
            wd_dataoffset++;
        }
        // command
        SCSIID->direction = (wdregs[WD_SOURCE_ID] & 0x20) ? 1 : -1;
        wdregs[WD_COMMAND_PHASE] = 0x30;
-       wd_do_transfer_out();
+       wd_do_transfer_out ();
        wdregs[WD_COMMAND_PHASE] = 0x36;
     }
     if (wdregs[WD_COMMAND_PHASE] <= 0x41) {
@@ -450,15 +450,15 @@ static void wd_cmd_sel_xfer_atn(void)
                    wd_phase |= PHS_DATA_IN;
                else
                    wd_phase |= PHS_DATA_OUT;
-               set_status(wd_phase, 1);
+               set_status (wd_phase, 1);
                return;
            }
        }
        if ((wdregs[WD_CONTROL] >> 5) == 4) {
            if (wd_phase == (CSR_XFER_DONE | PHS_DATA_IN))
-               do_dma();
+               do_dma ();
            else if(wd_phase == (CSR_XFER_DONE | PHS_DATA_OUT))
-               do_dma();
+               do_dma ();
        }
 
     }
@@ -466,7 +466,7 @@ static void wd_cmd_sel_xfer_atn(void)
     wdregs[WD_TARGET_LUN] = SCSIID->status;
     SCSIID->buffer[0] = SCSIID->status;
     wd_phase = CSR_SEL_XFER_DONE;
-    set_status(wd_phase, 0);
+    set_status (wd_phase, 0);
 }
 
 
@@ -484,21 +484,21 @@ static void wd_cmd_trans_info(void)
 #if WD33C93_DEBUG > 0
     write_log ("* %s transfer info phase=%02x len=%d dma=%d\n", WD33C93, wdregs[WD_COMMAND_PHASE], wd_tc, wdregs[WD_CONTROL] >> 5);
 #endif
-    scsi_start_transfer(SCSIID, wd_tc);
+    scsi_start_transfer (SCSIID, wd_tc);
     if (wdregs[WD_COMMAND_PHASE] >= 0x36 && wdregs[WD_COMMAND_PHASE] <= 0x3f)
        wdregs[WD_COMMAND_PHASE] = 0x45;
     if ((wdregs[WD_CONTROL] >> 5) == 4) {
-       do_dma();
+       do_dma ();
        if (SCSIID->direction < 0)
-           wd_do_transfer_in();
+           wd_do_transfer_in ();
        else if (SCSIID->direction > 0)
-           wd_do_transfer_out();
+           wd_do_transfer_out ();
        SCSIID->direction = 0;
        dmac_dma = 0;
     }
 }
 
-static void wd_cmd_sel_atn(void)
+static void wd_cmd_sel_atn (void)
 {
 #if WD33C93_DEBUG > 0
     write_log ("* %s select with atn, ID=%d\n", WD33C93, wdregs[WD_DESTINATION_ID] & 0x7);
@@ -507,14 +507,14 @@ static void wd_cmd_sel_atn(void)
     wdregs[WD_COMMAND_PHASE] = 0;
     if (SCSIID) {
        wd_phase = CSR_SELECT;
-       set_status(wd_phase, 1);
+       set_status (wd_phase, 1);
        wdregs[WD_COMMAND_PHASE] = 0x10;
        return;
     }
-    set_status(CSR_TIMEOUT, 1000);
+    set_status (CSR_TIMEOUT, 1000);
 }
 
-static void wd_cmd_reset(void)
+static void wd_cmd_reset (void)
 {
     int i;
 
@@ -526,31 +526,31 @@ static void wd_cmd_reset(void)
     wdregs[0x18] = 0;
     if (!wd33c93a)
        wdregs[0] &= ~(0x08 | 0x10);
-    set_status((wdregs[0] & 0x10) ? 1 : 0, 1);
+    set_status ((wdregs[0] & 0x10) ? 1 : 0, 1);
 }
 
-static void wd_cmd_abort(void)
+static void wd_cmd_abort (void)
 {
 #if WD33C93_DEBUG > 0
     write_log ("%s abort\n", WD33C93);
 #endif
-    set_status(CSR_SEL_ABORT, 0);
+    set_status (CSR_SEL_ABORT, 0);
 }
 
-static int writeonlyreg(int reg)
+static int writeonlyreg (int reg)
 {
     if (reg == WD_SCSI_STATUS)
        return 1;
     return 0;
 }
 
-void wdscsi_put(uae_u8 d)
+void wdscsi_put (uae_u8 d)
 {
 #if WD33C93_DEBUG > 1
     if (WD33C93_DEBUG > 3 || sasr != WD_DATA)
        write_log ("W %s REG %02.2X (%d) = %02.2X (%d) PC=%08X\n", WD33C93, sasr, sasr, d, d, M68K_GETPC);
 #endif
-    if (!writeonlyreg(sasr))
+    if (!writeonlyreg (sasr))
        wdregs[sasr] = d;
     if (!wd_used) {
        wd_used = 1;
@@ -564,26 +564,26 @@ void wdscsi_put(uae_u8 d)
        if (wd_dataoffset < sizeof wd_data)
            wd_data[wd_dataoffset] = wdregs[sasr];
        wd_dataoffset++;
-       if (scsi_send_data(SCSIID, wdregs[sasr]))
-           wd_do_transfer_out();
+       if (scsi_send_data (SCSIID, wdregs[sasr]))
+           wd_do_transfer_out ();
     } else if (sasr == WD_COMMAND) {
        switch (d & 0x7f)
        {
            case WD_CMD_RESET:
-               wd_cmd_reset();
+               wd_cmd_reset ();
            break;
            break;
            case WD_CMD_SEL_ATN:
-               wd_cmd_sel_atn();
+               wd_cmd_sel_atn ();
            break;
            case WD_CMD_SEL_ATN_XFER:
-               wd_cmd_sel_xfer_atn();
+               wd_cmd_sel_xfer_atn ();
            break;
            case WD_CMD_SEL_XFER:
-               wd_cmd_sel_xfer();
+               wd_cmd_sel_xfer ();
            break;
            case WD_CMD_TRANS_INFO:
-               wd_cmd_trans_info();
+               wd_cmd_trans_info ();
            break;
            default:
                write_log ("%s unimplemented/unknown command %02.X\n", WD33C93, d);
@@ -593,11 +593,11 @@ void wdscsi_put(uae_u8 d)
     incsasr(1);
 }
 
-void wdscsi_sasr(uae_u8 b)
+void wdscsi_sasr (uae_u8 b)
 {
     sasr = b;
 }
-uae_u8 wdscsi_getauxstatus(void)
+uae_u8 wdscsi_getauxstatus (void)
 {
     return (auxstatus & 0x80) | (wd_busy ? 0x20 : 0) | (wd_busy ? 0x01 : 0);
 }
@@ -608,13 +608,13 @@ uae_u8 wdscsi_get(void)
 
     v = wdregs[sasr];
     if (sasr == WD_DATA) {
-       int status = scsi_receive_data(SCSIID, &v);
+       int status = scsi_receive_data (SCSIID, &v);
        if (wd_dataoffset < sizeof wd_data)
            wd_data[wd_dataoffset] = v;
        wd_dataoffset++;
        wdregs[sasr] = v;
        if (status)
-           wd_do_transfer_in();
+           wd_do_transfer_in ();
     } else if (sasr == WD_SCSI_STATUS) {
        uae_int_requested &= ~2;
        auxstatus &= ~0x80;
@@ -623,10 +623,10 @@ uae_u8 wdscsi_get(void)
        if (wdregs[WD_COMMAND_PHASE] == 0x10) {
            wdregs[WD_COMMAND_PHASE] = 0x11;
            wd_phase = CSR_SRV_REQ | PHS_MESS_OUT;
-           set_status(wd_phase, 1);
+           set_status (wd_phase, 1);
        }
     }
-    incsasr(0);
+    incsasr (0);
 #if WD33C93_DEBUG > 1
     if (WD33C93_DEBUG > 3 || osasr != WD_DATA)
        write_log ("R %s REG %02.2X (%d) = %02.2X (%d) PC=%08X\n", WD33C93, osasr, osasr, v, v, M68K_GETPC);
@@ -663,10 +663,10 @@ static uae_u32 dmac_bget2 (uaecptr addr)
        v = dmac_cntr;
        break;
        case 0x91:
-       v = wdscsi_getauxstatus();
+       v = wdscsi_getauxstatus ();
        break;
        case 0x93:
-       v = wdscsi_get();
+       v = wdscsi_get ();
        break;
        case 0xc1:
        v = 0xf8 | (1 << 0) | (1 << 1) | (1 << 2); // bits 0-2 = dip-switches
@@ -684,15 +684,15 @@ static uae_u32 dmac_bget2 (uaecptr addr)
        case 0xe0:
        case 0xe1:
        if (!dmac_dma)
-           dmac_start_dma();
+           dmac_start_dma ();
        break;
        case 0xe2:
        case 0xe3:
-       dmac_stop_dma();
+       dmac_stop_dma ();
        break;
        case 0xe4:
        case 0xe5:
-       dmac_cint();
+       dmac_cint ();
        break;
        case 0xe8:
        case 0xe9:
@@ -761,23 +761,23 @@ static void dmac_bput2 (uaecptr addr, uae_u32 b)
        dmac_dawr |= b << 0;
        break;
        case 0x91:
-       wdscsi_sasr(b);
+       wdscsi_sasr (b);
        break;
        case 0x93:
-       wdscsi_put(b);
+       wdscsi_put (b);
        break;
        case 0xe0:
        case 0xe1:
        if (!dmac_dma)
-           dmac_start_dma();
+           dmac_start_dma ();
        break;
        case 0xe2:
        case 0xe3:
-       dmac_stop_dma();
+       dmac_stop_dma ();
        break;
        case 0xe4:
        case 0xe5:
-       dmac_cint();
+       dmac_cint ();
        break;
        case 0xe8:
        case 0xe9:
@@ -880,13 +880,13 @@ static void REGPARAM2 dmac_bput (uaecptr addr, uae_u32 b)
        map_banks (&dmaca2091_bank, b, 0x10000 >> 16, 0x10000);
        write_log ("A590/A2091 Z2 autoconfigured at %02.2X0000\n", b);
        configured = 1;
-       expamem_next();
+       expamem_next ();
        return;
     }
     if (addr == 0x4c && !configured) {
        write_log ("A590/A2091 DMAC AUTOCONFIG SHUT-UP!\n");
        configured = 1;
-       expamem_next();
+       expamem_next ();
        return;
     }
     if (!configured)
@@ -947,30 +947,30 @@ static void mbdmac_write (uae_u32 addr, uae_u32 val, int mode)
     {
        case 0x02:
        case 0x03:
-       dmacreg_write(&dmac_dawr, addr - 0x02, val, 2);
+       dmacreg_write (&dmac_dawr, addr - 0x02, val, 2);
        break;
        case 0x04:
        case 0x05:
        case 0x06:
        case 0x07:
-       dmacreg_write(&dmac_wtc, addr - 0x04, val, 4);
+       dmacreg_write (&dmac_wtc, addr - 0x04, val, 4);
        break;
        case 0x0a:
        case 0x0b:
-       dmacreg_write(&dmac_cntr, addr - 0x0a, val, 2);
+       dmacreg_write (&dmac_cntr, addr - 0x0a, val, 2);
        if (dmac_cntr & SCNTR_PREST)
-           dmac_reset();
+           dmac_reset ();
        break;
        case 0x0c:
        case 0x0d:
        case 0x0e:
        case 0x0f:
-       dmacreg_write(&dmac_acr, addr - 0x0c, val, 4);
+       dmacreg_write (&dmac_acr, addr - 0x0c, val, 4);
        break;
        case 0x12:
        case 0x13:
        if (!dmac_dma)
-           dmac_start_dma();
+           dmac_start_dma ();
        break;
        case 0x16:
        case 0x17:
@@ -987,7 +987,7 @@ static void mbdmac_write (uae_u32 addr, uae_u32 val, int mode)
        break;
        case 0x3e:
        case 0x3f:
-       dmac_stop_dma();
+       dmac_stop_dma ();
        break;
        case 0x41:
        if (mode & 0x10)
@@ -998,7 +998,7 @@ static void mbdmac_write (uae_u32 addr, uae_u32 val, int mode)
        break;
        case 0x43:
        if (mode & 0x10)
-           wdscsi_put(val);
+           wdscsi_put (val);
        else
            sasr = val;
        break;
@@ -1018,7 +1018,7 @@ static uae_u32 mbdmac_read (uae_u32 addr, int mode)
     {
        case 0x02:
        case 0x03:
-       v = dmacreg_read(dmac_dawr, addr - 0x02, 2);
+       v = dmacreg_read (dmac_dawr, addr - 0x02, 2);
        break;
        case 0x04:
        case 0x05:
@@ -1028,43 +1028,43 @@ static uae_u32 mbdmac_read (uae_u32 addr, int mode)
        break;
        case 0x0a:
        case 0x0b:
-       v = dmacreg_read(dmac_cntr, addr - 0x0a, 2);
+       v = dmacreg_read (dmac_cntr, addr - 0x0a, 2);
        break;
        case 0x0c:
        case 0x0d:
        case 0x0e:
        case 0x0f:
-       v = dmacreg_read(dmac_acr, addr - 0x0c, 4);
+       v = dmacreg_read (dmac_acr, addr - 0x0c, 4);
        break;
        case 0x12:
        case 0x13:
        if (!dmac_dma)
-           dmac_start_dma();
+           dmac_start_dma ();
        v = 0;
        break;
        case 0x1a:
        case 0x1b:
-       dmac_cint();
+       dmac_cint ();
        v = 0;
        break;;
        case 0x1e:
        case 0x1f:
-       v = dmacreg_read(dmac_istr, addr - 0x1e, 2);
+       v = dmacreg_read (dmac_istr, addr - 0x1e, 2);
        if (v & ISTR_INTS)
            v |= ISTR_INT_P;
        dmac_istr &= ~15;
        break;
        case 0x3e:
        case 0x3f:
-       dmac_stop_dma();
+       dmac_stop_dma ();
        v = 0;
        break;
        case 0x41:
        case 0x49:
-       v = wdscsi_getauxstatus();
+       v = wdscsi_getauxstatus ();
        break;
        case 0x43:
-       v = wdscsi_get();
+       v = wdscsi_get ();
        break;
     }
 #if A3000_DEBUG > 1
@@ -1159,8 +1159,8 @@ static void freescsi(struct scsi_data *sd)
 {
     if (!sd)
        return;
-    hdf_hd_close(sd->hfd);
-    scsi_free(sd);
+    hdf_hd_close (sd->hfd);
+    scsi_free (sd);
 }
 
 int addscsi(int ch, char *path, int blocksize, int readonly,
@@ -1168,13 +1168,14 @@ int addscsi(int ch, char *path, int blocksize, int readonly,
                       int bootpri, char *filesys, int scsi_level)
 {
     struct hd_hardfiledata *hfd;
-    freescsi(scsis[ch]);
+
+    freescsi (scsis[ch]);
     scsis[ch] = NULL;
-    hfd = (struct hd_hardfiledata*)xcalloc(sizeof(struct hd_hardfiledata), 1);
-    if (!hdf_hd_open(hfd, path, blocksize, readonly, devname, sectors, surfaces, reserved, bootpri, filesys))
+    hfd = xcalloc (sizeof (struct hd_hardfiledata), 1);
+    if (!hdf_hd_open (hfd, path, blocksize, readonly, devname, sectors, surfaces, reserved, bootpri, filesys))
        return 0;
     hfd->ansi_version = scsi_level;
-    scsis[ch] = scsi_alloc(ch, hfd);
+    scsis[ch] = scsi_alloc (ch, hfd);
     return scsis[ch] ? 1 : 0;
 }
 
@@ -1182,7 +1183,7 @@ static void freenativescsi(void)
 {
     int i;
     for (i = 0; i < 7; i++) {
-       freescsi(scsis[i]);
+       freescsi (scsis[i]);
        scsis[i] = NULL;
     }
 }
@@ -1194,7 +1195,7 @@ static void addnativescsi(void)
     int types[MAX_TOTAL_DEVICES];
     struct device_info dis[MAX_TOTAL_DEVICES];
 
-    freenativescsi();
+    freenativescsi ();
     i = 0;
     while (i < MAX_TOTAL_DEVICES) {
        types[i] = -1;
@@ -1234,35 +1235,35 @@ static void addnativescsi(void)
     }
 }
 
-int a3000_add_scsi_unit(int ch, char *path, int blocksize, int readonly,
+int a3000_add_scsi_unit (int ch, char *path, int blocksize, int readonly,
                       char *devname, int sectors, int surfaces, int reserved,
                       int bootpri, char *filesys)
 {
-    return addscsi(ch, path, blocksize, readonly, devname, sectors, surfaces, reserved, bootpri, filesys, 2);
+    return addscsi (ch, path, blocksize, readonly, devname, sectors, surfaces, reserved, bootpri, filesys, 2);
 }
 
-void a3000scsi_reset(void)
+void a3000scsi_reset (void)
 {
     map_banks (&mbdmac_a3000_bank, 0xDD, 1, 0);
 }
 
-void a3000scsi_free(void)
+void a3000scsi_free (void)
 {
-    freenativescsi();
+    freenativescsi ();
 }
 
-int a2091_add_scsi_unit(int ch, char *path, int blocksize, int readonly,
+int a2091_add_scsi_unit (int ch, char *path, int blocksize, int readonly,
                       char *devname, int sectors, int surfaces, int reserved,
                       int bootpri, char *filesys)
 {
-    return addscsi(ch, path, blocksize, readonly, devname, sectors, surfaces, reserved, bootpri, filesys, 1);
+    return addscsi (ch, path, blocksize, readonly, devname, sectors, surfaces, reserved, bootpri, filesys, 1);
 }
 
 
 void a2091_free (void)
 {
-    freenativescsi();
-    xfree(rom);
+    freenativescsi ();
+    xfree (rom);
     rom = NULL;
 }
 
@@ -1273,7 +1274,7 @@ void a2091_reset (void)
     superdmac = 0;
     superdmac = currprefs.cs_mbdmac ? 1 : 0;
     if (currprefs.scsi == 2)
-       addnativescsi();
+       addnativescsi ();
 }
 
 void a2091_init (void)
@@ -1308,7 +1309,7 @@ void a2091_init (void)
 
     rombankswitcher = 0;
     rombank = 0;
-    rl = getromlistbyids(roms);
+    rl = getromlistbyids (roms);
     if (rl) {
        struct zfile *z;
        rd = rl->rd; 
@@ -1324,7 +1325,7 @@ void a2091_init (void)
            rom_mask = rom_size - 1;
        }
     } else {
-       romwarning(roms);
+       romwarning (roms);
     }
     map_banks (&dmaca2091_bank, 0xe80000 >> 16, 0x10000 >> 16, 0x10000);
 }
index 063f06c8401562f4363ccd8cdd8681a18fe90d65..ed8b6dd7ff21cb99d96a0a013b34148ac99a1672 100755 (executable)
@@ -28,7 +28,7 @@ uaecptr EXPANSION_bootcode, EXPANSION_nullfunc;
 /* ROM tag area memory access */
 
 uae_u8 *rtarea;
-uaecptr rtarea_base;
+uaecptr rtarea_base = RTAREA_DEFAULT;
 
 static uae_u32 REGPARAM3 rtarea_lget (uaecptr) REGPARAM;
 static uae_u32 REGPARAM3 rtarea_wget (uaecptr) REGPARAM;
@@ -192,14 +192,13 @@ static uae_u32 REGPARAM2 uae_puts (TrapContext *context)
     return 0;
 }
 
-static void rtarea_init_mem (void)
+void rtarea_init_mem (void)
 {
     rtarea = mapped_malloc (0x10000, "rtarea");
     if (!rtarea) {
        write_log ("virtual memory exhausted (rtarea)!\n");
        abort ();
     }
-    memset (rtarea, 0, 0x10000);
     rtarea_bank.baseaddr = rtarea;
 }
 
@@ -214,6 +213,7 @@ void rtarea_init (void)
     init_traps ();
 
     rtarea_init_mem ();
+    memset (rtarea, 0, 0x10000);
 
     sprintf (uaever, "uae-%d.%d.%d", UAEMAJOR, UAEMINOR, UAESUBREV);
 
diff --git a/cdtv.c b/cdtv.c
index 8e2fb0ea286ce8d84c80c2923d8242420c28a47b..26ef5c4b191a70d2090b3baeb9532349c357d533 100755 (executable)
--- a/cdtv.c
+++ b/cdtv.c
@@ -94,9 +94,9 @@ static int rom_size, rom_mask;
 static uae_u8 *rom;
 #endif
 
-static void do_stch(void);
+static void do_stch (void);
 
-static void INT2(void)
+static void INT2 (void)
 {
     if (!(intreq & 8)) {
        INTREQ_0 (0x8000 | 0x0008);
@@ -130,7 +130,7 @@ static int lsn2msf (int     sectors)
     return msf;
 }
 
-static int get_toc(void)
+static int get_toc (void)
 {
     uae_u8 *buf;
     int i;
@@ -142,7 +142,7 @@ static int get_toc(void)
     i = (buf[0] << 8) | (buf[1] << 0);
     memcpy (cdrom_toc, buf, i);
     last_cd_position = (buf[4 + 2 * 11 + 8] << 16) | (buf[4 + 2 * 11 + 9] << 8) | (buf[4 + 2 * 11 + 10] << 0);
-    last_cd_position = lsn2msf(msf2lsn(last_cd_position) - 1);
+    last_cd_position = lsn2msf (msf2lsn (last_cd_position) - 1);
     if (buf[4 + 3 * 11 + 3] == 1 && (buf[4 + 3 * 11 + 1] & 0x0c) == 0x04)
        datatrack = 1;
     return 1;
@@ -157,7 +157,7 @@ static void finished_cdplay (void)
     do_stch ();
 }
 
-static int get_qcode(void)
+static int get_qcode (void)
 {
     uae_u8 *s;
     static uae_u8 subq0;
@@ -180,7 +180,7 @@ static int get_qcode(void)
     return 1;
 }
 
-static void cdaudiostop(void)
+static void cdaudiostop (void)
 {
     cd_finished = 0;
     if (cd_playing)
@@ -218,22 +218,22 @@ static int read_sectors(int start, int length)
     cd_motor = 1;
     cd_audio_status = AUDIO_STATUS_NOT_SUPPORTED;
     if (cd_playing)
-       cdaudiostop();
+       cdaudiostop ();
     return 0;
 }
 
-static int ismedia(void)
+static int ismedia (void)
 {
     if (unitnum < 0)
        return 0;
     return sys_command_ismedia (DF_IOCTL, unitnum, 0);
 }
 
-static void do_play(void)
+static void do_play (void)
 {
     sys_command_cd_pause (DF_IOCTL, unitnum, 0);
     cd_audio_status = AUDIO_STATUS_PLAY_ERROR;
-    if (sys_command_cd_play (DF_IOCTL, unitnum, lsn2msf(play_start), lsn2msf(play_end), 0)) {
+    if (sys_command_cd_play (DF_IOCTL, unitnum, lsn2msf (play_start), lsn2msf (play_end), 0)) {
        cd_audio_status = AUDIO_STATUS_IN_PROGRESS;
        cd_playing = 1;
     } else {
@@ -262,17 +262,17 @@ static int play_cdtrack (uae_u8 *p)
        if (track_end == s[3])
            end = (s[8] << 16) | (s[9] << 8) | s[10];
     }
-    play_end = msf2lsn(end);
-    play_start = msf2lsn(start);
-    write_log ("PLAY CD AUDIO from %d-%d, %06.6X (%d) to %06.6X (%d)\n",
-       track_start, track_end, start, msf2lsn(start), end, msf2lsn(end));
+    play_end = msf2lsn (end);
+    play_start = msf2lsn (start);
+    write_log ("PLAY CD AUDIO from %d-%d, %06X (%d) to %06X (%d)\n",
+       track_start, track_end, start, msf2lsn (start), end, msf2lsn (end));
     play_state = 1;
     play_state_cmd = 1;
     return 0;
 }
 
 
-static int play_cd(uae_u8 *p)
+static int play_cd (uae_u8 *p)
 {
     uae_u32 start, end;
 
@@ -301,22 +301,22 @@ static int play_cd(uae_u8 *p)
     }
     if (end == 0x00ffffff || end > last_cd_position)
        end = last_cd_position;
-    play_end = msf2lsn(end);
-    play_start = msf2lsn(start);
-    write_log ("PLAY CD AUDIO from %06.6X (%d) to %06.6X (%d)\n",
-       start, msf2lsn(start), end, msf2lsn(end));
+    play_end = msf2lsn (end);
+    play_start = msf2lsn (start);
+    write_log ("PLAY CD AUDIO from %06X (%d) to %06X (%d)\n",
+       start, msf2lsn (start), end, msf2lsn (end));
     play_state = 1;
     play_state_cmd = 1;
     return 0;
 }
 
-static int cdrom_subq(uae_u8 *out, int msflsn)
+static int cdrom_subq (uae_u8 *out, int msflsn)
 {
     uae_u8 *s = cdrom_qcode;
     uae_u32 trackposlsn, trackposmsf;
     uae_u32 diskposlsn, diskposmsf;
 
-    get_qcode();
+    get_qcode ();
     out[0] = cd_audio_status;
     s += 4;
     out[1] = s[1];
@@ -339,13 +339,13 @@ static int cdrom_subq(uae_u8 *out, int msflsn)
     return 13;
 }
 
-static int cdrom_info(uae_u8 *out)
+static int cdrom_info (uae_u8 *out)
 {
     uae_u8 *p;
     uae_u32 size;
     int i;
 
-    if (!ismedia())
+    if (!ismedia ())
        return -1;
     cd_motor = 1;
     out[0] = cdrom_toc[2];
@@ -363,12 +363,12 @@ static int cdrom_info(uae_u8 *out)
     return 5;
 }
 
-static int read_toc(int track, int msflsn, uae_u8 *out)
+static int read_toc (int track, int msflsn, uae_u8 *out)
 {
     uae_u8 *buf = cdrom_toc, *s;
     int i, j;
 
-    if (!ismedia())
+    if (!ismedia ())
        return -1;
     if (!out)
        return 0;
@@ -396,7 +396,7 @@ static int read_toc(int track, int msflsn, uae_u8 *out)
     return -1;
 }
 
-static int cdrom_modeset(uae_u8 *cmd)
+static int cdrom_modeset (uae_u8 *cmd)
 {
     cdtv_sectorsize = (cmd[2] << 8) | cmd[3];
     if (cdtv_sectorsize != 2048 && cdtv_sectorsize != 2336) {
@@ -406,7 +406,7 @@ static int cdrom_modeset(uae_u8 *cmd)
     return 0;
 }
 
-static void cdrom_command_accepted(int size, uae_u8 *cdrom_command_input, int *cdrom_command_cnt_in)
+static void cdrom_command_accepted (int size, uae_u8 *cdrom_command_input, int *cdrom_command_cnt_in)
 {
 #ifdef CDTV_DEBUG_CMD
     char tmp[200];
@@ -430,7 +430,7 @@ static void cdrom_command_accepted(int size, uae_u8 *cdrom_command_input, int *c
     cdrom_command_done = 1;
 }
 
-static void cdrom_command_thread(uae_u8 b)
+static void cdrom_command_thread (uae_u8 b)
 {
     static uae_u8 cdrom_command_input[16];
     static int cdrom_command_cnt_in;
@@ -444,39 +444,39 @@ static void cdrom_command_thread(uae_u8 b)
     {
        case 0x01: /* seek */
        if (cdrom_command_cnt_in == 7) {
-           cdrom_command_accepted(0, s, &cdrom_command_cnt_in);
+           cdrom_command_accepted (0, s, &cdrom_command_cnt_in);
            cd_finished = 1;
        }
        break;
        case 0x02: /* read */
        if (cdrom_command_cnt_in == 7) {
            read_sectors((s[1] << 16) | (s[2] << 8) | (s[3] << 0), (s[4] << 8) | (s[5] << 0));
-           cdrom_command_accepted(0, s, &cdrom_command_cnt_in);
+           cdrom_command_accepted (0, s, &cdrom_command_cnt_in);
        }
        break;
        case 0x04: /* motor on */
        if (cdrom_command_cnt_in == 7) {
            cd_motor = 1;
-           cdrom_command_accepted(0, s, &cdrom_command_cnt_in);
+           cdrom_command_accepted (0, s, &cdrom_command_cnt_in);
            cd_finished = 1;
        }
        break;
        case 0x05: /* motor off */
        if (cdrom_command_cnt_in == 7) {
            cd_motor = 0;
-           cdrom_command_accepted(0, s, &cdrom_command_cnt_in);
+           cdrom_command_accepted (0, s, &cdrom_command_cnt_in);
            cd_finished = 1;
        }
        break;
        case 0x09: /* play (lsn) */
        case 0x0a: /* play (msf) */
        if (cdrom_command_cnt_in == 7) {
-           cdrom_command_accepted(play_cd(cdrom_command_input), s, &cdrom_command_cnt_in);
+           cdrom_command_accepted (play_cd (cdrom_command_input), s, &cdrom_command_cnt_in);
        }
        break;
        case 0x0b:
        if (cdrom_command_cnt_in == 7) {
-           cdrom_command_accepted(play_cdtrack(cdrom_command_input), s, &cdrom_command_cnt_in);
+           cdrom_command_accepted (play_cdtrack (cdrom_command_input), s, &cdrom_command_cnt_in);
        }
        break;
        case 0x81:
@@ -495,7 +495,7 @@ static void cdrom_command_thread(uae_u8 b)
            if (cd_media)
                flag |= 1 << 6;
            cdrom_command_output[0] = flag;
-           cdrom_command_accepted(1, s, &cdrom_command_cnt_in);
+           cdrom_command_accepted (1, s, &cdrom_command_cnt_in);
            cd_finished = 0;
            if (first == -1)
                first = 1;
@@ -507,59 +507,59 @@ static void cdrom_command_thread(uae_u8 b)
                cdrom_command_output[2] |= 1 << 4;
            cd_error = 0;
            cd_isready = 0;
-           cdrom_command_accepted(6, s, &cdrom_command_cnt_in);
+           cdrom_command_accepted (6, s, &cdrom_command_cnt_in);
            cd_finished = 1;
        }
        break;
        case 0x83:
         if (cdrom_command_cnt_in == 7) {
            memcpy (cdrom_command_output, MODEL_NAME, strlen (MODEL_NAME)); 
-           cdrom_command_accepted(strlen (MODEL_NAME), s, &cdrom_command_cnt_in);
+           cdrom_command_accepted (strlen (MODEL_NAME), s, &cdrom_command_cnt_in);
            cd_finished = 1;
        }
        case 0x84:
        if (cdrom_command_cnt_in == 7) {
-           cdrom_command_accepted(cdrom_modeset(cdrom_command_input), s, &cdrom_command_cnt_in);
+           cdrom_command_accepted (cdrom_modeset (cdrom_command_input), s, &cdrom_command_cnt_in);
            cd_finished = 1;
        }
        break;
        case 0x87: /* subq */
        if (cdrom_command_cnt_in == 7) {
-           cdrom_command_accepted(cdrom_subq (cdrom_command_output, cdrom_command_input[1] & 2), s, &cdrom_command_cnt_in);
+           cdrom_command_accepted (cdrom_subq (cdrom_command_output, cdrom_command_input[1] & 2), s, &cdrom_command_cnt_in);
        }
        break;
        case 0x89:
        if (cdrom_command_cnt_in == 7) {
-           cdrom_command_accepted(cdrom_info(cdrom_command_output), s, &cdrom_command_cnt_in);
+           cdrom_command_accepted (cdrom_info (cdrom_command_output), s, &cdrom_command_cnt_in);
        }
        break;
        case 0x8a: /* read toc */
        if (cdrom_command_cnt_in == 7) {
-           cdrom_command_accepted(read_toc(cdrom_command_input[2], cdrom_command_input[1] & 2, cdrom_command_output), s, &cdrom_command_cnt_in);
+           cdrom_command_accepted (read_toc (cdrom_command_input[2], cdrom_command_input[1] & 2, cdrom_command_output), s, &cdrom_command_cnt_in);
        }
        break;
        case 0x8b:
        if (cdrom_command_cnt_in == 7) {
            pause_audio (s[1] == 0x00 ? 1 : 0);
-           cdrom_command_accepted(0, s, &cdrom_command_cnt_in);
+           cdrom_command_accepted (0, s, &cdrom_command_cnt_in);
            cd_finished = 1;
        }
        break;
        case 0xa3: /* front panel */
        if (cdrom_command_cnt_in == 7) {
-           cdrom_command_accepted(0, s, &cdrom_command_cnt_in);
+           cdrom_command_accepted (0, s, &cdrom_command_cnt_in);
            cd_finished = 1;
        }
        break;
        default:
        write_log ("unknown CDROM command %02.2X!\n", s[0]);
        cd_error = 1;
-       cdrom_command_accepted(0, s, &cdrom_command_cnt_in);
+       cdrom_command_accepted (0, s, &cdrom_command_cnt_in);
        break;
     }
 }
 
-static uae_u8 *read_raw(int sector, int size)
+static uae_u8 *read_raw (int sector, int size)
 {
     int osector = sector;
     static struct zfile *f;
@@ -570,7 +570,7 @@ static uae_u8 *read_raw(int sector, int size)
     uae_u32 prevlsn = 0;
     uae_u8 *s = cdrom_toc + 4;
 
-    memset(buf, 0, sizeof buf);
+    memset (buf, 0, sizeof buf);
     trackcnt = 0;
     for (;;) {
        uae_u32 msf = (s[8] << 16) | (s[9] << 8) | s[10];
@@ -587,9 +587,9 @@ static uae_u8 *read_raw(int sector, int size)
        s += 11;
     }
     if (track != trackcnt) {
-       sprintf(fname, "track%d.bin", trackcnt);
-       zfile_fclose(f);
-       f = zfile_fopen(fname, "rb");
+       sprintf (fname, "track%d.bin", trackcnt);
+       zfile_fclose (f);
+       f = zfile_fopen (fname, "rb");
        if (!f)
            write_log ("failed to open '%s'\n", fname);
        else
@@ -661,20 +661,20 @@ static void *dev_thread (void *p)
        switch (b)
        {
            case 0x0100:
-           dma_do_thread();
+           dma_do_thread ();
            break;
            case 0x0101:
            {
-               if (ismedia() != cd_media) {
-                   cd_media = ismedia();
-                   get_toc();
+               if (ismedia () != cd_media) {
+                   cd_media = ismedia ();
+                   get_toc ();
                    activate_stch = 1;
                    cd_error = 1;
                    if (!cd_media)
                        cd_hunt = 1;
                }
                if (cd_media)
-                   get_qcode();
+                   get_qcode ();
            }
            break;
            case 0x0102: // pause
@@ -687,7 +687,7 @@ static void *dev_thread (void *p)
            cdaudiostop();
            break;
            case 0x0110: // do_play!
-           do_play();
+           do_play ();
            break;
            case 0xffff:
            thread_alive = -1;
@@ -700,7 +700,7 @@ static void *dev_thread (void *p)
     }
 }
 
-static void cdrom_command(uae_u8 b)
+static void cdrom_command (uae_u8 b)
 {
     write_comm_pipe_u32 (&requests, b, 1);
 }
@@ -708,7 +708,7 @@ static void cdrom_command(uae_u8 b)
 static uae_u8 tp_a, tp_b, tp_c, tp_ad, tp_bd, tp_cd;
 static uae_u8 tp_imr, tp_cr, tp_air;
 
-static void tp_check_interrupts(void)
+static void tp_check_interrupts (void)
 {
     /* MC = 1 ? */
     if ((tp_cr & 1) != 1)
@@ -836,32 +836,32 @@ static void REGPARAM3 dmac_lput (uaecptr, uae_u32) REGPARAM;
 static void REGPARAM3 dmac_wput (uaecptr, uae_u32) REGPARAM;
 static void REGPARAM3 dmac_bput (uaecptr, uae_u32) REGPARAM;
 
-static void dmac_start_dma(void)
+static void dmac_start_dma (void)
 {
     if (!(dmac_cntr & CNTR_PDMD)) { // non-scsi dma
        write_comm_pipe_u32 (&requests, 0x0100, 1);
     }
 }
 
-void cdtv_getdmadata(uae_u32 *acr)
+void cdtv_getdmadata (uae_u32 *acr)
 {
     *acr = dmac_acr;
 }
 
-static void do_hunt(void)
+static void do_hunt (void)
 {
     int i;
     for (i = 0; i < MAX_TOTAL_DEVICES; i++) {
-       if (sys_command_ismedia(DF_IOCTL, i, 1) > 0)
+       if (sys_command_ismedia (DF_IOCTL, i, 1) > 0)
            break;
     }
     if (i == MAX_TOTAL_DEVICES)
        return;
     if (unitnum >= 0) {
-       cdaudiostop();
-       sys_command_close(DF_IOCTL, unitnum);
+       cdaudiostop ();
+       sys_command_close (DF_IOCTL, unitnum);
     }
-    if (sys_command_open(DF_IOCTL, i) > 0) {
+    if (sys_command_open (DF_IOCTL, i) > 0) {
        unitnum = i;
        cd_hunt = 0;
        write_log ("CDTV: autodetected unit %d\n", unitnum);
@@ -870,11 +870,11 @@ static void do_hunt(void)
     }
 }
 
-static void checkint(void)
+static void checkint (void)
 {
     int irq = 0;
 
-    if (currprefs.cs_cdtvscsi && (wdscsi_getauxstatus() & 0x80)) {
+    if (currprefs.cs_cdtvscsi && (wdscsi_getauxstatus () & 0x80)) {
        dmac_istr |= ISTR_INTS;
        if ((dmac_cntr & CNTR_INTEN) && (dmac_istr & ISTR_INTS))
            irq = 1;
@@ -882,7 +882,7 @@ static void checkint(void)
     if ((dmac_cntr & CNTR_INTEN) && (dmac_istr & ISTR_E_INT))
        irq = 1;
     if (irq)
-       INT2();
+       INT2 ();
 }
 
 void cdtv_scsi_int (void)
@@ -901,7 +901,7 @@ void rethink_cdtv (void)
 }
 
 
-void CDTV_hsync_handler(void)
+void CDTV_hsync_handler (void)
 {
     static int subqcnt;
 
@@ -927,7 +927,7 @@ void CDTV_hsync_handler(void)
     if (cdrom_command_done) {
        cdrom_command_done = 0;
        sten = 1;
-       tp_check_interrupts();
+       tp_check_interrupts ();
     }
 
     if (cdtv_hsync < 312 * 50 / 75 && cdtv_hsync >= 0)
@@ -937,7 +937,7 @@ void CDTV_hsync_handler(void)
     if (first > 0) {
        first--;
        if (first == 0)
-           do_stch();
+           do_stch ();
     }
 
     if (play_state == 1) {
@@ -956,13 +956,13 @@ void CDTV_hsync_handler(void)
     if (cd_isready > 0) {
        cd_isready--;
        if (!cd_isready)
-           do_stch();
+           do_stch ();
     }
     if (cd_playing)
        gui_cd_led (0, 1);
     if (cd_media && (tp_cr & 1)) {
        tp_air |= 1 << 1;
-       INT2();
+       INT2 ();
     }
 
     subqcnt--;
@@ -970,10 +970,10 @@ void CDTV_hsync_handler(void)
        write_comm_pipe_u32 (&requests, 0x0101, 1);
        subqcnt = 75;
        if (cd_hunt)
-           do_hunt();
+           do_hunt ();
     }
     if (activate_stch)
-       do_stch();
+       do_stch ();
 }
 
 static void do_stch (void)
@@ -1043,12 +1043,12 @@ static uae_u32 dmac_bget2 (uaecptr addr)
        break;
        case 0x91:
        if (currprefs.cs_cdtvscsi)
-           v = wdscsi_getauxstatus();
+           v = wdscsi_getauxstatus ();
        break;
        case 0x93:
        if (currprefs.cs_cdtvscsi) {
-           v = wdscsi_get();
-           checkint();
+           v = wdscsi_get ();
+           checkint ();
        }
        break;
        case 0xa1:
@@ -1062,7 +1062,7 @@ static uae_u32 dmac_bget2 (uaecptr addr)
                cdrom_command_cnt_out = -1;
            } else {
                sten = 1;
-               tp_check_interrupts();
+               tp_check_interrupts ();
            }
        }
        break;
@@ -1147,13 +1147,13 @@ static void dmac_bput2 (uaecptr addr, uae_u32 b)
        case 0x91:
        if (currprefs.cs_cdtvscsi) {
            wdscsi_sasr (b);
-           checkint();
+           checkint ();
        }
        break;
        case 0x93:
        if (currprefs.cs_cdtvscsi) {
            wdscsi_put (b);
-           checkint();
+           checkint ();
        }
        break;
        case 0xa1:
@@ -1163,7 +1163,7 @@ static void dmac_bput2 (uaecptr addr, uae_u32 b)
        case 0xe1:
        if (!dmac_dma) {
            dmac_dma = 1;
-           dmac_start_dma();
+           dmac_start_dma ();
        }
        break;
        case 0xe2:
@@ -1174,7 +1174,7 @@ static void dmac_bput2 (uaecptr addr, uae_u32 b)
        case 0xe4:
        case 0xe5:
        dmac_istr = 0;
-       checkint();
+       checkint ();
        break;
        case 0xe8:
        case 0xe9:
@@ -1182,7 +1182,7 @@ static void dmac_bput2 (uaecptr addr, uae_u32 b)
        break;
     }
 
-    tp_check_interrupts();
+    tp_check_interrupts ();
 }
 
 static uae_u32 REGPARAM2 dmac_lget (uaecptr addr)
@@ -1289,8 +1289,8 @@ static void open_unit(void)
     if (unitnum >= 0)
        sys_command_close (DF_IOCTL, unitnum);
     unitnum = -1;
-    cdtv_reset();
-    if (!device_func_init(DEVICE_TYPE_ANY)) {
+    cdtv_reset ();
+    if (!device_func_init (DEVICE_TYPE_ANY)) {
        write_log ("no CDROM support\n");
        return;
     }
@@ -1331,12 +1331,12 @@ static void open_unit(void)
     cd_media = 0;
     if (unitnum >= 0) {
        sys_command_open (DF_IOCTL, unitnum);
-       cd_media = ismedia();
+       cd_media = ismedia ();
        if (!cd_media)
            cd_hunt = 1;
        if (!get_toc())
            cd_media = 0;
-       cdaudiostop();
+       cdaudiostop ();
     }
 }
 
@@ -1494,12 +1494,12 @@ void cdtv_free (void)
        write_comm_pipe_u32 (&requests, 0x0104, 1);
        write_comm_pipe_u32 (&requests, 0xffff, 1);
        while (thread_alive > 0)
-           sleep_millis(10);
+           sleep_millis (10);
     }
     thread_alive = 0;
     cdaudiostop ();
     if (unitnum >= 0)
-       sys_command_close(DF_IOCTL, unitnum);
+       sys_command_close (DF_IOCTL, unitnum);
     unitnum = -1;
     configured = 0;
 }
@@ -1584,5 +1584,5 @@ void cdtv_init (void)
     /* KS autoconfig handles the rest */
     map_banks (&dmac_bank, 0xe80000 >> 16, 0x10000 >> 16, 0x10000);
     cdtv_battram_reset ();
-    open_unit();
+    open_unit ();
 }
index 02613d9f1f113b60d64934498fd09b3d74cd4966..546e470df6a892c3d78bd377e2c435dec332058a 100755 (executable)
--- a/cfgfile.c
+++ b/cfgfile.c
@@ -32,6 +32,7 @@
 static int config_newfilesystem;
 static struct strlist *temp_lines;
 static struct zfile *default_file;
+static int uaeconfig;
 
 /* @@@ need to get rid of this... just cut part of the manual and print that
  * as a help text.  */
@@ -156,6 +157,8 @@ static const char *cscompa[] = {
 static const char *fullmodes[] = { "false", "true", /* "FILE_NOT_FOUND", */ "fullwindow", 0 };
 /* bleh for compatibility */
 static const char *scsimode[] = { "false", "true", "scsi", 0 };
+static const char *maxhoriz[] = { "lores", "hires", "superhires", 0 };
+static const char *maxvert[] = { "nointerlace", "interlace", 0 };
 
 static const char *obsolete[] = {
     "accuracy", "gfx_opengl", "gfx_32bit_blits", "32bit_blits",
@@ -208,7 +211,7 @@ char *cfgfile_subst_path (const char *path, const char *subst, const char *file)
 static int isdefault (const char *s)
 {
     char tmp[MAX_DPATH];
-    if (!default_file)
+    if (!default_file || uaeconfig)
        return 0;
     zfile_fseek (default_file, 0, SEEK_SET);
     while (zfile_fgets (tmp, sizeof tmp, default_file)) {
@@ -236,7 +239,7 @@ void cfgfile_dwrite (struct zfile *f, char *format,...)
 
     va_start (parms, format);
     vsprintf (tmp, format, parms);
-    if (1 || !isdefault (tmp))
+    if (!isdefault (tmp))
        zfile_fwrite (tmp, 1, strlen (tmp), f);
     va_end (parms);
 }
@@ -450,7 +453,6 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
     cfgfile_write (f, "comp_oldsegv=%s\n", p->comp_oldsegv ? "true" : "false");
 
     cfgfile_write (f, "comp_flushmode=%s\n", flushmode[p->comp_hardflush]);
-    cfgfile_write (f, "compforcesettings=%s\n", p->compforcesettings ? "true" : "false");
     cfgfile_write (f, "compfpu=%s\n", p->compfpu ? "true" : "false");
     cfgfile_write (f, "fpu_strict=%s\n", p->fpu_strict ? "true" : "false");
     cfgfile_write (f, "comp_midopt=%s\n", p->comp_midopt ? "true" : "false");
@@ -538,10 +540,14 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
                        cfgfile_dwrite (f, "gfx_filter_mode=%s\n", filtermode1[p->gfx_filter_filtermode]);
                    } else {
                        int mt[4], i = 0;
-                       if (uf->x[1]) mt[i++] = 1;
-                       if (uf->x[2]) mt[i++] = 2;
-                       if (uf->x[3]) mt[i++] = 3;
-                       if (uf->x[4]) mt[i++] = 4;
+                       if (uf->x[1])
+                           mt[i++] = 1;
+                       if (uf->x[2])
+                           mt[i++] = 2;
+                       if (uf->x[3])
+                           mt[i++] = 3;
+                       if (uf->x[4])
+                           mt[i++] = 4;
                        cfgfile_dwrite (f, "gfx_filter_mode=%dx\n", mt[p->gfx_filter_filtermode]);
                    }
                }
@@ -950,7 +956,9 @@ static int cfgfile_parse_host (struct uae_prefs *p, char *option, char *value)
        || cfgfile_strval (option, value, "gfx_colour_mode", &p->color_mode, colormode1, 1)
        || cfgfile_strval (option, value, "gfx_colour_mode", &p->color_mode, colormode2, 0)
        || cfgfile_strval (option, value, "gfx_color_mode", &p->color_mode, colormode1, 1)
-       || cfgfile_strval (option, value, "gfx_color_mode", &p->color_mode, colormode2, 0))
+       || cfgfile_strval (option, value, "gfx_color_mode", &p->color_mode, colormode2, 0)
+       || cfgfile_strval (option, value, "gfx_max_horizontal", &p->gfx_max_horizontal, maxhoriz, 0)
+       || cfgfile_strval (option, value, "gfx_max_vertical", &p->gfx_max_vertical, maxvert, 0))
            return 1;
 
 
@@ -980,10 +988,14 @@ static int cfgfile_parse_host (struct uae_prefs *p, char *option, char *value)
                    } else {
                        int mt[4], j;
                        i = 0;
-                       if (uf->x[1]) mt[i++] = 1;
-                       if (uf->x[2]) mt[i++] = 2;
-                       if (uf->x[3]) mt[i++] = 3;
-                       if (uf->x[4]) mt[i++] = 4;
+                       if (uf->x[1])
+                           mt[i++] = 1;
+                       if (uf->x[2])
+                           mt[i++] = 2;
+                       if (uf->x[3])
+                           mt[i++] = 3;
+                       if (uf->x[4])
+                           mt[i++] = 4;
                        cfgfile_strval (option, value, "gfx_filter_mode", &i, filtermode2, 0);
                        for (j = 0; j < i; j++) {
                            if (mt[j] == i)
@@ -1274,7 +1286,7 @@ static void parse_addmem (struct uae_prefs *p, char *buf, int num)
 
 static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *value)
 {
-    int tmpval, dummy, i;
+    int tmpval, dummyint, i;
     char *section = 0;
     char tmpbuf[CONFIG_BLEN];
 
@@ -1286,13 +1298,13 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu
        return 1;
     }
 
-    if (cfgfile_yesno (option, value, "scsi_a3000", &dummy)) {
-       if (dummy)
+    if (cfgfile_yesno (option, value, "scsi_a3000", &dummyint)) {
+       if (dummyint)
            p->cs_mbdmac = 1;
        return 1;
     }
-    if (cfgfile_yesno (option, value, "scsi_a4000t", &dummy)) {
-       if (dummy)
+    if (cfgfile_yesno (option, value, "scsi_a4000t", &dummyint)) {
+       if (dummyint)
            p->cs_mbdmac = 2;
        return 1;
     }
@@ -1330,7 +1342,7 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu
        || cfgfile_yesno (option, value, "comp_nf", &p->compnf)
        || cfgfile_yesno (option, value, "comp_constjump", &p->comp_constjump)
        || cfgfile_yesno (option, value, "comp_oldsegv", &p->comp_oldsegv)
-       || cfgfile_yesno (option, value, "compforcesettings", &p->compforcesettings)
+       || cfgfile_yesno (option, value, "compforcesettings", &dummyint)
        || cfgfile_yesno (option, value, "compfpu", &p->compfpu)
        || cfgfile_yesno (option, value, "fpu_strict", &p->fpu_strict)
        || cfgfile_yesno (option, value, "comp_midopt", &p->comp_midopt)
@@ -1417,13 +1429,13 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu
            return 1;
     }
 
-    if (cfgfile_intval (option, value, "chipmem_size", &dummy, 1)) {
-       if (dummy < 0)
+    if (cfgfile_intval (option, value, "chipmem_size", &dummyint, 1)) {
+       if (dummyint < 0)
            p->chipmem_size = 0x20000; /* 128k, prototype support */
-       else if (dummy == 0)
+       else if (dummyint == 0)
            p->chipmem_size = 0x40000; /* 256k */
        else
-           p->chipmem_size = dummy * 0x80000;
+           p->chipmem_size = dummyint * 0x80000;
        return 1;
     }
 
@@ -1972,7 +1984,7 @@ int cfgfile_get_description (const char *filename, char *description, char *host
     return result;
 }
 
-int cfgfile_configuration_change(int v)
+int cfgfile_configuration_change (int v)
 {
     static int mode;
     if (v >= 0)
@@ -2599,7 +2611,9 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae
            goto end;
        }
        zfile_fseek (configstore, 0, SEEK_SET);
+       uaeconfig++;
        cfgfile_save_options (configstore, &currprefs, 0);
+       uaeconfig--;
        zfile_fwrite (&zero, 1, 1, configstore);
        zfile_fseek (configstore, 0, SEEK_SET);
        err = 0xffffffff;
@@ -2840,7 +2854,6 @@ void default_prefs (struct uae_prefs *p, int type)
     p->comp_oldsegv = 0;
     p->compfpu = 1;
     p->fpu_strict = 0;
-    p->compforcesettings = 0;
     p->cachesize = 0;
     p->avoid_cmov = 0;
     p->avoid_dga = 0;
@@ -2878,6 +2891,8 @@ void default_prefs (struct uae_prefs *p, int type)
     p->gfx_xcenter = 0; p->gfx_ycenter = 0;
     p->gfx_xcenter_pos = -1; p->gfx_ycenter_pos = -1;
     p->gfx_xcenter_size = -1; p->gfx_ycenter_size = -1;
+    p->gfx_max_horizontal = RES_HIRES;
+    p->gfx_max_vertical = 1;
     p->color_mode = 2;
 
     p->x11_use_low_bandwidth = 0;
@@ -2932,7 +2947,7 @@ void default_prefs (struct uae_prefs *p, int type)
     p->gfx_filter = 0;
     p->gfx_filter_horiz_zoom_mult = 0;
     p->gfx_filter_vert_zoom_mult = 0;
-    p->gfx_filter_filtermode = 1;
+    p->gfx_filter_filtermode = 0;
     p->gfx_filter_scanlineratio = (1 << 4) | 1;
 
     strcpy (p->df[0], "df0.adf");
@@ -3001,7 +3016,9 @@ void default_prefs (struct uae_prefs *p, int type)
     default_file = NULL;
     f = zfile_fopen_empty ("configstore", 50000);
     if (f) {
+       uaeconfig++;
        cfgfile_save_options (f, p, 0);
+       uaeconfig--;
        zfile_fwrite (&zero, 1, 1, f);
        default_file = f;
     }
diff --git a/cia.c b/cia.c
index e2b052700463965dcf64510e4e32a0f6e3049b47..c3e8cbd40724ac12dee4175ee9610348d297eb62 100755 (executable)
--- a/cia.c
+++ b/cia.c
@@ -66,7 +66,7 @@ static unsigned int ciaapra, ciaaprb, ciaadra, ciaadrb, ciaasdr, ciaasdr_cnt;
 static unsigned int ciabprb, ciabdra, ciabdrb, ciabsdr, ciabsdr_cnt;
 static int div10;
 static int kbstate, kback, ciaasdr_unread;
-static unsigned int sleepyhead = 0;
+static unsigned int sleepyhead;
 
 #ifdef TOD_HACK
 static int tod_hack, tod_hack_delay;
@@ -345,8 +345,8 @@ static void setcode (uae_u8 keycode)
 static void sendrw (void)
 {
     setcode (AK_RESETWARNING);
-    ciaaicr |= 8;
     ciaasdr_unread = 1;
+    ciaaicr |= 8;
     RethinkICRA ();
     write_log ("KB: sent reset warning code (phase=%d)\n", resetwarning_phase);
 }
@@ -412,7 +412,7 @@ void CIA_hsync_handler (void)
        resetwarning_check ();
        while (keys_available ())
            get_next_key ();
-    } else if ((keys_available() || kbstate < 2) && kback && (ciaacra & 0x40) == 0 && (hsync_counter & 15) == 0) {
+    } else if ((keys_available() || kbstate < 3) && kback && (ciaacra & 0x40) == 0 && (hsync_counter & 15) == 0) {
        /*
         * This hack lets one possible ciaaicr cycle go by without any key
         * being read, for every cycle in which a key is pulled out of the
@@ -430,15 +430,22 @@ void CIA_hsync_handler (void)
        } else if (ciaasdr_unread == 0) {
            switch (kbstate) {
             case 0:
-               setcode (AK_INIT_POWERUP);
+               ciaasdr = 0; /* powerup resync */
                kbstate++;
+               ciaasdr_unread = 3;
                break;
             case 1:
-               setcode (AK_TERM_POWERUP);
+               setcode (AK_INIT_POWERUP);
                kbstate++;
+               ciaasdr_unread = 3;
                break;
             case 2:
-               ciaasdr = ~get_next_key();
+               setcode (AK_TERM_POWERUP);
+               kbstate++;
+               ciaasdr_unread = 3;
+               break;
+            case 3:
+               ciaasdr = ~get_next_key ();
                ciaasdr_unread = 1;      /* interlock to prevent lost keystrokes */
                break;
            }
@@ -446,7 +453,10 @@ void CIA_hsync_handler (void)
            RethinkICRA ();
            sleepyhead = 0;
        } else if (!(++sleepyhead & 15)) {
-           ciaasdr_unread = 0;          /* give up on this key event after unread for a long time */
+           if (ciaasdr_unread == 3)
+               ciaaicr |= 8;
+           if (ciaasdr_unread < 3)
+               ciaasdr_unread = 0;          /* give up on this key event after unread for a long time */
        }
     }
 }
@@ -621,7 +631,7 @@ static uae_u8 ReadCIAA (unsigned int addr)
        }
        return (uae_u8)(ciaatol >> 16);
     case 12:
-       if (ciaasdr_unread == 1)
+       if (ciaasdr_unread >= 1)
            ciaasdr_unread = 2;
        return ciaasdr;
     case 13:
@@ -1047,7 +1057,7 @@ void CIA_reset (void)
        tod_hack_reset ();
 #endif
     kback = 1;
-    kbstate = 0;
+    kbstate = 3;
     ciaasdr_unread = 0;
     serbits = 0;
     oldovl = 1;
@@ -1055,6 +1065,7 @@ void CIA_reset (void)
     resetwarning_phase = resetwarning_timer = 0;
 
     if (!savestate_state) {
+       kbstate = 0;
        ciaatlatch = ciabtlatch = 0;
        ciaapra = 0; ciaadra = 0;
        ciaatod = ciabtod = 0; ciaatodon = ciabtodon = 0;
index 8715469c64c53a53621a087525c234994bb8d5d8..4f6cb83aa019f38c7760525199120065a1ae9769 100755 (executable)
--- a/custom.c
+++ b/custom.c
@@ -112,6 +112,7 @@ static unsigned int total_skipped = 0;
 
 STATIC_INLINE void sync_copper (int hpos);
 
+
 /* Events */
 
 unsigned long int event_cycles, nextevent, is_lastline, currcycle;
@@ -228,6 +229,7 @@ int bpl_off[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
 
 static struct color_entry current_colors;
 static unsigned int bplcon0, bplcon1, bplcon2, bplcon3, bplcon4;
+static unsigned int bplcon0_res, bplcon0_planes, bplcon0_planes_limit;
 static unsigned int diwstrt, diwstop, diwhigh;
 static int diwhigh_written;
 static unsigned int ddfstrt, ddfstop, ddfstrt_old_hpos, ddfstrt_old_vpos;
@@ -360,7 +362,7 @@ enum fetchstate {
 
 STATIC_INLINE int ecsshres(void)
 {
-    return GET_RES (bplcon0) == RES_SUPERHIRES && (currprefs.chipset_mask & CSMASK_ECS_DENISE) && !(currprefs.chipset_mask & CSMASK_AGA);
+    return bplcon0_res == RES_SUPERHIRES && (currprefs.chipset_mask & CSMASK_ECS_DENISE) && !(currprefs.chipset_mask & CSMASK_AGA);
 }
 
 STATIC_INLINE int nodraw (void)
@@ -584,7 +586,7 @@ static void add_modulos (void)
        m2 = bpl2mod;
     }
 
-    switch (GET_PLANES_LIMIT (bplcon0)) {
+    switch (bplcon0_planes_limit) {
 #ifdef AGA
        case 8: bplpt[7] += m2;
        case 7: bplpt[6] += m1;
@@ -723,7 +725,7 @@ static int cycle_diagram_shift;
 
 static void estimate_last_fetch_cycle (int hpos)
 {
-    int fetchunit = fetchunits[fetchmode * 4 + GET_RES (bplcon0)];
+    int fetchunit = fetchunits[fetchmode * 4 + bplcon0_res];
 
     if (! passed_plfstop) {
        int stop = plfstop < hpos || plfstop > HARD_DDF_STOP ? HARD_DDF_STOP : plfstop;
@@ -792,16 +794,17 @@ STATIC_INLINE void compute_delay_offset (void)
 
 static void expand_fmodes (void)
 {
-    int res = GET_RES(bplcon0);
-    int fm = fetchmode;
-    fetchunit = fetchunits[fm * 4 + res];
+    bplcon0_res = GET_RES (bplcon0);
+    bplcon0_planes = GET_PLANES (bplcon0);
+    bplcon0_planes_limit = GET_PLANES_LIMIT (bplcon0);
+    fetchunit = fetchunits[fetchmode * 4 + bplcon0_res];
     fetchunit_mask = fetchunit - 1;
-    fetchstart_shift = fetchstarts[fm * 4 + res];
+    fetchstart_shift = fetchstarts[fetchmode * 4 + bplcon0_res];
     fetchstart = 1 << fetchstart_shift;
     fetchstart_mask = fetchstart - 1;
-    fm_maxplane_shift = fm_maxplanes[fm * 4 + res];
+    fm_maxplane_shift = fm_maxplanes[fetchmode * 4 + bplcon0_res];
     fm_maxplane = 1 << fm_maxplane_shift;
-    curr_diagram = cycle_diagram_table[fm][res][GET_PLANES_LIMIT (bplcon0)];
+    curr_diagram = cycle_diagram_table[fetchmode][bplcon0_res][bplcon0_planes_limit];
     fetch_modulo_cycle = fetchunit - fetchstart;
 }
 
@@ -826,8 +829,8 @@ static void compute_toscr_delay_1 (void)
 
 static void compute_toscr_delay (int hpos)
 {
-    toscr_res = GET_RES (bplcon0);
-    toscr_nr_planes = GET_PLANES_LIMIT (bplcon0);
+    toscr_res = bplcon0_res;
+    toscr_nr_planes = bplcon0_planes_limit;
     compute_toscr_delay_1 ();
 }
 
@@ -1445,7 +1448,7 @@ STATIC_INLINE void update_fetch (int until, int fm)
        if (fetch_state == fetch_was_plane0)
            break;
 
-       fetch_start(pos);
+       fetch_start (pos);
        if (one_fetch_cycle (pos, ddfstop_to_test, dma, fm))
            return;
     }
@@ -1505,7 +1508,7 @@ STATIC_INLINE void update_fetch (int until, int fm)
     for (; pos < until; pos++) {
        if (fetch_state == fetch_was_plane0)
            beginning_of_plane_block (pos, fm);
-       fetch_start(pos);
+       fetch_start (pos);
 
        if (one_fetch_cycle (pos, ddfstop_to_test, dma, fm))
            return;
@@ -1540,15 +1543,16 @@ static void start_bpl_dma (int hpos, int hstart)
 {
     if (first_bpl_vpos < 0)
        first_bpl_vpos = vpos;
-    fetch_start(hpos);
+    fetch_start (hpos);
     fetch_cycle = 0;
     last_fetch_hpos = hstart;
     out_nbits = 0;
     out_offs = 0;
     toscr_nbits = 0;
-    thisline_decision.bplres = GET_RES (bplcon0);
+    thisline_decision.bplres = bplcon0_res;
 
     ddfstate = DIW_waiting_stop;
+    toscr_nr_planes = bplcon0_planes_limit;
     compute_toscr_delay (last_fetch_hpos);
 
     /* If someone already wrote BPL1DAT, clear the area between that point and
@@ -1712,7 +1716,7 @@ static int expand_sprres (uae_u16 con0, uae_u16 con3)
 /* handle very rarely needed playfield collision (CLXDAT bit 0) */
 static void do_playfield_collisions (void)
 {
-    int bplres = GET_RES (bplcon0);
+    int bplres = bplcon0_res;
     hwres_t ddf_left = thisline_decision.plfleft * 2 << bplres;
     hwres_t hw_diwlast = coord_window_to_diw_x (thisline_decision.diwlastword);
     hwres_t hw_diwfirst = coord_window_to_diw_x (thisline_decision.diwfirstword);
@@ -1781,7 +1785,7 @@ static void do_sprite_collisions (void)
     int first = curr_drawinfo[next_lineno].first_sprite_entry;
     int i;
     unsigned int collision_mask = clxmask[clxcon >> 12];
-    int bplres = GET_RES (bplcon0);
+    int bplres = bplcon0_res;
     hwres_t ddf_left = thisline_decision.plfleft * 2 << bplres;
     hwres_t hw_diwlast = coord_window_to_diw_x (thisline_decision.diwlastword);
     hwres_t hw_diwfirst = coord_window_to_diw_x (thisline_decision.diwfirstword);
@@ -2168,9 +2172,12 @@ static void finish_decisions (void)
     dip = curr_drawinfo + next_lineno;
     dip_old = prev_drawinfo + next_lineno;
     dp = line_decisions + next_lineno;
-    dp->valid = 0;
+//    dp->valid = 0;
     changed = thisline_changed + interlace_started;
-
+#if 0
+    if (!(next_lineno & 1) && !(bplcon0 & 4) && interlace_seen)
+       changed = 1;
+#endif
     if (thisline_decision.plfleft != -1)
        record_diw_line (thisline_decision.plfleft, diwfirstword, diwlastword);
 
@@ -2200,7 +2207,7 @@ static void finish_decisions (void)
     if (changed) {
        thisline_changed = 1;
        *dp = thisline_decision;
-       dp->valid = 1;
+//     dp->valid = 1;
     } else
        /* The only one that may differ: */
        dp->ctable = thisline_decision.ctable;
@@ -2212,7 +2219,7 @@ static void reset_decisions (void)
     if (nodraw ())
        return;
 
-    thisline_decision.bplres = GET_RES (bplcon0);
+    thisline_decision.bplres = bplcon0_res;
     thisline_decision.nr_planes = 0;
 
     thisline_decision.plfleft = -1;
@@ -2242,8 +2249,10 @@ static void reset_decisions (void)
     memset (todisplay, 0, sizeof todisplay);
     memset (fetched, 0, sizeof fetched);
 #ifdef AGA
-    memset (fetched_aga0, 0, sizeof fetched_aga0);
-    memset (fetched_aga1, 0, sizeof fetched_aga1);
+    if (currprefs.chipset_mask & CSMASK_AGA) {
+       memset (fetched_aga0, 0, sizeof fetched_aga0);
+       memset (fetched_aga1, 0, sizeof fetched_aga1);
+    }
 #endif
     memset (outword, 0, sizeof outword);
 
@@ -2278,7 +2287,7 @@ void compute_vsynctime (void)
     fake_vblank_hz = 0;
     if (currprefs.chipset_refreshrate) {
        vblank_hz = currprefs.chipset_refreshrate;
-       if (isvsync()) {
+       if (isvsync ()) {
            vblank_skip = 1;
            if (!fake_vblank_hz && vblank_hz > 85) {
                vblank_hz /= 2;
@@ -2324,12 +2333,10 @@ void init_hz (void)
 
     if ((currprefs.chipset_refreshrate == 50 && !currprefs.ntscmode) ||
        (currprefs.chipset_refreshrate == 60 && currprefs.ntscmode)) {
-       currprefs.chipset_refreshrate = 0;
-       changed_prefs.chipset_refreshrate = 0;
+       currprefs.chipset_refreshrate = changed_prefs.chipset_refreshrate = 0;
     }
-    if (currprefs.gfx_avsync && currprefs.gfx_afullscreen) {
-       currprefs.chipset_refreshrate = abs (currprefs.gfx_refreshrate);
-       changed_prefs.chipset_refreshrate = abs (currprefs.gfx_refreshrate);
+    if (isvsync ()) {
+       changed_prefs.chipset_refreshrate = currprefs.chipset_refreshrate = abs (currprefs.gfx_refreshrate);
     }
 
     doublescan = 0;
@@ -2391,8 +2398,10 @@ void init_hz (void)
     eventtab[ev_hsync].oldcycles = get_cycles ();
     eventtab[ev_hsync].evtime = get_cycles() + HSYNCTIME;
     events_schedule ();
-    if (hzc)
+    if (hzc) {
+       interlace_seen = bplcon0 & 4;
         reset_drawing ();
+    }
     compute_vsynctime ();
 #ifdef OPENGL
     OGL_refresh ();
@@ -2805,9 +2814,9 @@ static void INTREQ_d (uae_u16 v, int d)
     /* data in intreq is immediately available (vsync only currently because there is something unknown..) */
     setclr (&intreqr, v & (0x8000 | 0x20));
     if (!use_eventmode() || v == 0)
-       INTREQ_f(v);
+       INTREQ_f (v);
     else
-       event2_newevent2(d, v, INTREQ_f);
+       event2_newevent2 (d, v, INTREQ_f);
 }
 
 void INTREQ (uae_u16 v)
@@ -2908,7 +2917,7 @@ static void BPLxPTL (int hpos, uae_u16 v, int num)
     //write_log ("%d:%d:BPL%dPTL %08.8X\n", hpos, vpos, num, v);
 }
 
-static void BPLCON0 (int hpos, uae_u16 v)
+static void BPLCON0_do (int hpos, uae_u16 v)
 {
     if (! (currprefs.chipset_mask & CSMASK_ECS_DENISE))
        v &= ~0x00F1;
@@ -2935,6 +2944,7 @@ static void BPLCON0 (int hpos, uae_u16 v)
     decide_blitter (hpos);
 
     bplcon0 = v;
+
     record_register_change (hpos, 0x100, v);
 
 #ifdef ECS_DENISE
@@ -2943,12 +2953,65 @@ static void BPLCON0 (int hpos, uae_u16 v)
        sprres = expand_sprres (bplcon0, bplcon3);
     }
 #endif
-
     expand_fmodes ();
     calcdiw ();
     estimate_last_fetch_cycle (hpos);
 }
 
+static void BPLCON0_X (uae_u32 data)
+{
+    int hpos = data >> 16;
+#if 0
+    toscr_nr_planes = bplcon0_planes_limit;
+    compute_toscr_delay (last_fetch_hpos);
+    compute_delay_offset ();
+#else
+    int i;
+
+    /* disposable hero titlescreen hack */
+    if (GET_PLANES (bplcon0) == 0) {
+       bplpt[0] += 2;
+       for (i = 1; i < GET_PLANES (data); i++)
+           bplpt[i] += 4 << fetchmode;
+    }
+    BPLCON0_do (hpos, data);
+#endif
+}
+
+static void BPLCON0 (int hpos, uae_u16 v)
+{
+    if (v == bplcon0)
+       return;
+
+    if (diwstate != DIW_waiting_stop || hpos <= plfstrt || hpos > plfstop - fetchunit) {
+       BPLCON0_do (hpos, v);
+       return;
+    }
+
+    if (GET_RES (v) == GET_RES (bplcon0) && (GET_PLANES (v) > 0 && GET_PLANES (bplcon0) > 0 && fmode == 0)) {
+       BPLCON0_do (hpos, v);
+       return;
+    }
+    BPLCON0_do (hpos, v);
+#if 0
+    /* disposable hero titlescreen hack part 2 */
+    decide_line (hpos);
+    decide_fetch (hpos);
+    delay = fm_maxplane - ((hpos - cycle_diagram_shift) & fetchstart_mask);
+    if (delay <= 0) {
+       BPLCON0_do (hpos, v);
+    } else {
+       int p;
+       uae_u16 v2 = bplcon0;
+       v2 &= 0xf050;
+       v2 |= v & ~0xf050;
+       BPLCON0_do (hpos, v);
+       event2_newevent2 (delay, v | ((hpos + delay) << 16), BPLCON0_X);
+    }
+#endif
+}
+
+
 STATIC_INLINE void BPLCON1 (int hpos, uae_u16 v)
 {
     if (!(currprefs.chipset_mask & CSMASK_AGA))
@@ -4198,6 +4261,10 @@ static void framewait (void)
     frame_time_t curr_time;
     frame_time_t start;
 
+    if (isvsync ()) {
+       vsyncmintime = vsynctime;
+       return;
+    }
     for (;;) {
        double v = rpt_vsync () / (syncbase / 1000.0);
        if (v >= -4)
@@ -4205,10 +4272,8 @@ static void framewait (void)
        sleep_millis (2);
     }
     curr_time = start = read_processor_time();
-    if (!isvsync()) {
-       while (rpt_vsync () < 0);
-       curr_time = read_processor_time ();
-    }
+    while (rpt_vsync () < 0);
+    curr_time = read_processor_time ();
     vsyncmintime = curr_time + vsynctime;
     idletime += read_processor_time() - start;
 }
@@ -4264,7 +4329,7 @@ static void vsync_handler (void)
 {
     fpscounter ();
 
-    if (!isvsync()
+    if (!isvsync ()
 #ifdef AVIOUTPUT
        && ((avioutput_framelimiter && avioutput_enabled) || !avioutput_enabled)
 #endif
@@ -4416,7 +4481,7 @@ static void hsync_handler (void)
 {
     int hpos = current_hpos ();
 
-    if (!nocustom()) {
+    if (!nocustom ()) {
        sync_copper_with_cpu (maxhpos, 0);
        finish_decisions ();
        if (thisline_decision.plfleft != -1) {
@@ -4539,16 +4604,16 @@ static void hsync_handler (void)
     }
 #endif
 
-    if (!nocustom()) {
+    if (!nocustom ()) {
        int lineno = vpos;
        if (bplcon0 & 4)
            notice_interlace_seen ();
 
        nextline_how = nln_normal;
-       if (currprefs.gfx_linedbl && !doublescan) {
+       if (currprefs.gfx_linedbl && (!doublescan || interlace_seen)) {
            lineno *= 2;
            nextline_how = currprefs.gfx_linedbl == 1 ? nln_doubled : nln_nblack;
-           if (bplcon0 & 4) {
+           if (interlace_seen) { /* was bplcon0 & 4 but it fails if single frame has mixed lace and non-lace */
                if (!lof) {
                    lineno++;
                    nextline_how = nln_lower;
@@ -4862,7 +4927,7 @@ void customreset (int hardreset)
                record_color_change (0, i, vv);
                remembered_color_entry = -1;
                current_colors.color_regs_aga[i] = vv;
-               current_colors.acolors[i] = CONVERT_RGB(vv);
+               current_colors.acolors[i] = CONVERT_RGB (vv);
            }
 #endif
        }
@@ -4884,7 +4949,7 @@ void customreset (int hardreset)
     action_replay_reset ();
     #endif
     #if defined(ENFORCER)
-    enforcer_disable();
+    enforcer_disable ();
     #endif
 
     if (hardreset)
@@ -4979,7 +5044,7 @@ static int allocate_sprite_tables (void)
 int custom_init (void)
 {
 
-    if (!allocate_sprite_tables())
+    if (!allocate_sprite_tables ())
        return 0;
 
 #ifdef AUTOCONFIG
@@ -5409,7 +5474,7 @@ void custom_prepare_savestate (void)
     for (i = 0; i < ev2_max; i++) {
        if (eventtab2[i].active) {
            eventtab2[i].active = 0;
-           eventtab2[i].handler(eventtab2[i].data);
+           eventtab2[i].handler (eventtab2[i].data);
        }
     }
 }
diff --git a/disk.c b/disk.c
index 100fdf30b0d4eb00b3ef6cbaf4abb8dd3f8acbba..082a15b543ff49603be6721636eba5abc2ebe24a 100755 (executable)
--- a/disk.c
+++ b/disk.c
@@ -860,7 +860,7 @@ static int drive_insert (drive * drv, struct uae_prefs *p, int dnum, const char
     int num_tracks, size;
 
 #ifdef RETROPLATFORM
-    rp_disk_change (dnum, fname);
+    rp_disk_image_change (dnum, fname);
 #endif
     drive_image_free (drv);
     drv->diskfile = DISK_validate_filename (fname, 1, &drv->wrprot, &drv->crc32);
@@ -1809,7 +1809,7 @@ static void drive_eject (drive * drv)
     driveclick_insert (drv - floppy, 1);
 #endif
 #ifdef RETROPLATFORM
-    rp_disk_change (drv - floppy, NULL);
+    rp_disk_image_change (drv - floppy, NULL);
 #endif
     drive_image_free (drv);
     drv->dskchange = 1;
@@ -2101,6 +2101,9 @@ void DISK_check_change (void)
        if (currprefs.dfxtype[i] != changed_prefs.dfxtype[i]) {
            currprefs.dfxtype[i] = changed_prefs.dfxtype[i];
            reset_drive (i);
+#ifdef RETROPLATFORM
+           rp_floppydrive_change (i, currprefs.dfxtype[i] >= 0 ? 1 : 0);
+#endif
        }
        if (drv->dskchange_time == 0 && strcmp (currprefs.df[i], changed_prefs.df[i]))
            disk_insert (i, changed_prefs.df[i]);
index b2af4fa589ca26d277a2b377ba18d2ef961d9634..0e14c87f518d49431b689ea19e8d685c7bc9dff0 100755 (executable)
--- a/drawing.c
+++ b/drawing.c
@@ -1471,19 +1471,19 @@ static void init_aspect_maps (void)
        return;
 
     linedbld = linedbl = currprefs.gfx_linedbl;
-    if (doublescan) {
+    if (doublescan && !interlace_seen) {
        linedbl = 0;
        linedbld = 1;
     }
 
     if (native2amiga_line_map)
-       free (native2amiga_line_map);
+       xfree (native2amiga_line_map);
     if (amiga2aspect_line_map)
-       free (amiga2aspect_line_map);
+       xfree (amiga2aspect_line_map);
 
     /* At least for this array the +1 is necessary. */
-    amiga2aspect_line_map = (int *)malloc (sizeof (int) * (MAXVPOS + 1) * 2 + 1);
-    native2amiga_line_map = (int *)malloc (sizeof (int) * gfxvidinfo.height);
+    amiga2aspect_line_map = malloc (sizeof (int) * (MAXVPOS + 1) * 2 + 1);
+    native2amiga_line_map = malloc (sizeof (int) * gfxvidinfo.height);
 
     if (currprefs.gfx_correct_aspect)
        native_lines_per_amiga_line = ((double)gfxvidinfo.height
@@ -1810,8 +1810,8 @@ static void pfield_draw_line (int lineno, int gfx_ypos, int follow_ypos)
        dp_for_drawing--;
        dip_for_drawing--;
        linestate[lineno] = LINE_DONE_AS_PREVIOUS;
-       if (!dp_for_drawing->valid)
-           return;
+//     if (!dp_for_drawing->valid)
+//         return;
        if (dp_for_drawing->plfleft == -1)
            border = 1;
        break;
@@ -1999,7 +1999,16 @@ static void center_image (void)
            visible_left_border = (max_diwlastword - 48) / 2 - gfxvidinfo.width;
     }
     if (currprefs.gfx_xcenter_pos >= 0) {
-       int val = (currprefs.gfx_xcenter_pos >> RES_MAX) < 56 ? 56 : (currprefs.gfx_xcenter_pos >> RES_MAX);
+       int val = currprefs.gfx_xcenter_pos >> RES_MAX;
+#if 0
+       if (currprefs.gfx_xcenter_size > 0) {
+           int diff = ((gfxvidinfo.width << (RES_MAX - currprefs.gfx_resolution)) - currprefs.gfx_xcenter_size) / 1;
+           write_log ("%d %d\n", currprefs.gfx_xcenter_size, gfxvidinfo.width);
+           val -= diff >> RES_MAX;
+       }
+#endif
+       if (val < 56)
+           val = 56;
        visible_left_border = val + (DIW_DDF_OFFSET << currprefs.gfx_resolution) - (DISPLAY_LEFT_SHIFT * 2 - (DISPLAY_LEFT_SHIFT << currprefs.gfx_resolution));
     }
 
@@ -2034,6 +2043,12 @@ static void center_image (void)
     }
     if (currprefs.gfx_ycenter_pos >= 0) {
        thisframe_y_adjust = currprefs.gfx_ycenter_pos >> 1;
+#if 0
+       if (currprefs.gfx_ycenter_size > 0) {
+           int diff = (currprefs.gfx_ycenter_size - (gfxvidinfo.height << (linedbl ? 0 : 1))) / 2;
+           thisframe_y_adjust += diff >> 1;
+       }
+#endif
        if (thisframe_y_adjust + max_drawn_amiga_line > 2 * maxvpos_max)
            thisframe_y_adjust = 2 * maxvpos_max - max_drawn_amiga_line;
        if (thisframe_y_adjust < 0)
index 84d37c783d678da586c4820f70a06cee558350cb..5383d03df37b8d4a3ef4e0dc903defb3dbdf9717 100755 (executable)
@@ -16,6 +16,7 @@
 #include "audio.h"
 #include "sounddep/sound.h"
 #include "zfile.h"
+#include "fsdb.h"
 #include "events.h"
 #include "driveclick.h"
 
@@ -48,7 +49,7 @@ uae_s16 *decodewav (uae_u8 *s, int *lenp)
        if (!memcmp (s, "data", 4)) {
            s += 4;
            len = s[0] | (s[1] << 8) | (s[2] << 16) | (s[3] << 24);
-           dst = (uae_s16*)xmalloc (len);
+           dst = xmalloc (len);
            memcpy (dst, s + 4, len);
            *lenp = len / 2;
            return dst;
@@ -77,7 +78,7 @@ static int loadsample (char *path, struct drvsample *ds)
     }
     zfile_fseek (f, 0, SEEK_END);
     size = zfile_ftell (f);
-    buf = (uae_u8*)xmalloc (size);
+    buf = xmalloc (size);
     zfile_fseek (f, 0, SEEK_SET);
     zfile_fread (buf, size, 1, f);
     zfile_fclose (f);
@@ -136,7 +137,7 @@ void driveclick_init(void)
     int v, vv, i, j;
     char tmp[MAX_DPATH];
 
-    driveclick_fdrawcmd_detect();
+    driveclick_fdrawcmd_detect ();
     driveclick_free ();
     vv = 0;
     for (i = 0; i < 4; i++) {
@@ -157,30 +158,36 @@ void driveclick_init(void)
                    wave_initialized = 1;
                    break;
                    default:
-                   if (driveclick_fdrawcmd_open(currprefs.dfxclick[i] - 2))
+                   if (driveclick_fdrawcmd_open (currprefs.dfxclick[i] - 2))
                        v = 1;
                    break;
                }
            } else if (currprefs.dfxclick[i] == -1) {
+               char path2[MAX_DPATH];
                wave_initialized = 1;
                for (j = 0; j < CLICK_TRACKS; j++)
                    drvs[i][DS_CLICK].lengths[j] = drvs[i][DS_CLICK].len;
-               sprintf (tmp, "%suae_data%cdrive_click_%s",
-                   start_path_data, FSDB_DIR_SEPARATOR, currprefs.dfxclickexternal[i]);
+               sprintf (tmp, "%splugins%cfloppysounds%c", start_path_data, FSDB_DIR_SEPARATOR, FSDB_DIR_SEPARATOR, FSDB_DIR_SEPARATOR);
+               if (my_existsdir (tmp))
+                   strcpy (path2, tmp);
+               else
+                   sprintf (path2, "%suae_data%c", start_path_data, FSDB_DIR_SEPARATOR);
+               sprintf (tmp, "%sdrive_click_%s",
+                   path2, currprefs.dfxclickexternal[i]);
                v = loadsample (tmp, &drvs[i][DS_CLICK]);
                if (v)
                    processclicks (&drvs[i][DS_CLICK]);
-               sprintf (tmp, "%suae_data%cdrive_spin_%s",
-                   start_path_data, FSDB_DIR_SEPARATOR, currprefs.dfxclickexternal[i]);
+               sprintf (tmp, "%sdrive_spin_%s",
+                   path2, currprefs.dfxclickexternal[i]);
                v += loadsample (tmp, &drvs[i][DS_SPIN]);
-               sprintf (tmp, "%suae_data%cdrive_spinnd_%s",
-                   start_path_data, FSDB_DIR_SEPARATOR, currprefs.dfxclickexternal[i]);
+               sprintf (tmp, "%sdrive_spinnd_%s",
+                   path2, currprefs.dfxclickexternal[i]);
                v += loadsample (tmp, &drvs[i][DS_SPINND]);
-               sprintf (tmp, "%suae_data%cdrive_startup_%s",
-                   start_path_data, FSDB_DIR_SEPARATOR, currprefs.dfxclickexternal[i]);
+               sprintf (tmp, "%sdrive_startup_%s",
+                   path2, currprefs.dfxclickexternal[i]);
                v += loadsample (tmp, &drvs[i][DS_START]);
-               sprintf (tmp, "%suae_data%cdrive_snatch_%s",
-                   start_path_data, FSDB_DIR_SEPARATOR, currprefs.dfxclickexternal[i]);
+               sprintf (tmp, "%sdrive_snatch_%s",
+                   path2, currprefs.dfxclickexternal[i]);
                v += loadsample (tmp, &drvs[i][DS_SNATCH]);
            }
            if (v == 0) {
@@ -208,7 +215,7 @@ void driveclick_reset (void)
     xfree (clickbuffer);
     if (!wave_initialized)
        return;
-    clickbuffer = (uae_s16*)xmalloc (sndbufsize);
+    clickbuffer = xmalloc (sndbufsize);
     sample_step = (freq << DS_SHIFT) / currprefs.sound_freq;
 }
 
@@ -216,8 +223,8 @@ void driveclick_free (void)
 {
     int i, j;
 
-    driveclick_fdrawcmd_close(0);
-    driveclick_fdrawcmd_close(1);
+    driveclick_fdrawcmd_close (0);
+    driveclick_fdrawcmd_close (1);
     for (i = 0; i < 4; i++) {
        for (j = 0; j < DS_END; j++)
            freesample (&drvs[i][j]);
@@ -323,7 +330,7 @@ void driveclick_mix (uae_s16 *sndbuffer, int size)
        return;
     mix();
     clickcnt = 0;
-    if (!get_audio_ismono()) {
+    if (!get_audio_ismono ()) {
        for (i = 0; i < size / 2; i++) {
            uae_s16 s = clickbuffer[i];
            sndbuffer[0] = limit(((sndbuffer[0] + s) * 2) / 3);
@@ -404,7 +411,7 @@ void driveclick_insert (int drive, int eject)
     if (eject)
        drv_has_spun[drive] = 0;
     if (drv_has_disk[drive] == 0 && !eject)
-       dr_audio_activate();
+       dr_audio_activate ();
     drv_has_disk[drive] = !eject;
 }
 
index 0b3f5fc574b8950c55f049d6bf7ff483f8e7d0a1..fd7049927333d24fc55e0b9020482f09c02eb6f8 100755 (executable)
@@ -1088,7 +1088,6 @@ static void allocate_expamem (void)
 
 static uaecptr check_boot_rom (void)
 {
-    int i;
     uaecptr b = RTAREA_DEFAULT;
     addrbank *ab;
 
@@ -1099,11 +1098,8 @@ static uaecptr check_boot_rom (void)
        if (valid_address (RTAREA_DEFAULT, 65536))
            b = RTAREA_BACKUP;
     }
-    for (i = 0; i < currprefs.mountitems; i++) {
-       struct uaedev_config_info *uci = &currprefs.mountconfig[i];
-       if (uci->controller == 0)
-           return b;
-    }
+    if (nr_directory_units ())
+        return b;
     if (currprefs.socket_emu)
        return b;
     if (currprefs.uaeserial)
@@ -1394,7 +1390,9 @@ uae_u8 *restore_expansion (uae_u8 *src)
     fastmem_start = restore_u32 ();
     z3fastmem_start = restore_u32 ();
     gfxmem_start = restore_u32 ();
-    restore_u32();
+    rtarea_base = restore_u32 ();
+    if (rtarea_base != 0 && rtarea_base != RTAREA_DEFAULT && rtarea_base != RTAREA_BACKUP)
+       rtarea_base = 0;
     return src;
 }
 
index c87262207961efb690f620a5fc10b4c54efc29df..203d73028a8daf38338e7d6231bef1db106729ad 100755 (executable)
--- a/filesys.c
+++ b/filesys.c
@@ -155,6 +155,16 @@ int nr_units (void)
     return cnt;
 }
 
+int nr_directory_units (void)
+{
+    int i, cnt = 0;
+    for (i = 0; i < MAX_FILESYSTEM_UNITS; i++) {
+       if (mountinfo.ui[i].open && mountinfo.ui[i].controller == 0)
+           cnt++;
+    }
+    return cnt;
+}
+
 int is_hardfile (int unit_no)
 {
     if (mountinfo.ui[unit_no].volname || mountinfo.ui[unit_no].wasisempty)
@@ -594,13 +604,13 @@ void free_mountinfo (void)
     int i;
     for (i = 0; i < MAX_FILESYSTEM_UNITS; i++)
        close_filesys_unit (mountinfo.ui + i);
-    gayle_free_units();
+    gayle_free_units ();
 }
 
 struct hardfiledata *get_hardfile_data (int nr)
 {
     UnitInfo *uip = mountinfo.ui;
-    if (nr < 0 || nr >= MAX_FILESYSTEM_UNITS || uip[nr].open == 0 || is_hardfile(nr) == FILESYS_VIRTUAL)
+    if (nr < 0 || nr >= MAX_FILESYSTEM_UNITS || uip[nr].open == 0 || is_hardfile (nr) == FILESYS_VIRTUAL)
        return 0;
     return &uip[nr].hf;
 }
@@ -880,23 +890,23 @@ static void *fs_open (Unit *unit, const char *name, int flags)
 {
     int isarch = unit->volflags & MYVOLUMEINFO_ARCHIVE;
     if (isarch)
-       return zfile_open_archive(name, flags);
+       return zfile_open_archive (name, flags);
     else
-       return my_open(name, flags);
+       return my_open (name, flags);
 }
 static void fs_close(Unit *unit, void *fd)
 {
     int isarch = unit->volflags & MYVOLUMEINFO_ARCHIVE;
     if (isarch)
-       zfile_close_archive(fd);
+       zfile_close_archive (fd);
     else
-       my_close(fd);
+       my_close (fd);
 }
 static unsigned int fs_read (Unit *unit, void *d, void *b, unsigned int size)
 {
     int isarch = unit->volflags & MYVOLUMEINFO_ARCHIVE;
     if (isarch)
-       return zfile_read_archive(d, b, size);
+       return zfile_read_archive (d, b, size);
     else
        return my_read (d, b, size);
 }
@@ -904,12 +914,12 @@ static unsigned int fs_lseek (Unit *unit, void *d, unsigned int offset, int when
 {
     int isarch = unit->volflags & MYVOLUMEINFO_ARCHIVE;
     if (isarch)
-       return zfile_lseek_archive(d, offset, whence);
+       return zfile_lseek_archive (d, offset, whence);
     else
        return my_lseek (d, offset, whence);
 }
 
-static void set_volume_name(Unit *unit)
+static void set_volume_name (Unit *unit)
 {
     int namelen;
     int i;
@@ -969,15 +979,15 @@ int filesys_eject (int nr)
        return 0;
     if (!ui->open || u == NULL)
        return 0;
-    if (is_hardfile(nr) != FILESYS_VIRTUAL)
+    if (is_hardfile (nr) != FILESYS_VIRTUAL)
        return 0;
-    if (!filesys_isvolume(u))
+    if (!filesys_isvolume (u))
        return 0;
     zfile_fclose_archive (u->zarchive);
     u->zarchive = NULL;
     u->mountcount++;
     write_log ("FILESYS: removed volume '%s'\n", u->ui.volname);
-    flush_cache(u, -1);
+    flush_cache (u, -1);
     put_byte (u->volume + 172 - 32, -2);
     uae_Signal(get_long(u->volume + 176 - 32), 1 << 17);
     return 1;
@@ -1854,7 +1864,7 @@ static uae_u32 notifyhash (char *s)
 
 static Notify *new_notify (Unit *unit, char *name)
 {
-    Notify *n = (Notify*)xmalloc(sizeof(Notify));
+    Notify *n = (Notify*)xmalloc (sizeof(Notify));
     uae_u32 hash = notifyhash (name);
     n->next = unit->notifyhash[hash];
     unit->notifyhash[hash] = n;
@@ -1862,11 +1872,11 @@ static Notify *new_notify (Unit *unit, char *name)
     return n;
 }
 
-static void free_notify_item(Notify *n)
+static void free_notify_item (Notify *n)
 {
-    xfree(n->fullname);
-    xfree(n->partname);
-    xfree(n);
+    xfree (n->fullname);
+    xfree (n->partname);
+    xfree (n);
 }
 
 static void free_notify (Unit *unit, int hash, Notify *n)
@@ -1925,7 +1935,7 @@ static Unit *startup_create_unit (UnitInfo *uinfo, int num)
     unit->cmds_complete = 0;
     unit->cmds_sent = 0;
     unit->cmds_acked = 0;
-    clear_exkeys(unit);
+    clear_exkeys (unit);
     unit->total_locked_ainos = 0;
     unit->keys = 0;
     for (i = 0; i < NOTIFY_HASH_SIZE; i++) {
@@ -1933,9 +1943,9 @@ static Unit *startup_create_unit (UnitInfo *uinfo, int num)
        while (n) {
            Notify *n2 = n;
            n = n->next;
-           xfree(n2->fullname);
-           xfree(n2->partname);
-           xfree(n2);
+           xfree (n2->fullname);
+           xfree (n2->partname);
+           xfree (n2);
        }
        unit->notifyhash[i] = 0;
     }
@@ -2072,7 +2082,7 @@ static uae_u32 REGPARAM2 startup_handler (TrapContext *context)
 
     put_byte (unit->volume + 44, 0);
     if (!uinfo->wasisempty) {
-       set_volume_name(unit);
+       set_volume_name (unit);
        fsdb_clean_dir (&unit->rootnode);
     }
 
@@ -2168,7 +2178,7 @@ static Key *lookup_key (Unit *unit, uae_u32 uniq)
 
 static Key *new_key (Unit *unit)
 {
-    Key *k = (Key *) xmalloc(sizeof(Key));
+    Key *k = (Key *) xmalloc (sizeof(Key));
     k->uniq = ++key_uniq;
     k->fd = NULL;
     k->file_pos = 0;
@@ -2321,12 +2331,12 @@ action_add_notify (Unit *unit, dpacket packet)
     write_log ("Notify:\n");
     write_log ("nr_Name '%s'\n", char1 (get_long (nr + 0)));
     write_log ("nr_FullName '%s'\n", name);
-    write_log ("nr_UserData %08.8X\n", get_long (nr + 8));
-    write_log ("nr_Flags %08.8X\n", flags);
+    write_log ("nr_UserData %08X\n", get_long (nr + 8));
+    write_log ("nr_Flags %08X\n", flags);
     if (flags & NRF_SEND_MESSAGE) {
-       write_log ("Message NotifyRequest, port = %08.8X\n", get_long (nr + 16));
+       write_log ("Message NotifyRequest, port = %08X\n", get_long (nr + 16));
     } else if (flags & NRF_SEND_SIGNAL) {
-       write_log ("Signal NotifyRequest, Task = %08.8X signal = %d\n", get_long (nr + 16), get_long (nr + 20));
+       write_log ("Signal NotifyRequest, Task = %08X signal = %d\n", get_long (nr + 16), get_long (nr + 20));
     } else {
        write_log ("corrupt NotifyRequest\n");
     }
@@ -2359,7 +2369,7 @@ action_remove_notify (Unit *unit, dpacket packet)
     for (hash = 0; hash < NOTIFY_HASH_SIZE; hash++) {
        for (n = unit->notifyhash[hash]; n; n = n->next) {
            if (n->notifyrequest == nr) {
-               //write_log ("NotifyRequest %08.8X freed\n", n->notifyrequest);
+               //write_log ("NotifyRequest %08X freed\n", n->notifyrequest);
                xfree (n->fullname);
                xfree (n->partname);
                free_notify (unit, hash, n);
@@ -2368,7 +2378,7 @@ action_remove_notify (Unit *unit, dpacket packet)
            }
        }
     }
-    //write_log ("Tried to free non-existing NotifyRequest %08.8X\n", nr);
+    //write_log ("Tried to free non-existing NotifyRequest %08X\n", nr);
     PUT_PCK_RES1 (packet, DOS_TRUE);
 }
 
@@ -2869,7 +2879,7 @@ static int action_examine_all_do (Unit *unit, uaecptr lock, ExAllKey *eak, uaecp
         if (!eak->fn) {
            do {
                if (isarch)
-                   ok = zfile_readdir_archive(d, fn);
+                   ok = zfile_readdir_archive (d, fn);
                else
                    ok = my_readdir (d, fn);
            } while (ok && !isarch && fsdb_name_invalid (fn));
@@ -3371,7 +3381,7 @@ action_fh_from_lock (Unit *unit, dpacket packet)
 
     if (fd == NULL) {
        PUT_PCK_RES1 (packet, DOS_FALSE);
-       PUT_PCK_RES2 (packet, dos_errno());
+       PUT_PCK_RES2 (packet, dos_errno ());
        return;
     }
     k = new_key (unit);
@@ -3391,7 +3401,7 @@ action_fh_from_lock (Unit *unit, dpacket packet)
 static void
 action_find_input (Unit *unit, dpacket packet)
 {
-    do_find(unit, packet, A_FIBF_READ|A_FIBF_WRITE, 0, 1);
+    do_find (unit, packet, A_FIBF_READ | A_FIBF_WRITE, 0, 1);
 }
 
 static void
@@ -3402,7 +3412,7 @@ action_find_output (Unit *unit, dpacket packet)
        PUT_PCK_RES2 (packet, ERROR_DISK_WRITE_PROTECTED);
        return;
     }
-    do_find(unit, packet, A_FIBF_READ|A_FIBF_WRITE, 2, 0);
+    do_find (unit, packet, A_FIBF_READ | A_FIBF_WRITE, 2, 0);
 }
 
 static void
@@ -3413,7 +3423,7 @@ action_find_write (Unit *unit, dpacket packet)
        PUT_PCK_RES2 (packet, ERROR_DISK_WRITE_PROTECTED);
        return;
     }
-    do_find(unit, packet, A_FIBF_READ|A_FIBF_WRITE, 1, 0);
+    do_find (unit, packet, A_FIBF_READ | A_FIBF_WRITE, 1, 0);
 }
 
 /* change file/dir's parent dir modification time */
@@ -3429,7 +3439,7 @@ static void updatedirtime (a_inode *a1, int now)
        if (stat (a1->nname, &statbuf) == -1)
            return;
        get_time (statbuf.st_mtime, &days, &mins, &ticks);
-       ut.actime = ut.modtime = put_time(days, mins, ticks);
+       ut.actime = ut.modtime = put_time (days, mins, ticks);
        utime (a1->parent->nname, &ut);
     } else {
        utime (a1->parent->nname, NULL);
@@ -3472,7 +3482,7 @@ action_read (Unit *unit, dpacket packet)
        /* PUT_PCK_RES2 (packet, EINVAL); */
        return;
     }
-    TRACE(("ACTION_READ(%s,0x%lx,%ld)\n",k->aino->nname,addr,size));
+    TRACE(("ACTION_READ(%s,0x%lx,%ld)\n", k->aino->nname, addr, size));
     gui_hd_led (unit->unit, 1);
 #ifdef RELY_ON_LOADSEG_DETECTION
     /* HACK HACK HACK HACK
@@ -3496,7 +3506,7 @@ action_read (Unit *unit, dpacket packet)
            PUT_PCK_RES2 (packet, 0);
        } else if (actual < 0) {
            PUT_PCK_RES1 (packet, 0);
-           PUT_PCK_RES2 (packet, dos_errno());
+           PUT_PCK_RES2 (packet, dos_errno ());
        } else {
            PUT_PCK_RES1 (packet, actual);
            k->file_pos += actual;
@@ -3524,7 +3534,7 @@ action_read (Unit *unit, dpacket packet)
 
        if (actual < 0) {
            PUT_PCK_RES1 (packet, 0);
-           PUT_PCK_RES2 (packet, dos_errno());
+           PUT_PCK_RES2 (packet, dos_errno ());
        } else {
            int i;
            PUT_PCK_RES1 (packet, actual);
@@ -3554,7 +3564,7 @@ action_write (Unit *unit, dpacket packet)
     }
 
     gui_hd_led (unit->unit, 2);
-    TRACE(("ACTION_WRITE(%s,0x%lx,%ld)\n",k->aino->nname,addr,size));
+    TRACE(("ACTION_WRITE(%s,0x%lx,%ld)\n", k->aino->nname, addr, size));
 
     if (unit->ui.readonly) {
        PUT_PCK_RES1 (packet, DOS_FALSE);
@@ -3630,7 +3640,7 @@ action_seek (Unit *unit, dpacket packet)
            temppos = filesize + pos;
        if (filesize < temppos) {
            res = -1;
-           PUT_PCK_RES1 (packet,res);
+           PUT_PCK_RES1 (packet, res);
            PUT_PCK_RES2 (packet, ERROR_SEEK_ERROR);
            return;
        }
@@ -3741,7 +3751,7 @@ action_same_lock (Unit *unit, dpacket packet)
     uaecptr lock1 = GET_PCK_ARG1 (packet) << 2;
     uaecptr lock2 = GET_PCK_ARG2 (packet) << 2;
 
-    TRACE(("ACTION_SAME_LOCK(0x%lx,0x%lx)\n",lock1,lock2));
+    TRACE(("ACTION_SAME_LOCK(0x%lx,0x%lx)\n", lock1, lock2));
     DUMPLOCK(unit, lock1); DUMPLOCK(unit, lock2);
 
     if (!lock1 || !lock2) {
@@ -3766,7 +3776,7 @@ action_change_mode (Unit *unit, dpacket packet)
     unsigned long uniq;
     a_inode *a = NULL, *olda = NULL;
     uae_u32 err = 0;
-    TRACE(("ACTION_CHANGE_MODE(0x%lx,%d,%d)\n",object,type,mode));
+    TRACE(("ACTION_CHANGE_MODE(0x%lx,%d,%d)\n", object, type,mode));
 
     if (! object
        || (type != CHANGE_FH && type != CHANGE_LOCK))
@@ -3911,7 +3921,7 @@ action_create_dir (Unit *unit, dpacket packet)
 
     if (my_mkdir (aino->nname) == -1) {
        PUT_PCK_RES1 (packet, DOS_FALSE);
-       PUT_PCK_RES2 (packet, dos_errno());
+       PUT_PCK_RES2 (packet, dos_errno ());
        return;
     }
     aino->shlock = 1;
@@ -4089,13 +4099,13 @@ action_delete_object (Unit *unit, dpacket packet)
        fsdb_dir_writeback (a);
        if (my_rmdir (a->nname) == -1) {
            PUT_PCK_RES1 (packet, DOS_FALSE);
-           PUT_PCK_RES2 (packet, dos_errno());
+           PUT_PCK_RES2 (packet, dos_errno ());
            return;
        }
     } else {
        if (my_unlink (a->nname) == -1) {
            PUT_PCK_RES1 (packet, DOS_FALSE);
-           PUT_PCK_RES2 (packet, dos_errno());
+           PUT_PCK_RES2 (packet, dos_errno ());
            return;
        }
     }
@@ -4670,8 +4680,8 @@ static void init_filesys_diagentry (void)
     do_put_mem_long ((uae_u32 *)(filesysory + 0x2100), EXPANSION_explibname);
     do_put_mem_long ((uae_u32 *)(filesysory + 0x2104), filesys_configdev);
     do_put_mem_long ((uae_u32 *)(filesysory + 0x2108), EXPANSION_doslibname);
-    do_put_mem_long ((uae_u32 *)(filesysory + 0x210c), nr_units());
-    native2amiga_startup();
+    do_put_mem_long ((uae_u32 *)(filesysory + 0x210c), nr_units ());
+    native2amiga_startup ();
 }
 
 void filesys_start_threads (void)
@@ -4689,7 +4699,7 @@ void filesys_start_threads (void)
 
 void filesys_cleanup (void)
 {
-    filesys_free_handles();
+    filesys_free_handles ();
     free_mountinfo ();
 }
 
@@ -4703,11 +4713,11 @@ void filesys_free_handles(void)
            knext = k1->next;
            if (k1->fd)
                fs_close (u, k1->fd);
-           xfree(k1);
+           xfree (k1);
        }
        u->keys = NULL;
-       xfree(u->newrootdir);
-       xfree(u->newvolume);
+       xfree (u->newrootdir);
+       xfree (u->newvolume);
        u->newrootdir = NULL;
        u->newvolume = NULL;
     }
@@ -4722,7 +4732,7 @@ void filesys_reset (void)
     if (savestate_state == STATE_RESTORE)
        return;
 
-    filesys_free_handles();
+    filesys_free_handles ();
     for (u = units; u; u = u1) {
        u1 = u->next;
        xfree (u);
@@ -4731,7 +4741,7 @@ void filesys_reset (void)
     key_uniq = 0;
     a_uniq = 0;
     free_mountinfo ();
-    initialize_mountinfo();
+    initialize_mountinfo ();
 }
 
 void filesys_prepare_reset (void)
@@ -5020,12 +5030,12 @@ static char *device_dupfix (uaecptr expbase, char *devname)
 static void dump_partinfo (char *name, int num, uaecptr pp, int partblock)
 {
     uae_u32 dostype = get_long (pp + 80);
-    write_log ("RDB: '%s' dostype=%08.8X. PartBlock=%d\n", name, dostype, partblock);
+    write_log ("RDB: '%s' dostype=%08X. PartBlock=%d\n", name, dostype, partblock);
     write_log ("BlockSize: %d, Surfaces: %d, SectorsPerBlock %d\n",
               get_long (pp + 20) * 4, get_long (pp + 28), get_long (pp + 32));
     write_log ("SectorsPerTrack: %d, Reserved: %d, LowCyl %d, HighCyl %d\n",
               get_long (pp + 36), get_long (pp + 40), get_long (pp + 52), get_long (pp + 56));
-    write_log ("Buffers: %d, BufMemType: %08.8x, MaxTransfer: %08.8x, BootPri: %d\n",
+    write_log ("Buffers: %d, BufMemType: %08x, MaxTransfer: %08x, BootPri: %d\n",
               get_long (pp + 60), get_long (pp + 64), get_long (pp + 68), get_long (pp + 76));
 }
 
@@ -5184,7 +5194,7 @@ static int rdb_mount (UnitInfo *uip, int unit_no, int partnum, uaecptr parmpacke
     for (;;) {
        if (fileblock == -1) {
            if (!fsnode)
-               write_log ("RDB: required FS %08.8X not in FileSystem.resource or in RDB\n", dostype);
+               write_log ("RDB: required FS %08X not in FileSystem.resource or in RDB\n", dostype);
            goto error;
        }
        if (!legalrdbblock (uip, fileblock)) {
@@ -5204,9 +5214,9 @@ static int rdb_mount (UnitInfo *uip, int unit_no, int partnum, uaecptr parmpacke
     newversion = (buf[36] << 8) | buf[37];
     newrevision = (buf[38] << 8) | buf[39];
 
-    write_log ("RDB: RDB filesystem %08.8X version %d.%d\n", dostype, newversion, newrevision);
+    write_log ("RDB: RDB filesystem %08X version %d.%d\n", dostype, newversion, newrevision);
     if (fsnode) {
-       write_log ("RDB: %08.8X in FileSystem.resouce version %d.%d\n", dostype, oldversion, oldrevision);
+       write_log ("RDB: %08X in FileSystem.resouce version %d.%d\n", dostype, oldversion, oldrevision);
     }
     if (newversion * 65536 + newrevision <= oldversion * 65536 + oldrevision && oldversion >= 0) {
        write_log ("RDB: FS in FileSystem.resource is newer or same, ignoring RDB filesystem\n");
@@ -5296,12 +5306,12 @@ static int dofakefilesys (UnitInfo *uip, uaecptr parmpacket)
        strcpy (tmp + i, "FastFileSystem");
     }
     if (tmp[0] == 0) {
-       write_log ("RDB: no filesystem for dostype 0x%08.8X\n", dostype);
+       write_log ("RDB: no filesystem for dostype 0x%08X\n", dostype);
        if ((dostype & 0xffffff00) == 0x444f5300)
            return FILESYS_HARDFILE;
        return -1;
     }
-    write_log ("RDB: fakefilesys, trying to load '%s', dostype 0x%08.8X\n", tmp, dostype);
+    write_log ("RDB: fakefilesys, trying to load '%s', dostype 0x%08X\n", tmp, dostype);
     zf = zfile_fopen (tmp,"rb");
     if (!zf) {
        write_log ("RDB: filesys not found\n");
@@ -5321,7 +5331,7 @@ static int dofakefilesys (UnitInfo *uip, uaecptr parmpacket)
     uip->rdb_filesyssize = size;
     put_long (parmpacket + PP_FSSIZE, uip->rdb_filesyssize);
     addfakefilesys (parmpacket, dostype);
-    write_log ("HDF: faked RDB filesystem %08.8X loaded\n", dostype);
+    write_log ("HDF: faked RDB filesystem %08X loaded\n", dostype);
     return FILESYS_HARDFILE;
 }
 
@@ -5344,7 +5354,7 @@ static void get_new_device (int type, uaecptr parmpacket, char **devname, uaecpt
     if (type == FILESYS_VIRTUAL)
        write_log ("FS: mounted virtual unit %s (%s)\n", buffer, mountinfo.ui[unit_no].rootdir);
     else
-       write_log ("FS: mounted HDF unit %s (%04.4x-%08.8x, %s)\n", buffer,
+       write_log ("FS: mounted HDF unit %s (%04x-%08x, %s)\n", buffer,
            (uae_u32)(mountinfo.ui[unit_no].hf.size >> 32),
            (uae_u32)(mountinfo.ui[unit_no].hf.size),
            mountinfo.ui[unit_no].rootdir);
@@ -5797,15 +5807,15 @@ static uae_u8 *restore_notify(UnitInfo *ui, Unit *u, uae_u8 *src)
     hash = notifyhash (n->fullname);
     n->next = u->notifyhash[hash];
     u->notifyhash[hash] = n;
-    write_log ("FS: notify %08.8X '%s' '%s'\n", n->notifyrequest, n->fullname, n->partname);
+    write_log ("FS: notify %08X '%s' '%s'\n", n->notifyrequest, n->fullname, n->partname);
     return src;
 }
 
-static uae_u8 *restore_exkey(UnitInfo *ui, Unit *u, uae_u8 *src)
+static uae_u8 *restore_exkey (UnitInfo *ui, Unit *u, uae_u8 *src)
 {
-    restore_u64();
-    restore_u64();
-    restore_u64();
+    restore_u64 ();
+    restore_u64 ();
+    restore_u64 ();
     return src;
 }
 
@@ -5856,9 +5866,9 @@ static char *getfullaname(a_inode *a)
 
     p = (char*)xcalloc (2000, 1);
     while (a) {
-       int len = strlen(a->aname);
-       memmove (p + len + 1, p, strlen(p) + 1);
-       memcpy (p, a->aname, strlen(a->aname));
+       int len = strlen (a->aname);
+       memmove (p + len + 1, p, strlen (p) + 1);
+       memcpy (p, a->aname, strlen (a->aname));
        if (!first)
            p[len] = '/';
        first = 0;
@@ -5917,14 +5927,14 @@ static uae_u8 *save_key(uae_u8 *dst, Key *k)
     save_u32 (k->file_pos);
     save_u32 (k->createmode);
     save_u32 (k->dosmode);
-    size = my_lseek(k->fd, 0, SEEK_END);
+    size = my_lseek (k->fd, 0, SEEK_END);
     save_u32 (size);
     save_u64 (k->aino->uniq);
-    my_lseek(k->fd, k->file_pos, SEEK_SET);
+    my_lseek (k->fd, k->file_pos, SEEK_SET);
     save_string (fn);
     write_log ("'%s' uniq=%d size=%d seekpos=%d mode=%d dosmode=%d\n",
        fn, k->uniq, size, k->file_pos, k->createmode, k->dosmode);
-    xfree(fn);
+    xfree (fn);
     return dst;
 }
 
@@ -5933,18 +5943,18 @@ static uae_u8 *save_notify (UnitInfo *ui, uae_u8 *dst, Notify *n)
     char *s;
     save_u32(n->notifyrequest);
     s = n->fullname;
-    if (strlen(s) >= strlen(ui->volname) && !memcmp(n->fullname, ui->volname, strlen(ui->volname)))
-       s = n->fullname + strlen(ui->volname) + 1;
-    save_string(s);
-    write_log ("FS: notify %08.8X '%s'\n", n->notifyrequest, n->fullname);
+    if (strlen (s) >= strlen (ui->volname) && !memcmp (n->fullname, ui->volname, strlen (ui->volname)))
+       s = n->fullname + strlen (ui->volname) + 1;
+    save_string (s);
+    write_log ("FS: notify %08X '%s'\n", n->notifyrequest, n->fullname);
     return dst;
 }
 
 static uae_u8 *save_exkey (uae_u8 *dst, ExamineKey *ek)
 {
-    save_u64(ek->uniq);
-    save_u64(ek->aino->uniq);
-    save_u64(ek->curr_file->uniq);
+    save_u64 (ek->uniq);
+    save_u64 (ek->aino->uniq);
+    save_u64 (ek->curr_file->uniq);
     return dst;
 }
 
@@ -6087,8 +6097,11 @@ uae_u8 *restore_filesys (uae_u8 *src)
     ui = &mountinfo.ui[devno];
     ui->startup = restore_u32 ();
     filesys_configdev = restore_u32 ();
-    if (type == FILESYS_HARDFILE || type == FILESYS_HARDFILE_RDB)
-       src = restore_filesys_hardfile(ui, src);
+    if (type == FILESYS_HARDFILE || type == FILESYS_HARDFILE_RDB) {
+       src = restore_filesys_hardfile (ui, src);
+       xfree (volname);
+       volname = NULL;
+    }
     if (set_filesys_unit (devno, devname, volname, rootdir, readonly,
        ui->hf.secspertrack, ui->hf.surfaces, ui->hf.reservedblocks, ui->hf.blocksize,
        bootpri, 0, 1, filesysdir[0] ? filesysdir : NULL, 0, 0) < 0) {
@@ -6097,6 +6110,7 @@ uae_u8 *restore_filesys (uae_u8 *src)
     }
     if (type == FILESYS_VIRTUAL)
        src = restore_filesys_virtual (ui, src, devno);
+    write_log ("'%s' restored\n", rootdir);
 end:
     xfree (rootdir);
     xfree (devname);
@@ -6105,9 +6119,9 @@ end:
     return src;
 }
 
-int save_filesys_cando(void)
+int save_filesys_cando (void)
 {
-    if (nr_units() == 0)
+    if (nr_units () == 0)
        return -1;
     return filesys_in_interrupt ? 0 : 1;
 }
diff --git a/gayle.c b/gayle.c
index b35a1f726ea5edbcd991136e10f23d4acec05280..116da4ffde1b48d426ad5bef8d8f293e5f1c1bc7 100755 (executable)
--- a/gayle.c
+++ b/gayle.c
@@ -1746,6 +1746,7 @@ static void alloc_ide_mem (void)
     }
 }
 
+#if 0
 #include "zfile.h"
 static void dumphdf (struct hardfiledata *hfd)
 {
@@ -1763,6 +1764,7 @@ static void dumphdf (struct hardfiledata *hfd)
     }
     zfile_fclose (zf);
 }
+#endif
 
 int gayle_add_ide_unit (int ch, char *path, int blocksize, int readonly,
                       char *devname, int sectors, int surfaces, int reserved,
@@ -1782,7 +1784,7 @@ int gayle_add_ide_unit (int ch, char *path, int blocksize, int readonly,
     ide->status = 0;
     ide->data_offset = 0;
     ide->data_size = 0;
-    dumphdf (&ide->hdhfd.hfd);
+    //dumphdf (&ide->hdhfd.hfd);
     return 1;
 }
 
index f5f136230d72dbedbd265669529928895312c748..693d46267d9bae8abfa3c2007e43ca4c080d5e69 100755 (executable)
@@ -277,26 +277,26 @@ static void create_virtual_rdb (struct hardfiledata *hfd, uae_u32 dostype, int b
     pl(denv, 14, 0x7ffffffe);
     pl(denv, 15, bootpri);
     pl(denv, 16, dostype);
-    rdb_crc(part);
+    rdb_crc (part);
 
     hfd->size += size;
     hfd->size2 += size;
 
 }
 
-void hdf_hd_close(struct hd_hardfiledata *hfd)
+void hdf_hd_close (struct hd_hardfiledata *hfd)
 {
     if (!hfd)
        return;
-    hdf_close(&hfd->hfd);
-    xfree(hfd->path);
+    hdf_close (&hfd->hfd);
+    xfree (hfd->path);
 }
 
 int hdf_hd_open (struct hd_hardfiledata *hfd, const char *path, int blocksize, int readonly,
                       const char *devname, int sectors, int surfaces, int reserved,
                       int bootpri, const char *filesys)
 {
-    memset(hfd, 0, sizeof (struct hd_hardfiledata));
+    memset (hfd, 0, sizeof (struct hd_hardfiledata));
     hfd->bootpri = bootpri;
     hfd->hfd.blocksize = blocksize;
     if (!hdf_open (&hfd->hfd, path))
@@ -313,8 +313,8 @@ int hdf_hd_open (struct hd_hardfiledata *hfd, const char *path, int blocksize, i
     hfd->heads_def = hfd->heads;
     if (hfd->hfd.heads && hfd->hfd.secspertrack) {
        uae_u8 buf[512] = { 0 };
-       hdf_read(&hfd->hfd, buf, 0, 512);
-       if (buf[0] != 0 && memcmp(buf, "RDSK", 4)) {
+       hdf_read (&hfd->hfd, buf, 0, 512);
+       if (buf[0] != 0 && memcmp (buf, "RDSK", 4)) {
            hfd->hfd.nrcyls = (hfd->hfd.size / blocksize) / (sectors * surfaces);
            create_virtual_rdb (&hfd->hfd, rl (buf), hfd->bootpri, filesys);
            while (hfd->hfd.nrcyls * surfaces * sectors > hfd->cyls_def * hfd->secspertrack_def * hfd->heads_def) {
@@ -1093,7 +1093,7 @@ static uae_u32 REGPARAM2 hardfile_abortio (TrapContext *context)
     struct hardfileprivdata *hfpd = &hardfpd[unit];
 
     hf_log2 ("uaehf.device abortio ");
-    start_thread(context, unit);
+    start_thread (context, unit);
     if (!hfd || !hfpd || !hfpd->thread_running) {
        put_byte (request + 31, 32);
        hf_log2 ("error\n");
@@ -1140,7 +1140,7 @@ static uae_u32 REGPARAM2 hardfile_beginio (TrapContext *context)
     struct hardfileprivdata *hfpd = &hardfpd[unit];
 
     put_byte (request + 8, NT_MESSAGE);
-    start_thread(context, unit);
+    start_thread (context, unit);
     if (!hfd || !hfpd || !hfpd->thread_running) {
        put_byte (request + 31, 32);
        return get_byte (request + 31);
@@ -1193,7 +1193,7 @@ void hardfile_reset (void)
 
     for (i = 0; i < MAX_FILESYSTEM_UNITS; i++) {
         hfpd = &hardfpd[i];
-       if (hfpd->base && valid_address(hfpd->base, 36) && get_word (hfpd->base + 32) > 0) {
+       if (hfpd->base && valid_address (hfpd->base, 36) && get_word (hfpd->base + 32) > 0) {
            for (j = 0; j < MAX_ASYNC_REQUESTS; j++) {
                uaecptr request;
                if ((request = hfpd->d_request[i]))
index 9c6f9cf5833211f2e0a67f3737dc1ac368d58f3b..753de894d9d064b991b5969872a79f6948b6b68d 100755 (executable)
@@ -42,6 +42,7 @@ extern uaecptr filesys_initcode;
 
 extern int is_hardfile (int unit_no);
 extern int nr_units (void);
+extern int nr_directory_units (void);
 extern uaecptr need_uae_boot_rom (void);
 
 struct mountedinfo
index b8bbaa6bb7614e9ea7163a547d2b799fb27c1b5d..88fe6b5548bfebe9d366fa08d5842609b3628fa9 100755 (executable)
@@ -221,7 +221,7 @@ struct decision {
     uae_u8 bplres;
     unsigned int ham_seen:1;
     unsigned int ham_at_start:1;
-    unsigned int valid:1;
+//    unsigned int valid:1;
 };
 
 /* Anything related to changes in hw registers during the DDF for one
index d37fc91488019dadf18d612252be57d49aebdf0b..ce1bfd7903698a942a3c0faf6b0f2c4e6b58ad7c 100755 (executable)
@@ -59,7 +59,7 @@ extern void hq4x_32(unsigned char*, unsigned char*, DWORD, DWORD, DWORD);
 
 struct uae_filter
 {
-    int type, yuv;
+    int type, yuv, intmul;
     char *name, *cfgname;
     int x[6];
 };
index 4f88b6f0e158ccc22b0bffcd5049838d5d6c9893..60dc8f9f0efeeb665819adba092ea7c0b48983eb 100755 (executable)
@@ -60,6 +60,7 @@ extern void inputdevice_config_change (void);
 extern int inputdevice_config_change_test (void);
 extern int inputdevice_get_device_index (int devnum);
 extern char *inputdevice_get_device_name (int type, int devnum);
+extern char *inputdevice_get_device_unique_name (int type, int devnum);
 extern int inputdevice_get_device_status (int devnum);
 extern void inputdevice_set_device_status (int devnum, int enabled);
 extern int inputdevice_get_device_total (int type);
@@ -146,12 +147,14 @@ extern void inputdevice_handle_inputcode (void);
 #define JSEM_JOYS 100
 #define JSEM_MICE 200
 #define JSEM_END 300
+#define JSEM_XARCADE1LAYOUT (JSEM_KBDLAYOUT + 3)
+#define JSEM_XARCADE2LAYOUT (JSEM_KBDLAYOUT + 4)
 #define JSEM_DECODEVAL(port,p) ((p)->jports[port].id)
 #define JSEM_ISNUMPAD(port,p) (jsem_iskbdjoy(port,p) == JSEM_KBDLAYOUT)
 #define JSEM_ISCURSOR(port,p) (jsem_iskbdjoy(port,p) == JSEM_KBDLAYOUT + 1)
 #define JSEM_ISSOMEWHEREELSE(port,p) (jsem_iskbdjoy(port,p) == JSEM_KBDLAYOUT + 2)
-#define JSEM_ISXARCADE1(port,p) (jsem_iskbdjoy(port,p) == JSEM_KBDLAYOUT + 3)
-#define JSEM_ISXARCADE2(port,p) (jsem_iskbdjoy(port,p) == JSEM_KBDLAYOUT + 4)
+#define JSEM_ISXARCADE1(port,p) (jsem_iskbdjoy(port,p) == JSEM_XARCADE1LAYOUT)
+#define JSEM_ISXARCADE2(port,p) (jsem_iskbdjoy(port,p) == JSEM_XARCADE2LAYOUT)
 #define JSEM_LASTKBD 5
 #define JSEM_ISANYKBD(port,p) (jsem_iskbdjoy(port,p) >= JSEM_KBDLAYOUT && jsem_iskbdjoy(port,p) < JSEM_KBDLAYOUT + JSEM_LASTKBD)
 
index a8755ad22107ce1e3505200dece3c0a0c9014aaa..c075a3f3266afaa6fbd6dacba1a10da424e56d53 100755 (executable)
@@ -117,6 +117,7 @@ extern addrbank akiko_bank;
 extern addrbank cardmem_bank;
 
 extern void rtarea_init (void);
+extern void rtarea_init_mem (void);
 extern void rtarea_setup (void);
 extern void expamem_init (void);
 extern void expamem_reset (void);
index 6a567e8056e98827758da5f9cfd0ae9a95c4c93c..ba2b404add2cf65b4d29ce9150ab8ce7f3ddf96f 100755 (executable)
@@ -131,7 +131,6 @@ struct uae_prefs {
     int comptrustlong;
     int comptrustnaddr;
     int compnf;
-    int compforcesettings;
     int compfpu;
     int comp_midopt;
     int comp_lowopt;
@@ -168,6 +167,7 @@ struct uae_prefs {
     int gfx_xcenter, gfx_ycenter;
     int gfx_xcenter_pos, gfx_ycenter_pos;
     int gfx_xcenter_size, gfx_ycenter_size;
+    int gfx_max_horizontal, gfx_max_vertical;
     int gfx_saturation, gfx_luminance, gfx_contrast, gfx_gamma;
     int color_mode;
 
index bfa2516eca8b2b6dc971caccae1892b0f080501d..1e26c6c748db0887ca042917e4673f81b9b613a8 100755 (executable)
@@ -1147,14 +1147,14 @@ int getjoystate (int joy)
 #endif
     if (input_recording > 0 && oldjoy[joy] != v) {
        oldjoy[joy] = v;
-       inprec_rstart(INPREC_JOYPORT);
-       inprec_ru16(v);
-       inprec_rend();
+       inprec_rstart (INPREC_JOYPORT);
+       inprec_ru16 (v);
+       inprec_rend ();
     } else if (input_recording < 0) {
        v = oldjoy[joy];
        if (inprec_pstart (INPREC_JOYPORT)) {
-           v = inprec_pu16();
-           inprec_pend();
+           v = inprec_pu16 ();
+           inprec_pend ();
        }
        oldjoy[joy] = v;
     }
@@ -2414,11 +2414,17 @@ void inputdevice_updateconfig (struct uae_prefs *prefs)
 {
     int i;
 
-    if (currprefs.jports[0].id != changed_prefs.jports[0].id
-       || currprefs.jports[1].id != changed_prefs.jports[1].id) {
-       currprefs.jports[0].id = changed_prefs.jports[0].id;
-       currprefs.jports[1].id = changed_prefs.jports[1].id;
-    }
+    int j = jsem_isjoy (1, &currprefs);
+    int m = jsem_ismouse (1, &currprefs);
+    int k = jsem_iskbdjoy (1, &currprefs);
+
+    currprefs.jports[0].id = changed_prefs.jports[0].id;
+    currprefs.jports[1].id = changed_prefs.jports[1].id;
+#ifdef RETROPLATFORM
+    rp_input_change (0);
+    rp_input_change (1);
+#endif
+
     joybutton[0] = joybutton[1] = 0;
     joydir[0] = joydir[1] = 0;
     oldmx[0] = oldmx[1] = -1;
@@ -2772,6 +2778,11 @@ char *inputdevice_get_device_name (int type, int devnum)
 {
     return idev[type].get_friendlyname (devnum);
 }
+/* returns machine readable name of device */
+char *inputdevice_get_device_unique_name (int type, int devnum)
+{
+    return idev[type].get_uniquename (devnum);
+}
 /* returns state (enabled/disabled) */
 int inputdevice_get_device_status (int devnum)
 {
@@ -3223,21 +3234,27 @@ int getmousestate(int joy)
 
 void warpmode (int mode)
 {
+    int fr, fr2;
+    
+    fr = currprefs.gfx_framerate;
+    if (fr == 0)
+       fr = -1;
+    fr2 = turbo_emulation;
+    if (fr2 == -1)
+       fr2 = 0;
+
     if (mode < 0) {
        if (turbo_emulation) {
-           changed_prefs.gfx_framerate = currprefs.gfx_framerate = turbo_emulation;
+           changed_prefs.gfx_framerate = currprefs.gfx_framerate = fr2;
            turbo_emulation = 0;
        }  else {
-           turbo_emulation = currprefs.gfx_framerate;
+           turbo_emulation = fr;
        }
-#ifdef RETROPLATFORM
-       rp_turbo (turbo_emulation);
-#endif
     } else if (mode == 0 && turbo_emulation > 0) {
-       changed_prefs.gfx_framerate = currprefs.gfx_framerate = turbo_emulation;
+       changed_prefs.gfx_framerate = currprefs.gfx_framerate = fr2;
        turbo_emulation = 0;
     } else if (mode > 0 && !turbo_emulation) {
-       turbo_emulation = currprefs.gfx_framerate;
+       turbo_emulation = fr;
     }
     if (turbo_emulation) {
        if (!currprefs.cpu_cycle_exact && !currprefs.blitter_cycle_exact)
@@ -3247,6 +3264,9 @@ void warpmode (int mode)
        resume_sound ();
     }
     compute_vsynctime ();
+#ifdef RETROPLATFORM
+    rp_turbo (turbo_emulation);
+#endif
 }
 
 void pausemode (int mode)
index 020d6be8438b2a52a27dcc10b7fa6f8614e84124..b92a3cae05e59a2a14f5936013dda43e515603f6 100755 (executable)
@@ -426,7 +426,19 @@ extern int have_done_picasso;
 int check_prefs_changed_comp (void)
 {
     int changed = 0;
-    static int cachesize_prev, comptrust_prev, compforce_prev, canbang_prev;
+    static int cachesize_prev, comptrust_prev, canbang_prev;
+
+    if (currprefs.comptrustbyte != changed_prefs.comptrustbyte ||
+       currprefs.comptrustword != changed_prefs.comptrustword ||
+       currprefs.comptrustlong != changed_prefs.comptrustlong ||
+       currprefs.comptrustnaddr!= changed_prefs.comptrustnaddr ||
+       currprefs.compnf != changed_prefs.compnf ||
+       currprefs.comp_hardflush != changed_prefs.comp_hardflush ||
+       currprefs.comp_constjump != changed_prefs.comp_constjump ||
+       currprefs.comp_oldsegv != changed_prefs.comp_oldsegv ||
+       currprefs.compfpu != changed_prefs.compfpu ||
+       currprefs.fpu_strict != changed_prefs.fpu_strict)
+       changed = 1;
 
     currprefs.comptrustbyte = changed_prefs.comptrustbyte;
     currprefs.comptrustword = changed_prefs.comptrustword;
@@ -440,19 +452,6 @@ int check_prefs_changed_comp (void)
     currprefs.fpu_strict = changed_prefs.fpu_strict;
 
     if (currprefs.cachesize != changed_prefs.cachesize) {
-       if (currprefs.cachesize == 0 && changed_prefs.cachesize && cachesize_prev) {
-           changed_prefs.comptrustbyte = currprefs.comptrustbyte = comptrust_prev;
-           changed_prefs.comptrustword = currprefs.comptrustword = comptrust_prev;
-           changed_prefs.comptrustlong = currprefs.comptrustlong = comptrust_prev;
-           changed_prefs.comptrustnaddr = currprefs.comptrustnaddr = comptrust_prev;
-           changed_prefs.compforcesettings = currprefs.compforcesettings = compforce_prev;
-           canbang = canbang_prev;
-       } else if (currprefs.cachesize && changed_prefs.cachesize == 0) {
-           comptrust_prev = currprefs.comptrustbyte;
-           compforce_prev = currprefs.compforcesettings;
-           cachesize_prev = currprefs.cachesize;
-           canbang_prev = canbang;
-       }
        currprefs.cachesize = changed_prefs.cachesize;
        alloc_cache();
        changed = 1;
@@ -464,8 +463,8 @@ int check_prefs_changed_comp (void)
     if(currprefs.cachesize)
        currprefs.illegal_mem = changed_prefs.illegal_mem;// = 0;
 
-    currprefs.comp_midopt=changed_prefs.comp_midopt;
-    currprefs.comp_lowopt=changed_prefs.comp_lowopt;
+    currprefs.comp_midopt = changed_prefs.comp_midopt;
+    currprefs.comp_lowopt = changed_prefs.comp_lowopt;
 
     if ((!canbang || !currprefs.cachesize) && currprefs.comptrustbyte != 1) {
        // Set all of these to indirect when canbang == 0
@@ -474,23 +473,26 @@ int check_prefs_changed_comp (void)
        currprefs.comptrustword = 1;
        currprefs.comptrustlong = 1;
        currprefs.comptrustnaddr= 1;
-       currprefs.compforcesettings = 1;
 
        changed_prefs.comptrustbyte = 1;
        changed_prefs.comptrustword = 1;
        changed_prefs.comptrustlong = 1;
        changed_prefs.comptrustnaddr= 1;
-       changed_prefs.compforcesettings = 1;
 
        changed = 1;
 
-       if(currprefs.cachesize)
-       {
+       if (currprefs.cachesize)
            write_log ( "JIT: Reverting to \"indirect\" access, because canbang is zero!\n" );
-       }
     }
 
-    if (!currprefs.compforcesettings && !have_done_picasso) {
+    if (changed)
+       write_log ("JIT: cache=%d. b=%d w=%d l=%d fpu=%d nf=%d const=%d hard=%d\n",
+           currprefs.cachesize,
+           currprefs.comptrustbyte, currprefs.comptrustword, currprefs.comptrustlong, 
+           currprefs.compfpu, currprefs.compnf, currprefs.comp_constjump, currprefs.comp_hardflush);
+
+#if 0
+    if (!currprefs.compforcesettings) {
        int stop=0;
        if (currprefs.comptrustbyte!=0 && currprefs.comptrustbyte!=3)
            stop = 1, write_log ("JIT: comptrustbyte is not 'direct' or 'afterpic'\n");
@@ -509,7 +511,6 @@ int check_prefs_changed_comp (void)
        if (!canbang)
            stop = 1, write_log ("JIT: Cannot use most direct memory access,\n"
                                "     and unable to recover from failed guess!\n");
-#if 0
        if (stop) {
            gui_message("JIT: Configuration problems were detected!\n"
                      "JIT: These will adversely affect performance, and should\n"
@@ -520,8 +521,8 @@ int check_prefs_changed_comp (void)
                      "JIT: in your config file\n");
            exit(1);
        }
-#endif
     }
+#endif
     return changed;
 }
 
diff --git a/main.c b/main.c
index 92e8d668ec2be76e8aadebcbb943f597b685dab5..e34508f998f742309e69a5048b2b7fa201a158c4 100755 (executable)
--- a/main.c
+++ b/main.c
@@ -47,6 +47,7 @@
 #include "scsi.h"
 #include "sana2.h"
 #include "blkdev.h"
+#include "gfxfilter.h"
 
 #ifdef USE_SDL
 #include "SDL.h"
@@ -121,10 +122,6 @@ static void fixup_prefs_dim2 (struct wh *wh)
 
 void fixup_prefs_dimensions (struct uae_prefs *prefs)
 {
-    if (prefs->gfx_xcenter_size > 0)
-        prefs->gfx_size_win.width = prefs->gfx_xcenter_size >> (RES_MAX - prefs->gfx_resolution);
-    if (prefs->gfx_ycenter_size > 0)
-       prefs->gfx_size_win.height = (prefs->gfx_ycenter_size * 2) >> (RES_MAX - (prefs->gfx_resolution == RES_SUPERHIRES ? 2 : (prefs->gfx_linedbl ? 1 : 0)));
     fixup_prefs_dim2 (&prefs->gfx_size_fs);
     fixup_prefs_dim2 (&prefs->gfx_size_win);
 }
@@ -135,11 +132,13 @@ void fixup_cpu (struct uae_prefs *p)
     {
     case 68000:
        p->address_space_24 = 1;
-       p->fpu_model = 0;
+       if (p->cpu_compatible || p->cpu_cycle_exact)
+           p->fpu_model = 0;
        break;
     case 68010:
        p->address_space_24 = 1;
-       p->fpu_model = 0;
+       if (p->cpu_compatible || p->cpu_cycle_exact)
+           p->fpu_model = 0;
        break;
     case 68020:
        break;
@@ -385,6 +384,8 @@ void fixup_prefs (struct uae_prefs *p)
     if (p->cpu_cycle_exact)
        p->gfx_framerate = 1;
 #endif
+    if (p->maprom && !p->address_space_24)
+       p->maprom = 0x0f000000;
     target_fixup_options (p);
 }
 
index 2b3b681e4c4619e0313e26d801d5a07f65387557..a0c61ba4202f9f4ada39d29c900965ac880ec43a 100755 (executable)
--- a/memory.c
+++ b/memory.c
@@ -46,7 +46,7 @@ static int canjit (void)
     return 0;
 #endif
 }
-static void nocanbang(void)
+static void nocanbang (void)
 {
     canbang = 0;
 }
@@ -139,7 +139,7 @@ struct romdata *getromdatabypath(char *path)
     return NULL;
 }
 
-#define NEXT_ROM_ID 72
+#define NEXT_ROM_ID 73
 
 static struct romheader romheaders[] = {
     { "Freezer Cartridges", 1 },
@@ -257,6 +257,9 @@ static struct romdata roms[] = {
     ALTROMPN(24, 2, 1, 4096, ROMTYPE_EVEN | ROMTYPE_8BIT, "252179-01", 0x42553bc4,0x8855a97f,0x7a44e3f6,0x2d1c88d9,0x38fee1f4,0xc606af5b)
     ALTROMPN(24, 2, 2, 4096, ROMTYPE_ODD  | ROMTYPE_8BIT, "252180-01", 0x8e5b9a37,0xd10f1564,0xb99f5ffe,0x108fa042,0x362e877f,0x569de2c3)
 
+    { "The Diagnostic 2.0 (Logica)", 2, 0, 2, 0, "LOGICA\0", 524288, 72, 0, 0, ROMTYPE_KICK, 0, 0, NULL,
+       0x8484f426, 0xba10d161,0x66b2e2d6,0x177c979c,0x99edf846,0x2b21651e },
+
     { "Freezer: Action Replay Mk I v1.00", 1, 0, 1, 0, "AR\0", 65536, 52, 0, 0, ROMTYPE_AR, 0, 1, NULL,
        0x2d921771, 0x1EAD9DDA,0x2DAD2914,0x6441F5EF,0x72183750,0x22E01248 },
     ALTROM(52, 1, 1, 32768, ROMTYPE_EVEN | ROMTYPE_8BIT, 0x82d6eb87, 0x7c9bac11,0x28666017,0xeee6f019,0x63fb3890,0x7fbea355)
@@ -2831,7 +2834,7 @@ static shmpiece *find_shmpiece (uae_u8 *base)
     if (!x) {
        write_log ("NATMEM: Failure to find mapping at %08X, %p\n", base - NATMEM_OFFSET, base);
        dumplist ();
-       nocanbang();
+       nocanbang ();
        return 0;
     }
     return x;
@@ -2855,7 +2858,7 @@ static void delete_shmmaps (uae_u32 start, uae_u32 size)
            if (x->size > size) {
                write_log ("NATMEM: Failure to delete mapping at %08x(size %08x, delsize %08x)\n",start,x->size,size);
                dumplist ();
-               nocanbang();
+               nocanbang ();
                return;
            }
            shmdt (x->native_address);
@@ -2896,7 +2899,7 @@ static void add_shmmaps (uae_u32 start, addrbank *what)
     if (y->native_address == (void *) -1) {
        write_log ("NATMEM: Failure to map existing at %08x(%p)\n",start,base);
        dumplist ();
-       nocanbang();
+       nocanbang ();
        return;
     }
     y->next = shm_start;
@@ -2913,7 +2916,7 @@ uae_u8 *mapped_malloc (size_t s, char *file)
     shmpiece *x;
 
     if (!canjit()) {
-       nocanbang();
+       nocanbang ();
        return xcalloc (s + 4, 1);
     }
 
@@ -2921,7 +2924,7 @@ uae_u8 *mapped_malloc (size_t s, char *file)
     if (id == -1) {
        static int recurse;
        uae_u8 *p;
-       nocanbang();
+       nocanbang ();
        if (recurse)
            return NULL;
        recurse++;
@@ -2943,7 +2946,7 @@ uae_u8 *mapped_malloc (size_t s, char *file)
        shm_start = x;
        return answer;
     }
-    nocanbang();
+    nocanbang ();
     return mapped_malloc (s, file);
 }
 
@@ -3083,7 +3086,9 @@ static void allocate_memory (void)
     }
 
     if (savestate_state == STATE_RESTORE) {
-       restore_ram (bootrom_filepos, rtarea);
+       if (bootrom_filepos) {
+           restore_ram (bootrom_filepos, rtarea);
+       }
        restore_ram (chip_filepos, chipmemory);
        if (allocated_bogomem > 0)
            restore_ram (bogo_filepos, bogomemory);
@@ -3100,6 +3105,11 @@ static void allocate_memory (void)
     a3000lmem_bank.baseaddr = a3000lmemory;
     a3000hmem_bank.baseaddr = a3000hmemory;
     cardmem_bank.baseaddr = cardmemory;
+    bootrom_filepos = 0;
+    chip_filepos = 0;
+    bogo_filepos = 0;
+    a3000lmem_filepos = 0;
+    a3000hmem_filepos = 0;
 }
 
 void map_overlay (int chip)
@@ -3221,8 +3231,9 @@ void memory_reset (void)
        patch_kick ();
     }
 
-    if (cloanto_rom)
+    if (cloanto_rom && currprefs.maprom < 0x01000000)
        currprefs.maprom = changed_prefs.maprom = 0;
+
     gayle = currprefs.cs_ksmirror_a8 || currprefs.cs_pcmcia || currprefs.cs_ide > 0;
 
     map_banks (&custom_bank, 0xC0, 0xE0 - 0xC0, 0);
@@ -3329,7 +3340,7 @@ void memory_reset (void)
        if (extendedkickmem2_size) {
            map_banks (&extendedkickmem2_bank, 0xa8, 16, 0);
        } else {
-           struct romdata *rd = getromdatabypath(currprefs.cartfile);
+           struct romdata *rd = getromdatabypath (currprefs.cartfile);
            if (!rd || rd->id != 63) {
                if (extendedkickmem_type == EXTENDED_ROM_CD32 || extendedkickmem_type == EXTENDED_ROM_KS)
                    map_banks (&extendedkickmem_bank, 0xb0, 8, 0);
index eecc4f5a0cf6adc4fcc735b525b9e15d05a5c6be..d5255db7946c960cca1952875326df6e655c0cde 100755 (executable)
--- a/newcpu.c
+++ b/newcpu.c
@@ -212,12 +212,27 @@ static void build_cpufunctbl (void)
     for (i = 0; tbl[i].handler != NULL; i++)
        cpufunctbl[tbl[i].opcode] = tbl[i].handler;
 
+    /* hack fpu to 68000/68010 mode */
+    if (currprefs.fpu_model && currprefs.cpu_model < 68020) {
+       tbl = op_smalltbl_3_ff;
+       for (i = 0; tbl[i].handler != NULL; i++) {
+           if ((tbl[i].opcode & 0xfe00) == 0xf200)
+               cpufunctbl[tbl[i].opcode] = tbl[i].handler;
+       }
+    }
     opcnt = 0;
     for (opcode = 0; opcode < 65536; opcode++) {
        cpuop_func *f;
 
-       if (table68k[opcode].mnemo == i_ILLG || table68k[opcode].clev > lvl)
+       if (table68k[opcode].mnemo == i_ILLG)
            continue;
+       if (currprefs.fpu_model && currprefs.cpu_model < 68020) {
+           /* more hack fpu to 68000/68010 mode */
+           if (table68k[opcode].clev > lvl && (opcode & 0xfe00) != 0xf200)
+               continue;
+       } else if (table68k[opcode].clev > lvl) {
+           continue;
+       }
 
        if (table68k[opcode].handler != -1) {
            f = cpufunctbl[table68k[opcode].handler];
index ef050a37b32a388f3ebf48f43c458bc7bf995754..00271b526cf1c6368c56ea66430d67ef3670a15b 100755 (executable)
@@ -622,14 +622,45 @@ uae_u32 REGPARAM2 ahi_demux (TrapContext *context)
 
        case 100: // open dll
        {
+           char *dlldir = "winuae_dll";
            char *dllname;
-           uae_u32 result;
-           dllname = (char *) m68k_areg (&context->regs, 0);
-           dllname = (char *)get_real_address ((uae_u32)dllname);
-           result=(uae_u32) LoadLibrary(dllname);
-           write_log ("%s windows dll/alib loaded at %d (0 mean failure)\n",dllname,result);
+           uaecptr dllptr;
+           HMODULE h = NULL;
+           char dpath[MAX_DPATH];
+           char newdllpath[MAX_DPATH];
+           int ok = 0;
+           char *filepart;
+
+           dllptr = m68k_areg (&context->regs, 0);
+           dllname = (char *)get_real_address (dllptr);
+           dpath[0] = 0;
+           GetFullPathName (dllname, sizeof dpath, dpath, &filepart);
+           if (strlen (dpath) > strlen (start_path_data) && !strnicmp (dpath, start_path_data, strlen (dpath))) {
+               /* path really is relative to winuae directory */
+               ok = 1;
+               strcpy (newdllpath, dpath + strlen (start_path_data) + 1);
+               if (!strnicmp (newdllpath, dlldir, strlen (dlldir))) /* remove "winuae_dll" */
+                   strcpy (newdllpath, dpath + strlen (start_path_data) + 1 + strlen (dlldir));
+               sprintf (dpath, "%s%s%s", start_path_data, WIN32_PLUGINDIR, newdllpath);
+               h = LoadLibrary (dpath);
+               write_log ("native open: '%s' = %p\n", dpath, h);
+               if (h == NULL) {
+                   sprintf (dpath, "%s%s\\%s", start_path_data, dlldir, newdllpath);
+                   h = LoadLibrary (dllname);
+                   write_log ("fallback native open: '%s' = %p\n", dpath, h);
+               }
+           }
+           if (h == NULL) {
+               h = LoadLibrary (filepart);
+               write_log ("native file open: '%s' = %p\n", dllname, h);
+               if (h == NULL) {
+                   sprintf (dpath, "%s%s%s", start_path_data, WIN32_PLUGINDIR, filepart);
+                   h = LoadLibrary (dpath);
+                   write_log ("native path open: '%s' = %p\n", dpath, h);
+               }
+           }
            syncdivisor = (3580000.0 * CYCLE_UNIT) / (double)syncbase;
-           return result;
+           return (uae_u32)h;
        }
 
        case 101:       //get dll label
@@ -639,7 +670,7 @@ uae_u32 REGPARAM2 ahi_demux (TrapContext *context)
            m = (HMODULE) m68k_dreg (&context->regs, 1);
            funcname = (char *)m68k_areg (&context->regs, 0);
            funcname = (char *)get_real_address ((uae_u32)funcname);
-           return (uae_u32) GetProcAddress (m,funcname);
+           return (uae_u32) GetProcAddress (m, funcname);
        }
 
        case 102:       //execute native code
@@ -647,14 +678,14 @@ uae_u32 REGPARAM2 ahi_demux (TrapContext *context)
            uae_u32 ret;
            unsigned long rate1;
            double v;
-           rate1 = read_processor_time();
+           rate1 = read_processor_time ();
            ret = emulib_ExecuteNativeCode2 (context);
-           rate1 = read_processor_time() - rate1;
+           rate1 = read_processor_time () - rate1;
            v = syncdivisor * rate1;
            if (v > 0) {
                if (v > 1000000 * CYCLE_UNIT)
                    v = 1000000 * CYCLE_UNIT;
-               do_extra_cycles((unsigned long)(syncdivisor * rate1)); //compensate the time stay in native func
+               do_extra_cycles ((unsigned long)(syncdivisor * rate1)); //compensate the time stay in native func
            }
            return ret;
        }
@@ -663,7 +694,7 @@ uae_u32 REGPARAM2 ahi_demux (TrapContext *context)
        {
            HMODULE libaddr;
            libaddr = (HMODULE) m68k_dreg (&context->regs, 1);
-           FreeLibrary(libaddr);
+           FreeLibrary (libaddr);
            return 0;
        }
 #endif
index e814064d00ea736430fc6fdce69401bdeac2998b..fb19e9fd1d67c687d6c133d5394a83cbc70a6011 100755 (executable)
@@ -207,16 +207,16 @@ static void getsettings(UAEREG *avikey)
 
 void AVIOutput_GetSettings(void)
 {
-    UAEREG *avikey = openavikey();
+    UAEREG *avikey = openavikey ();
     if (avikey)
-       getsettings(avikey);
+       getsettings (avikey);
     regclosetree (avikey);
 }
 void AVIOutput_SetSettings(void)
 {
-    UAEREG *avikey = openavikey();
+    UAEREG *avikey = openavikey ();
     if (avikey)
-       storesettings(avikey);
+       storesettings (avikey);
     regclosetree (avikey);
 }
 
@@ -242,8 +242,8 @@ static UINT CALLBACK acmFilterChooseHookProc(HWND hwnd, UINT uMsg, WPARAM wParam
 
 void AVIOutput_ReleaseAudio(void)
 {
-    if(pwfxDst) {
-       free(pwfxDst);
+    if (pwfxDst) {
+       xfree (pwfxDst);
        pwfxDst = NULL;
     }
 }
@@ -257,9 +257,9 @@ static int AVIOutput_AllocateAudio (void)
 {
     MMRESULT err;
 
-    AVIOutput_ReleaseAudio();
+    AVIOutput_ReleaseAudio ();
 
-    if((err = acmMetrics(NULL, ACM_METRIC_MAX_SIZE_FORMAT, &wfxMaxFmtSize))) {
+    if ((err = acmMetrics (NULL, ACM_METRIC_MAX_SIZE_FORMAT, &wfxMaxFmtSize))) {
        gui_message("acmMetrics() FAILED (%X)\n", err);
        return 0;
     }
@@ -273,17 +273,17 @@ static int AVIOutput_AllocateAudio (void)
     wfxSrc.wBitsPerSample = workprefs.sound_bits;
     wfxSrc.cbSize = 0;
 
-    if(!(pwfxDst = (LPWAVEFORMATEX) malloc(wfxMaxFmtSize)))
+    if (!(pwfxDst = (LPWAVEFORMATEX) xmalloc (wfxMaxFmtSize)))
        return 0;
 
     // set the initial destination format to match source
-    memset(pwfxDst, 0, wfxMaxFmtSize);
-    memcpy(pwfxDst, &wfxSrc, sizeof(WAVEFORMATEX));
-    pwfxDst->cbSize = (WORD) (wfxMaxFmtSize - sizeof(WAVEFORMATEX)); // shrugs
+    memset (pwfxDst, 0, wfxMaxFmtSize);
+    memcpy (pwfxDst, &wfxSrc, sizeof (WAVEFORMATEX));
+    pwfxDst->cbSize = (WORD) (wfxMaxFmtSize - sizeof (WAVEFORMATEX)); // shrugs
 
-    memset(&acmopt, 0, sizeof(ACMFORMATCHOOSE));
+    memset(&acmopt, 0, sizeof (ACMFORMATCHOOSE));
 
-    acmopt.cbStruct = sizeof(ACMFORMATCHOOSE);
+    acmopt.cbStruct = sizeof (ACMFORMATCHOOSE);
     acmopt.fdwStyle = ACMFORMATCHOOSE_STYLEF_ENABLEHOOK | ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT;
 
     acmopt.pwfx = pwfxDst;
@@ -313,19 +313,19 @@ static int AVIOutput_ValidateAudio (WAVEFORMATEX *wft, char *name, int len)
     ACMFORMATTAGDETAILS aftd;
     ACMFORMATDETAILS afd;
 
-    memset(&aftd, 0, sizeof(ACMFORMATTAGDETAILS));
-    aftd.cbStruct = sizeof(ACMFORMATTAGDETAILS);
+    memset(&aftd, 0, sizeof (ACMFORMATTAGDETAILS));
+    aftd.cbStruct = sizeof (ACMFORMATTAGDETAILS);
     aftd.dwFormatTag = wft->wFormatTag;
-    ret = acmFormatTagDetails(NULL, &aftd, ACM_FORMATTAGDETAILSF_FORMATTAG);
+    ret = acmFormatTagDetails (NULL, &aftd, ACM_FORMATTAGDETAILSF_FORMATTAG);
     if (ret)
        return 0;
 
-    memset(&afd, 0, sizeof(ACMFORMATDETAILS));
-    afd.cbStruct = sizeof(ACMFORMATDETAILS);
+    memset (&afd, 0, sizeof (ACMFORMATDETAILS));
+    afd.cbStruct = sizeof (ACMFORMATDETAILS);
     afd.dwFormatTag = wft->wFormatTag;
     afd.pwfx = wft;
-    afd.cbwfx = sizeof(WAVEFORMATEX) + wft->cbSize;
-    ret = acmFormatDetails(NULL, &afd, ACM_FORMATDETAILSF_FORMAT);
+    afd.cbwfx = sizeof (WAVEFORMATEX) + wft->cbSize;
+    ret = acmFormatDetails (NULL, &afd, ACM_FORMATDETAILSF_FORMAT);
     if (ret)
        return 0;
 
@@ -340,14 +340,14 @@ static int AVIOutput_GetAudioFromRegistry (WAVEFORMATEX *wft)
     int ok = 0;
     UAEREG *avikey;
 
-    avikey = openavikey();
+    avikey = openavikey ();
     if (!avikey)
        return 0;
-    getsettings(avikey);
+    getsettings (avikey);
     if (wft) {
        ss = wfxMaxFmtSize;
        if (regquerydata (avikey, "AudioConfigurationVars", wft, &ss)) {
-           if (AVIOutput_ValidateAudio(wft, NULL, 0))
+           if (AVIOutput_ValidateAudio (wft, NULL, 0))
                ok = 1;
        }
     }
@@ -361,7 +361,7 @@ static int AVIOutput_GetAudioFromRegistry (WAVEFORMATEX *wft)
 
 static int AVIOutput_GetAudioCodecName (WAVEFORMATEX *wft, char *name, int len)
 {
-    return AVIOutput_ValidateAudio(wft, name, len);
+    return AVIOutput_ValidateAudio (wft, name, len);
 }
 
 int AVIOutput_GetAudioCodec (char *name, int len)
@@ -387,15 +387,15 @@ int AVIOutput_ChooseAudioCodec (HWND hwnd, char *s, int len)
     acmopt.hwndOwner = hwnd;
     acmopt.pfnHook = acmFilterChooseHookProc;
 
-    switch(acmFormatChoose(&acmopt))
+    switch (acmFormatChoose (&acmopt))
     {
        case MMSYSERR_NOERROR:
        {
            UAEREG *avikey;
            strcpy (s, acmopt.szFormatTag);
-           avikey = openavikey();
+           avikey = openavikey ();
            if (avikey) {
-               regsetdata (avikey, "AudioConfigurationVars", pwfxDst, pwfxDst->cbSize + sizeof(WAVEFORMATEX));
+               regsetdata (avikey, "AudioConfigurationVars", pwfxDst, pwfxDst->cbSize + sizeof (WAVEFORMATEX));
                storesettings (avikey);
                regclosetree (avikey);
            }
@@ -403,32 +403,32 @@ int AVIOutput_ChooseAudioCodec (HWND hwnd, char *s, int len)
        }
 
        case ACMERR_CANCELED:
-           AVIOutput_GetAudioFromRegistry(NULL);
+           AVIOutput_GetAudioFromRegistry (NULL);
            AVIOutput_ReleaseAudio();
            break;
 
        case ACMERR_NOTPOSSIBLE:
-           MessageBox(hwnd, "The buffer identified by the pwfx member of the ACMFORMATCHOOSE structure is too small to contain the selected format.", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
+           MessageBox (hwnd, "The buffer identified by the pwfx member of the ACMFORMATCHOOSE structure is too small to contain the selected format.", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
            break;
 
        case MMSYSERR_INVALFLAG:
-           MessageBox(hwnd, "At least one flag is invalid.", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
+           MessageBox (hwnd, "At least one flag is invalid.", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
            break;
 
        case MMSYSERR_INVALHANDLE:
-           MessageBox(hwnd, "The specified handle is invalid.", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
+           MessageBox (hwnd, "The specified handle is invalid.", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
            break;
 
        case MMSYSERR_INVALPARAM:
-           MessageBox(hwnd, "At least one parameter is invalid.", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
+           MessageBox (hwnd, "At least one parameter is invalid.", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
            break;
 
        case MMSYSERR_NODRIVER:
-           MessageBox(hwnd, "A suitable driver is not available to provide valid format selections.", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
+           MessageBox (hwnd, "A suitable driver is not available to provide valid format selections.", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
            break;
 
        default:
-           MessageBox(hwnd, "acmFormatChoose() FAILED", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
+           MessageBox (hwnd, "acmFormatChoose() FAILED", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
            break;
     }
     return 0;
@@ -459,7 +459,7 @@ static int AVIOutput_AllocateVideo (void)
        avioutput_height = workprefs.gfx_size.height;
        avioutput_bits = 24;
     }
-    lpbi = xcalloc(lpbisize (), 1);
+    lpbi = xcalloc (lpbisize (), 1);
     lpbi->biSize = sizeof(BITMAPINFOHEADER);
     lpbi->biWidth = avioutput_width;
     lpbi->biHeight = avioutput_height;
@@ -492,10 +492,10 @@ static int AVIOutput_GetCOMPVARSFromRegistry (COMPVARS *pcv)
     DWORD ss;
     int ok = 0;
 
-    avikey = openavikey();
+    avikey = openavikey ();
     if (!avikey)
        return 0;
-    getsettings(avikey);
+    getsettings (avikey);
     if (pcv) {
        ss = pcv->cbSize;
        pcv->hic = 0;
@@ -507,10 +507,10 @@ static int AVIOutput_GetCOMPVARSFromRegistry (COMPVARS *pcv)
                if (ss > 0) {
                    LPBYTE state = xmalloc (ss);
                    if (regquerydata (avikey, "VideoConfigurationState", state, &ss)) {
-                       pcv->hic = ICOpen(pcv->fccType, pcv->fccHandler, ICMODE_COMPRESS);
+                       pcv->hic = ICOpen (pcv->fccType, pcv->fccHandler, ICMODE_COMPRESS);
                        if (pcv->hic) {
                            ok = 1;
-                           ICSetState(pcv->hic, state, ss);
+                           ICSetState (pcv->hic, state, ss);
                        }
                    }
                    xfree (state);
@@ -533,12 +533,12 @@ static int AVIOutput_GetVideoCodecName (COMPVARS *pcv, char *name, int len)
     ICINFO icinfo = { 0 };
 
     name[0] = 0;
-    if(pcv->fccHandler == mmioFOURCC('D','I','B',' ')) {
+    if (pcv->fccHandler == mmioFOURCC ('D','I','B',' ')) {
        strcpy (name, "Full Frames (Uncompressed)");
        return 1;
     }
-    if(ICGetInfo(pcv->hic, &icinfo, sizeof(ICINFO)) != 0) {
-       if(WideCharToMultiByte(CP_ACP, 0, icinfo.szDescription, -1, name, len, NULL, NULL) != 0)
+    if (ICGetInfo (pcv->hic, &icinfo, sizeof (ICINFO)) != 0) {
+       if (WideCharToMultiByte (CP_ACP, 0, icinfo.szDescription, -1, name, len, NULL, NULL) != 0)
            return 1;
     }
     return 0;
@@ -577,38 +577,38 @@ int AVIOutput_ChooseVideoCodec (HWND hwnd, char *s, int len)
     pcompvars->lQ = 10000; // 10000 is maximum quality setting or ICQUALITY_DEFAULT for default
     pcompvars->lKey = avioutput_fps; // default to one key frame per second, every (FPS) frames
     pcompvars->dwFlags = 0;
-    if(ICCompressorChoose(hwnd, ICMF_CHOOSE_DATARATE | ICMF_CHOOSE_KEYFRAME, lpbi, NULL, pcompvars, "Choose Video Codec") == TRUE) {
+    if (ICCompressorChoose (hwnd, ICMF_CHOOSE_DATARATE | ICMF_CHOOSE_KEYFRAME, lpbi, NULL, pcompvars, "Choose Video Codec") == TRUE) {
        UAEREG *avikey;
        int ss;
        uae_u8 *state;
 
        compressorallocated = TRUE;
-       ss = ICGetState(pcompvars->hic, NULL, 0);
+       ss = ICGetState (pcompvars->hic, NULL, 0);
        if (ss > 0) {
            DWORD err;
            state = xmalloc (ss);
-           err = ICGetState(pcompvars->hic, state, ss);
+           err = ICGetState (pcompvars->hic, state, ss);
            if (err < 0) {
                ss = 0;
-               xfree(state);
+               xfree (state);
            }
        } else {
            ss = 0;
        }
        if (ss == 0)
            state = xmalloc (1);
-       avikey = openavikey();
+       avikey = openavikey ();
        if (avikey) {
            regsetdata (avikey, "VideoConfigurationState", state, ss);
            regsetdata (avikey, "VideoConfigurationVars", pcompvars, pcompvars->cbSize);
-           storesettings(avikey);
+           storesettings (avikey);
            regclosetree (avikey);
        }
        xfree (state);
-       return AVIOutput_GetVideoCodecName(pcompvars, s, len);
+       return AVIOutput_GetVideoCodecName (pcompvars, s, len);
     } else {
-       AVIOutput_GetCOMPVARSFromRegistry(NULL);
-       AVIOutput_ReleaseVideo();
+       AVIOutput_GetCOMPVARSFromRegistry (NULL);
+       AVIOutput_ReleaseVideo ();
        return 0;
     }
 }
@@ -667,19 +667,19 @@ static int AVIOutput_AVIWriteAudio_Thread (struct avientry *ae)
     unsigned int err;
     uae_u8 *lpAudio = NULL;
 
-    if(avioutput_audio) {
-       if(!avioutput_init)
+    if (avioutput_audio) {
+       if (!avioutput_init)
            goto error;
 
-       if((err = acmStreamSize(has, ae->sndsize, &dwOutputBytes, ACM_STREAMSIZEF_SOURCE) != 0)) {
-           gui_message("acmStreamSize() FAILED (%X)\n", err);
+       if ((err = acmStreamSize (has, ae->sndsize, &dwOutputBytes, ACM_STREAMSIZEF_SOURCE) != 0)) {
+           gui_message ("acmStreamSize() FAILED (%X)\n", err);
            goto error;
        }
 
-       if(!(lpAudio = malloc(dwOutputBytes)))
+       if (!(lpAudio = xmalloc (dwOutputBytes)))
            goto error;
 
-       ash.cbStruct = sizeof(ACMSTREAMHEADER);
+       ash.cbStruct = sizeof (ACMSTREAMHEADER);
        ash.fdwStatus = 0;
        ash.dwUser = 0;
 
@@ -699,25 +699,25 @@ static int AVIOutput_AVIWriteAudio_Thread (struct avientry *ae)
 
        ash.dwDstUser = 0;
 
-       if((err = acmStreamPrepareHeader(has, &ash, 0))) {
-           gui_message("acmStreamPrepareHeader() FAILED (%X)\n", err);
+       if ((err = acmStreamPrepareHeader (has, &ash, 0))) {
+           gui_message ("acmStreamPrepareHeader() FAILED (%X)\n", err);
            goto error;
        }
 
-       if((err = acmStreamConvert(has, &ash, ACM_STREAMCONVERTF_BLOCKALIGN))) {
-           gui_message("acmStreamConvert() FAILED (%X)\n", err);
+       if ((err = acmStreamConvert (has, &ash, ACM_STREAMCONVERTF_BLOCKALIGN))) {
+           gui_message ("acmStreamConvert() FAILED (%X)\n", err);
            goto error;
        }
 
-       if((err = AVIStreamWrite(AVIAudioStream, StreamSizeAudio, ash.cbDstLengthUsed / pwfxDst->nBlockAlign, lpAudio, ash.cbDstLengthUsed, 0, &swritten, &written)) != 0) {
-           gui_message("AVIStreamWrite() FAILED (%X)\n", err);
+       if ((err = AVIStreamWrite (AVIAudioStream, StreamSizeAudio, ash.cbDstLengthUsed / pwfxDst->nBlockAlign, lpAudio, ash.cbDstLengthUsed, 0, &swritten, &written)) != 0) {
+           gui_message ("AVIStreamWrite() FAILED (%X)\n", err);
            goto error;
        }
 
        StreamSizeAudio += swritten;
        total_avi_size += written;
 
-       acmStreamUnprepareHeader(has, &ash, 0);
+       acmStreamUnprepareHeader (has, &ash, 0);
 
         free(lpAudio);
         lpAudio = NULL;
@@ -726,7 +726,7 @@ static int AVIOutput_AVIWriteAudio_Thread (struct avientry *ae)
     return 1;
 
 error:
-    free(lpAudio);
+    xfree (lpAudio);
     return 0;
 }
 
@@ -773,8 +773,8 @@ static int getFromDC (struct avientry *avie)
     // draw centered in frame
     BitBlt (hdcMem, (avioutput_width / 2) - (actual_width / 2), (avioutput_height / 2) - (actual_height / 2), actual_width, actual_height, hdc, 0, 0, SRCCOPY);
     SelectObject (hdcMem, hbitmapOld);
-    if(GetDIBits (hdc, hbitmap, 0, avioutput_height, avie->lpVideo, (LPBITMAPINFO)lpbi, DIB_RGB_COLORS) == 0) {
-       gui_message("GetDIBits() FAILED (%X)\n", GetLastError());
+    if (GetDIBits (hdc, hbitmap, 0, avioutput_height, avie->lpVideo, (LPBITMAPINFO)lpbi, DIB_RGB_COLORS) == 0) {
+       gui_message ("GetDIBits() FAILED (%X)\n", GetLastError());
        ok = 0;
     }
     DeleteObject (hbitmap);
@@ -876,9 +876,9 @@ static int AVIOutput_AVIWriteVideo_Thread (struct avientry *ae)
     DWORD written = 0;
     unsigned int err;
 
-    if(avioutput_video) {
+    if (avioutput_video) {
 
-       if(!avioutput_init)
+       if (!avioutput_init)
            goto error;
 
        actual_width = gfxvidinfo.width;
@@ -887,18 +887,15 @@ static int AVIOutput_AVIWriteVideo_Thread (struct avientry *ae)
        // GetDIBits tends to change this and ruins palettized output
        ae->lpbi->biClrUsed = (avioutput_bits <= 8) ? 1 << avioutput_bits : 0;
 
-       if(!frame_count)
-       {
-           if((err = AVIStreamSetFormat(AVIVideoStream, frame_count, ae->lpbi, ae->lpbi->biSize + (ae->lpbi->biClrUsed * sizeof(RGBQUAD)))) != 0)
-           {
-               gui_message("AVIStreamSetFormat() FAILED (%X)\n", err);
+       if (!frame_count) {
+           if ((err = AVIStreamSetFormat (AVIVideoStream, frame_count, ae->lpbi, ae->lpbi->biSize + (ae->lpbi->biClrUsed * sizeof (RGBQUAD)))) != 0) {
+               gui_message ("AVIStreamSetFormat() FAILED (%X)\n", err);
                goto error;
            }
        }
 
-       if((err = AVIStreamWrite(AVIVideoStream, frame_count, 1, ae->lpVideo, ae->lpbi->biSizeImage, 0, NULL, &written)) != 0)
-       {
-           gui_message("AVIStreamWrite() FAILED (%X)\n", err);
+       if ((err = AVIStreamWrite (AVIVideoStream, frame_count, 1, ae->lpVideo, ae->lpbi->biSizeImage, 0, NULL, &written)) != 0) {
+           gui_message ("AVIStreamWrite() FAILED (%X)\n", err);
            goto error;
        }
 
@@ -907,7 +904,7 @@ static int AVIOutput_AVIWriteVideo_Thread (struct avientry *ae)
 
     } else {
 
-       gui_message("DirectDraw_GetDC() FAILED\n");
+       gui_message ("DirectDraw_GetDC() FAILED\n");
        goto error;
 
     }
@@ -925,7 +922,7 @@ static void writewavheader (uae_u32 size)
     uae_u16 tw;
     uae_u32 tl;
     int bits = 16;
-    int channels = get_audio_nativechannels();
+    int channels = get_audio_nativechannels ();
 
     fseek (wavfile, 0, SEEK_SET);
     fwrite ("RIFF", 1, 4, wavfile);
@@ -1000,7 +997,7 @@ void AVIOutput_End (void)
     }
 
     if (pfile) {
-       AVIFileRelease(pfile);
+       AVIFileRelease (pfile);
        pfile = NULL;
     }
 
@@ -1053,17 +1050,17 @@ void AVIOutput_Begin (void)
 
     avioutput_needs_restart = 0;
     avioutput_enabled = avioutput_audio || avioutput_video;
-    if(!avioutput_init || !avioutput_enabled)
+    if (!avioutput_init || !avioutput_enabled)
        goto error;
 
     // delete any existing file before writing AVI
-    SetFileAttributes(avioutput_filename, FILE_ATTRIBUTE_ARCHIVE);
-    DeleteFile(avioutput_filename);
+    SetFileAttributes (avioutput_filename, FILE_ATTRIBUTE_ARCHIVE);
+    DeleteFile (avioutput_filename);
 
     if (avioutput_audio == AVIAUDIO_WAV) {
        wavfile = fopen (avioutput_filename, "wb");
        if (!wavfile) {
-           gui_message("Failed to open wave-file\n\nThis can happen if the path and or file name was entered incorrectly.\n");
+           gui_message ("Failed to open wave-file\n\nThis can happen if the path and or file name was entered incorrectly.\n");
            goto error;
        }
        writewavheader (0);
@@ -1071,15 +1068,15 @@ void AVIOutput_Begin (void)
        return;
     }
 
-    if(((err = AVIFileOpen(&pfile, avioutput_filename, OF_CREATE | OF_WRITE, NULL)) != 0)) {
-       gui_message("AVIFileOpen() FAILED (Error %X)\n\nThis can happen if the path and or file name was entered incorrectly.\nRequired *.avi extension.\n", err);
+    if (((err = AVIFileOpen (&pfile, avioutput_filename, OF_CREATE | OF_WRITE, NULL)) != 0)) {
+       gui_message ("AVIFileOpen() FAILED (Error %X)\n\nThis can happen if the path and or file name was entered incorrectly.\nRequired *.avi extension.\n", err);
        goto error;
     }
 
-    if(avioutput_audio) {
-       if (!AVIOutput_AllocateAudio())
+    if (avioutput_audio) {
+       if (!AVIOutput_AllocateAudio ())
            goto error;
-       memset(&avistreaminfo, 0, sizeof(AVISTREAMINFO));
+       memset (&avistreaminfo, 0, sizeof (AVISTREAMINFO));
        avistreaminfo.fccType = streamtypeAUDIO;
        avistreaminfo.fccHandler = 0; // This member is not used for audio streams.
        avistreaminfo.dwFlags = 0;
@@ -1097,39 +1094,39 @@ void AVIOutput_Begin (void)
        //avistreaminfo.rcFrame; // doesn't apply to audio
        //avistreaminfo.dwEditCount =; // Number of times the stream has been edited. The stream handler maintains this count.
        //avistreaminfo.dwFormatChangeCount =; // Number of times the stream format has changed. The stream handler maintains this count.
-       strcpy(avistreaminfo.szName, "Audiostream"); // description of the stream.
+       strcpy (avistreaminfo.szName, "Audiostream"); // description of the stream.
 
        // create the audio stream
-       if((err = AVIFileCreateStream(pfile, &AVIAudioStream, &avistreaminfo)) != 0) {
-           gui_message("AVIFileCreateStream() FAILED (%X)\n", err);
+       if ((err = AVIFileCreateStream (pfile, &AVIAudioStream, &avistreaminfo)) != 0) {
+           gui_message ("AVIFileCreateStream() FAILED (%X)\n", err);
            goto error;
        }
 
-       if((err = AVIStreamSetFormat(AVIAudioStream, 0, pwfxDst, sizeof(WAVEFORMATEX) + pwfxDst->cbSize)) != 0) {
-           gui_message("AVIStreamSetFormat() FAILED (%X)\n", err);
+       if ((err = AVIStreamSetFormat (AVIAudioStream, 0, pwfxDst, sizeof (WAVEFORMATEX) + pwfxDst->cbSize)) != 0) {
+           gui_message ("AVIStreamSetFormat() FAILED (%X)\n", err);
            goto error;
        }
 
-       if((err = acmStreamOpen(&has, NULL, &wfxSrc, pwfxDst, NULL, 0, 0, ACM_STREAMOPENF_NONREALTIME)) != 0) {
-           gui_message("acmStreamOpen() FAILED (%X)\n", err);
+       if ((err = acmStreamOpen(&has, NULL, &wfxSrc, pwfxDst, NULL, 0, 0, ACM_STREAMOPENF_NONREALTIME)) != 0) {
+           gui_message ("acmStreamOpen() FAILED (%X)\n", err);
            goto error;
        }
     }
 
-    if(avioutput_video) {
+    if (avioutput_video) {
        ae = allocavientry_video ();
-       if (!AVIOutput_AllocateVideo())
+       if (!AVIOutput_AllocateVideo ())
            goto error;
 
        // fill in the header for the video stream
-       memset(&avistreaminfo, 0, sizeof(AVISTREAMINFO));
+       memset (&avistreaminfo, 0, sizeof(AVISTREAMINFO));
        avistreaminfo.fccType = streamtypeVIDEO; // stream type
 
        // unsure about this, as this is the uncompressed stream, not the compressed stream
        //avistreaminfo.fccHandler = 0;
 
        // incase the amiga changes palette
-       if(ae->lpbi->biBitCount < 24)
+       if (ae->lpbi->biBitCount < 24)
            avistreaminfo.dwFlags = AVISTREAMINFO_FORMATCHANGES;
        //avistreaminfo.dwCaps =; // Capability flags; currently unused
        //avistreaminfo.wPriority =; // Priority of the stream
@@ -1143,15 +1140,15 @@ void AVIOutput_Begin (void)
        avistreaminfo.dwQuality = -1; // drivers will use the default quality setting
        avistreaminfo.dwSampleSize = 0; // variable video data samples
 
-       SetRect(&avistreaminfo.rcFrame, 0, 0, ae->lpbi->biWidth, ae->lpbi->biHeight); // rectangle for stream
+       SetRect (&avistreaminfo.rcFrame, 0, 0, ae->lpbi->biWidth, ae->lpbi->biHeight); // rectangle for stream
 
        //avistreaminfo.dwEditCount =; // Number of times the stream has been edited. The stream handler maintains this count.
        //avistreaminfo.dwFormatChangeCount =; // Number of times the stream format has changed. The stream handler maintains this count.
-       strcpy(avistreaminfo.szName, "Videostream"); // description of the stream.
+       strcpy (avistreaminfo.szName, "Videostream"); // description of the stream.
 
        // create the stream
-       if((err = AVIFileCreateStream(pfile, &AVIStreamInterface, &avistreaminfo)) != 0) {
-           gui_message("AVIFileCreateStream() FAILED (%X)\n", err);
+       if ((err = AVIFileCreateStream (pfile, &AVIStreamInterface, &avistreaminfo)) != 0) {
+           gui_message ("AVIFileCreateStream() FAILED (%X)\n", err);
            goto error;
        }
 
@@ -1172,7 +1169,7 @@ void AVIOutput_Begin (void)
        videoOptions.lpParms = pcompvars->lpState;
 
        // create a compressed stream from our uncompressed stream and a compression filter
-       if((err = AVIMakeCompressedStream(&AVIVideoStream, AVIStreamInterface, &videoOptions, NULL)) != AVIERR_OK) {
+       if ((err = AVIMakeCompressedStream (&AVIVideoStream, AVIStreamInterface, &videoOptions, NULL)) != AVIERR_OK) {
            gui_message("AVIMakeCompressedStream() FAILED (%X)\n", err);
            goto error;
        }
@@ -1187,7 +1184,7 @@ void AVIOutput_Begin (void)
 
 error:
     freeavientry (ae);
-    AVIOutput_End();
+    AVIOutput_End ();
 }
 
 void AVIOutput_Release (void)
@@ -1198,7 +1195,7 @@ void AVIOutput_Release (void)
     AVIOutput_ReleaseVideo ();
 
     if (avioutput_init) {
-       AVIFileExit();
+       AVIFileExit ();
        avioutput_init = 0;
     }
 
@@ -1288,7 +1285,7 @@ void frame_drawn(void)
        return;
     }
 
-    AVIOutput_WriteVideo();
+    AVIOutput_WriteVideo ();
 
     if (!avioutput_audio)
        return;
index f49c3a237d5f946193156cea40509df666dac436..d8f19f6d9911be6e45545a63cc4fa7709e7a95ce 100755 (executable)
@@ -286,7 +286,7 @@ static void checkcapabilities (int unitnum)
        &query, sizeof query, &desc, sizeof desc, &ret, NULL);
     if (status) {
        if (desc.Version > offsetof (STORAGE_ADAPTER_DESCRIPTOR, BusType))
-           write_log ("CAPS: BusType=%d, MaxTransfer=0x%08X, Mask=0x%08X\n",
+           write_log ("SCSI CAPS: BusType=%d, MaxTransfer=0x%08X, Mask=0x%08X\n",
                desc.BusType, desc.MaximumTransferLength, desc.AlignmentMask);
     }
 }
index b3c7a915e7e0714370c001a7e9fcc436581a7ce8..6ef65b025505d6aa8c5c731c666c3d97d85a3fa9 100755 (executable)
@@ -52,7 +52,7 @@ int caps_init (void)
     h = WIN32_LoadLibrary (dllname);
     if (!h) {
        char tmp[MAX_DPATH];
-       if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES_COMMON, NULL, 0, tmp))) {
+       if (SUCCEEDED(SHGetFolderPath (NULL, CSIDL_PROGRAM_FILES_COMMON, NULL, 0, tmp))) {
            strcat (tmp, "\\Software Preservation Society\\");
            strcat (tmp, dllname);
            h = LoadLibrary (tmp);
@@ -65,7 +65,7 @@ int caps_init (void)
            }
        }
     }
-    if (GetProcAddress(h, "CAPSLockImageMemory") == 0 || GetProcAddress(h, "CAPSGetVersionInfo") == 0) {
+    if (GetProcAddress (h, "CAPSLockImageMemory") == 0 || GetProcAddress (h, "CAPSGetVersionInfo") == 0) {
        if (noticed)
            return 0;
        notify_user (NUMSG_OLDCAPS);
@@ -87,7 +87,7 @@ int caps_init (void)
     pCAPSGetVersionInfo (&cvi, 0);
     write_log ("CAPS: library version %d.%d\n", cvi.release, cvi.revision);
     for (i = 0; i < 4; i++)
-       caps_cont[i] = pCAPSAddImage();
+       caps_cont[i] = pCAPSAddImage ();
     return 1;
 }
 
@@ -119,12 +119,10 @@ int caps_loadimage (struct zfile *zf, int drv, int *num_tracks)
        return 0;
     if (zfile_fread (buf, len, 1, zf) == 0)
        return 0;
-    ret = pCAPSLockImageMemory(caps_cont[drv], buf, len, 0);
-    free (buf);
-    if (ret != imgeOk) {
-       free (buf);
+    ret = pCAPSLockImageMemory (caps_cont[drv], buf, len, 0);
+    xfree (buf);
+    if (ret != imgeOk)
        return 0;
-    }
     caps_locked[drv] = 1;
     pCAPSGetImageInfo(&ci, caps_cont[drv]);
     *num_tracks = (ci.maxcylinder - ci.mincylinder + 1) * (ci.maxhead - ci.minhead + 1);
@@ -166,7 +164,7 @@ int caps_loadrevolution (uae_u16 *mfmbuf, int drv, int track, int *tracklength)
     struct CapsTrackInfoT1 ci;
 
     ci.type = LIB_TYPE;
-    pCAPSLockTrack((PCAPSTRACKINFO)&ci, caps_cont[drv], track / 2, track & 1, caps_flags);
+    pCAPSLockTrack ((PCAPSTRACKINFO)&ci, caps_cont[drv], track / 2, track & 1, caps_flags);
     len = ci.tracklen;
     *tracklength = len * 8;
     mfm = mfmbuf;
@@ -185,7 +183,7 @@ int caps_loadtrack (uae_u16 *mfmbuf, uae_u16 *tracktiming, int drv, int track, i
 
     ci.type = LIB_TYPE;
     *tracktiming = 0;
-    pCAPSLockTrack((PCAPSTRACKINFO)&ci, caps_cont[drv], track / 2, track & 1, caps_flags);
+    pCAPSLockTrack ((PCAPSTRACKINFO)&ci, caps_cont[drv], track / 2, track & 1, caps_flags);
     mfm = mfmbuf;
     *multirev = (ci.type & CTIT_FLAG_FLAKEY) ? 1 : 0;
     type = ci.type & CTIT_MASK_TYPE;
index 99a86ccaa8bf3aeffe24ee61b39a3b2639e17bd2..ddebcbf0b34073056212099ec31ffc45c208612b 100755 (executable)
@@ -10,6 +10,7 @@
 
 #define DI_DEBUG
 //#define DI_DEBUG2
+#define IGNOREEVERYTHING 0
 
 #include "sysconfig.h"
 
@@ -320,36 +321,36 @@ static int initialize_rawinput (void)
 
     if (no_rawinput)
        goto error;
-    pRegisterRawInputDevices = (REGISTERRAWINPUTDEVICES)GetProcAddress(
-       GetModuleHandle("user32.dll"), "RegisterRawInputDevices");
-    pGetRawInputData = (GETRAWINPUTDATA)GetProcAddress(
-       GetModuleHandle("user32.dll"), "GetRawInputData");
-    pGetRawInputDeviceList = (GETRAWINPUTDEVICELIST)GetProcAddress(
-       GetModuleHandle("user32.dll"), "GetRawInputDeviceList");
-    pGetRawInputDeviceInfo = (GETRAWINPUTDEVICEINFO)GetProcAddress(
-       GetModuleHandle("user32.dll"), "GetRawInputDeviceInfoA");
-    pGetRawInputBuffer = (GETRAWINPUTBUFFER)GetProcAddress(
-       GetModuleHandle("user32.dll"), "GetRawInputBuffer");
-    pDefRawInputProc = (DEFRAWINPUTPROC)GetProcAddress(
-       GetModuleHandle("user32.dll"), "DefRawInputProc");
+    pRegisterRawInputDevices = (REGISTERRAWINPUTDEVICES)GetProcAddress (
+       GetModuleHandle ("user32.dll"), "RegisterRawInputDevices");
+    pGetRawInputData = (GETRAWINPUTDATA)GetProcAddress (
+       GetModuleHandle ("user32.dll"), "GetRawInputData");
+    pGetRawInputDeviceList = (GETRAWINPUTDEVICELIST)GetProcAddress (
+       GetModuleHandle ("user32.dll"), "GetRawInputDeviceList");
+    pGetRawInputDeviceInfo = (GETRAWINPUTDEVICEINFO)GetProcAddress (
+       GetModuleHandle ("user32.dll"), "GetRawInputDeviceInfoA");
+    pGetRawInputBuffer = (GETRAWINPUTBUFFER)GetProcAddress (
+       GetModuleHandle ("user32.dll"), "GetRawInputBuffer");
+    pDefRawInputProc = (DEFRAWINPUTPROC)GetProcAddress (
+       GetModuleHandle ("user32.dll"), "DefRawInputProc");
 
     if (!pRegisterRawInputDevices || !pGetRawInputData || !pGetRawInputDeviceList ||
        !pGetRawInputDeviceInfo || !pGetRawInputBuffer || !pDefRawInputProc)
        goto error;
 
     bufsize = 10000;
-    buf = malloc (bufsize);
+    buf = xmalloc (bufsize);
 
     register_rawinput();
-    if (pGetRawInputDeviceList(NULL, &num, sizeof (RAWINPUTDEVICELIST)) != 0) {
+    if (pGetRawInputDeviceList (NULL, &num, sizeof (RAWINPUTDEVICELIST)) != 0) {
        write_log ("RAWINPUT error %08X\n", GetLastError());
        goto error2;
     }
     write_log ("RAWINPUT: found %d devices\n", num);
     if (num <= 0)
        goto error2;
-    ridl = calloc (sizeof(RAWINPUTDEVICELIST), num);
-    gotnum = pGetRawInputDeviceList(ridl, &num, sizeof (RAWINPUTDEVICELIST));
+    ridl = xcalloc (sizeof(RAWINPUTDEVICELIST), num);
+    gotnum = pGetRawInputDeviceList (ridl, &num, sizeof (RAWINPUTDEVICELIST));
     if (gotnum <= 0) {
        write_log ("RAWINPUT didn't find any devices\n");
        goto error2;
@@ -365,7 +366,7 @@ static int initialize_rawinput (void)
            continue;
        if (pGetRawInputDeviceInfo (h, RIDI_DEVICENAME, buf, &vtmp) == -1)
            continue;
-       if (rdpmouse(buf))
+       if (rdpmouse (buf))
            continue;
        if (type == RIM_TYPEMOUSE)
            rnum_mouse++;
@@ -410,7 +411,7 @@ static int initialize_rawinput (void)
            }
 
            rnum_raw++;
-           cleardid(did);
+           cleardid (did);
            sprintf (tmp, "%s", type == RIM_TYPEMOUSE ? "RAW Mouse" : "RAW Keyboard");
            did->name = my_strdup (tmp);
            did->rawinput = h;
@@ -462,8 +463,8 @@ static int initialize_rawinput (void)
        }
     }
 
-    free (ridl);
-    free (buf);
+    xfree (ridl);
+    xfree (buf);
     if (rnum_raw > 0)
        rawinput_available = 1;
     return 1;
@@ -471,8 +472,8 @@ static int initialize_rawinput (void)
 error:
     write_log ("RAWINPUT not available or failed to initialize\n");
 error2:
-    free (ridl);
-    free (buf);
+    xfree (ridl);
+    xfree (buf);
     return 0;
 }
 
@@ -623,10 +624,10 @@ void handle_rawinput (LPARAM lParam)
 
     if (!rawinput_available)
        return;
-    pGetRawInputData((HRAWINPUT)lParam, RID_INPUT, NULL, &dwSize, sizeof(RAWINPUTHEADER));
+    pGetRawInputData ((HRAWINPUT)lParam, RID_INPUT, NULL, &dwSize, sizeof (RAWINPUTHEADER));
     if (dwSize >= sizeof (lpb))
        return;
-    if (pGetRawInputData((HRAWINPUT)lParam, RID_INPUT, lpb, &dwSize, sizeof(RAWINPUTHEADER)) != dwSize )
+    if (pGetRawInputData ((HRAWINPUT)lParam, RID_INPUT, lpb, &dwSize, sizeof (RAWINPUTHEADER)) != dwSize )
        return;
     raw = (RAWINPUT*)lpb;
     handle_rawinput_2 (raw);
@@ -637,7 +638,7 @@ static void unacquire (LPDIRECTINPUTDEVICE8 lpdi, char *txt)
 {
     if (lpdi) {
        HRESULT hr = IDirectInputDevice8_Unacquire (lpdi);
-       if (hr != DI_OK && hr != DI_NOEFFECT)
+       if (FAILED (hr) && hr != DI_NOEFFECT)
            write_log ("unacquire %s failed, %s\n", txt, DXError (hr));
     }
 }
@@ -646,11 +647,11 @@ static int acquire (LPDIRECTINPUTDEVICE8 lpdi, char *txt)
     HRESULT hr = DI_OK;
     if (lpdi) {
        hr = IDirectInputDevice8_Acquire (lpdi);
-       if (hr != DI_OK && hr != 0x80070005) {
+       if (FAILED (hr) && hr != 0x80070005) {
            write_log ("acquire %s failed, %s\n", txt, DXError (hr));
        }
     }
-    return hr == DI_OK ? 1 : 0;
+    return SUCCEEDED (hr) ? 1 : 0;
 }
 
 static int setcoop (LPDIRECTINPUTDEVICE8 lpdi, DWORD mode, char *txt)
@@ -658,10 +659,10 @@ static int setcoop (LPDIRECTINPUTDEVICE8 lpdi, DWORD mode, char *txt)
     HRESULT hr = DI_OK;
     if (lpdi && hMainWnd) {
        hr = IDirectInputDevice8_SetCooperativeLevel (lpdi, hMainWnd, mode);
-       if (hr != DI_OK && hr != E_NOTIMPL)
+       if (FAILED (hr) && hr != E_NOTIMPL)
            write_log ("setcooperativelevel %s failed, %s\n", txt, DXError (hr));
     }
-    return hr == DI_OK ? 1 : 0;
+    return SUCCEEDED (hr) ? 1 : 0;
 }
 
 static void sortdd (struct didata *dd, int num, int type)
@@ -1047,8 +1048,8 @@ static int init_mouse (void)
        did = &di_mouse[i];
        if (!did->disabled && did->connection == DIDC_DX) {
            hr = IDirectInput8_CreateDevice (g_lpdi, &did->guid, &lpdi, NULL);
-           if (hr == DI_OK) {
-               hr = IDirectInputDevice8_SetDataFormat(lpdi, &c_dfDIMouse);
+           if (SUCCEEDED (hr)) {
+               hr = IDirectInputDevice8_SetDataFormat (lpdi, &c_dfDIMouse);
                IDirectInputDevice8_EnumObjects (lpdi, EnumObjectsCallback, (void*)did, DIDFT_ALL);
                fixbuttons (did);
                fixthings_mouse (did);
@@ -1095,7 +1096,7 @@ static int acquire_mouse (int num, int flags)
        dipdw.diph.dwHow = DIPH_DEVICE;
        dipdw.dwData = DI_BUFFER;
        hr = IDirectInputDevice8_SetProperty (lpdi, DIPROP_BUFFERSIZE, &dipdw.diph);
-       if (hr != DI_OK)
+       if (FAILED (hr))
            write_log ("mouse setpropertry failed, %s\n", DXError (hr));
        di_mouse[num].acquired = acquire (lpdi, "mouse") ? 1 : -1;
     } else {
@@ -1141,6 +1142,9 @@ static void read_mouse (void)
     HRESULT hr;
     int i, j, k;
     int fs = isfullscreen() > 0 ? 1 : 0;
+   
+    if (IGNOREEVERYTHING)
+       return;
 
     for (i = 0; i < MAX_INPUT_DEVICES; i++) {
        struct didata *did = &di_mouse[i];
@@ -1148,16 +1152,16 @@ static void read_mouse (void)
        if (!did->acquired)
            continue;
        if (did->connection == DIDC_CAT) {
-           if (getmousestate(i)) {
+           if (getmousestate (i)) {
                int cx, cy, cbuttons;
-               if (catweasel_read_mouse(did->catweasel, &cx, &cy, &cbuttons)) {
+               if (catweasel_read_mouse (did->catweasel, &cx, &cy, &cbuttons)) {
                    if (cx)
-                       setmousestate(i, 0, cx, 0);
+                       setmousestate (i, 0, cx, 0);
                    if (cy)
-                       setmousestate(i, 1, cy, 0);
-                   setmousebuttonstate(i, 0, cbuttons & 8);
-                   setmousebuttonstate(i, 1, cbuttons & 4);
-                   setmousebuttonstate(i, 2, cbuttons & 2);
+                       setmousestate (i, 1, cy, 0);
+                   setmousebuttonstate (i, 0, cbuttons & 8);
+                   setmousebuttonstate (i, 1, cbuttons & 4);
+                   setmousebuttonstate (i, 2, cbuttons & 2);
                }
            }
            continue;
@@ -1166,7 +1170,7 @@ static void read_mouse (void)
            continue;
        elements = DI_BUFFER;
        hr = IDirectInputDevice8_GetDeviceData (lpdi, sizeof (DIDEVICEOBJECTDATA), didod, &elements, 0);
-       if (hr == DI_OK || hr == DI_BUFFEROVERFLOW) {
+       if (SUCCEEDED (hr) || hr == DI_BUFFEROVERFLOW) {
            if (supermouse && !did->superdevice)
                continue;
            for (j = 0; j < elements; j++) {
@@ -1208,7 +1212,7 @@ static void read_mouse (void)
                        if (isfullscreen () > 0)
                            minimizewindow ();
                        if (mouseactive)
-                           setmouseactive(0);
+                           setmouseactive (0);
                    }
                }
            }
@@ -1301,7 +1305,7 @@ static uae_u32 get_leds (void)
 
        memset (&InputBuffer, 0, sizeof (InputBuffer));
        memset (&OutputBuffer, 0, sizeof (OutputBuffer));
-       if (!DeviceIoControl(kbhandle, IOCTL_KEYBOARD_QUERY_INDICATORS,
+       if (!DeviceIoControl (kbhandle, IOCTL_KEYBOARD_QUERY_INDICATORS,
            &InputBuffer, DataLength, &OutputBuffer, DataLength, &ReturnedLength, NULL))
            return 0;
        led = 0;
@@ -1338,11 +1342,11 @@ static void kbevt (uae_u8 vk, uae_u8 sc)
 static void set_leds (uae_u32 led)
 {
     if (currprefs.win32_kbledmode) {
-       if((oldusbleds & KBLED_NUMLOCK) != (led & KBLED_NUMLOCK))
+       if ((oldusbleds & KBLED_NUMLOCK) != (led & KBLED_NUMLOCK))
            kbevt (VK_NUMLOCK, 0x45);
-       if((oldusbleds & KBLED_CAPSLOCK) != (led & KBLED_CAPSLOCK))
+       if ((oldusbleds & KBLED_CAPSLOCK) != (led & KBLED_CAPSLOCK))
            kbevt (VK_CAPITAL, 0x3a);
-       if((oldusbleds & KBLED_SCROLLLOCK) != (led & KBLED_SCROLLLOCK))
+       if ((oldusbleds & KBLED_SCROLLLOCK) != (led & KBLED_SCROLLLOCK))
            kbevt (VK_SCROLL, 0x46);
        oldusbleds = led;
     } else if (kbhandle != INVALID_HANDLE_VALUE) {
@@ -1358,7 +1362,7 @@ static void set_leds (uae_u32 led)
            InputBuffer.LedFlags |= KEYBOARD_CAPS_LOCK_ON;
        if (led & KBLED_SCROLLLOCK)
            InputBuffer.LedFlags |= KEYBOARD_SCROLL_LOCK_ON;
-       if (!DeviceIoControl(kbhandle, IOCTL_KEYBOARD_SET_INDICATORS,
+       if (!DeviceIoControl (kbhandle, IOCTL_KEYBOARD_SET_INDICATORS,
            &InputBuffer, DataLength, NULL, 0, &ReturnedLength, NULL))
                write_log ("kbleds: DeviceIoControl() failed %d\n", GetLastError());
 #endif
@@ -1406,18 +1410,18 @@ static int init_kb (void)
        struct didata *did = &di_keyboard[i];
        if (!did->disabled && did->connection == DIDC_DX) {
            hr = IDirectInput8_CreateDevice (g_lpdi, &did->guid, &lpdi, NULL);
-           if (hr == DI_OK) {
-               hr = IDirectInputDevice8_SetDataFormat(lpdi, &c_dfDIKeyboard);
-               if (hr != DI_OK)
+           if (SUCCEEDED (hr)) {
+               hr = IDirectInputDevice8_SetDataFormat (lpdi, &c_dfDIKeyboard);
+               if (FAILED (hr))
                    write_log ("keyboard setdataformat failed, %s\n", DXError (hr));
                memset (&dipdw, 0, sizeof (dipdw));
-               dipdw.diph.dwSize = sizeof(DIPROPDWORD);
-               dipdw.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+               dipdw.diph.dwSize = sizeof (DIPROPDWORD);
+               dipdw.diph.dwHeaderSize = sizeof (DIPROPHEADER);
                dipdw.diph.dwObj = 0;
                dipdw.diph.dwHow = DIPH_DEVICE;
                dipdw.dwData = DI_KBBUFFER;
                hr = IDirectInputDevice8_SetProperty (lpdi, DIPROP_BUFFERSIZE, &dipdw.diph);
-               if (hr != DI_OK)
+               if (FAILED (hr))
                    write_log ("keyboard setpropertry failed, %s\n", DXError (hr));
                IDirectInputDevice8_EnumObjects (lpdi, EnumObjectsCallback, (void*)did, DIDFT_ALL);
                sortobjects (did, did->axismappings, did->axissort, did->axisname, did->axistype, did->axles);
@@ -1428,7 +1432,7 @@ static int init_kb (void)
        }
     }
     keyboard_german = 0;
-    if ((LOWORD(GetKeyboardLayout(0)) & 0x3ff) == 7)
+    if ((LOWORD(GetKeyboardLayout (0)) & 0x3ff) == 7)
        keyboard_german = 1;
     return 1;
 }
@@ -1484,7 +1488,7 @@ static int refresh_kb (LPDIRECTINPUTDEVICE8 lpdi, int num)
     uae_u8 kc[256];
 
     hr = IDirectInputDevice8_GetDeviceState (lpdi, sizeof (kc), kc);
-    if (hr == DI_OK) {
+    if (SUCCEEDED (hr)) {
        for (i = 0; i < sizeof (kc); i++) {
            if (i == 0x80) /* USB KB led causes this, better ignore it */
                continue;
@@ -1604,6 +1608,9 @@ static void read_kb (void)
     LPDIRECTINPUTDEVICE8 lpdi;
     int i, j;
 
+    if (IGNOREEVERYTHING)
+       return;
+
     update_leds ();
     for (i = 0; i < MAX_INPUT_DEVICES; i++) {
        struct didata *did = &di_keyboard[i];
@@ -1618,8 +1625,8 @@ static void read_kb (void)
            kb_do_refresh &= ~(1 << i);
        }
        elements = DI_KBBUFFER;
-       hr = IDirectInputDevice8_GetDeviceData(lpdi, sizeof(DIDEVICEOBJECTDATA), didod, &elements, 0);
-       if (hr == DI_OK || hr == DI_BUFFEROVERFLOW) {
+       hr = IDirectInputDevice8_GetDeviceData (lpdi, sizeof(DIDEVICEOBJECTDATA), didod, &elements, 0);
+       if (SUCCEEDED (hr) || hr == DI_BUFFEROVERFLOW) {
            if (did->superdevice && (normalkb || rawkb))
                continue;
            for (j = 0; j < elements; j++) {
@@ -1684,7 +1691,7 @@ void wait_keyrelease (void)
                continue;
            nok++;
            hr = IDirectInputDevice8_GetDeviceState (lpdi, sizeof (dis), &dis);
-           if (hr == DI_OK) {
+           if (SUCCEEDED (hr)) {
                for (j = 0; j < 4; j++) {
                    if (dis.rgbButtons[j] & 0x80) break;
                }
@@ -1710,7 +1717,7 @@ static int acquire_kb (int num, int flags)
 #ifdef WINDDK
        if (!currprefs.win32_kbledmode) {
            if (DefineDosDevice (DDD_RAW_TARGET_PATH, "Kbd","\\Device\\KeyboardClass0")) {
-               kbhandle = CreateFile("\\\\.\\Kbd", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
+               kbhandle = CreateFile ("\\\\.\\Kbd", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
                if (kbhandle == INVALID_HANDLE_VALUE) {
                    write_log ("kbled: CreateFile failed, error %d\n", GetLastError());
                    currprefs.win32_kbledmode = 1;
@@ -1763,7 +1770,7 @@ static void unacquire_kb (int num)
        }
 #ifdef WINDDK
        if (kbhandle != INVALID_HANDLE_VALUE) {
-           CloseHandle(kbhandle);
+           CloseHandle (kbhandle);
            DefineDosDevice (DDD_REMOVE_DEFINITION, "Kbd", NULL);
            kbhandle = INVALID_HANDLE_VALUE;
        }
@@ -1841,22 +1848,25 @@ static void read_joystick (void)
     HRESULT hr;
     int i, j, k;
 
+    if (IGNOREEVERYTHING)
+       return;
+
     for (i = 0; i < MAX_INPUT_DEVICES; i++) {
        struct didata *did = &di_joystick[i];
        if (!did->acquired)
            continue;
        if (did->connection == DIDC_CAT) {
-           if (getjoystickstate(i)) {
+           if (getjoystickstate (i)) {
                /* only read CW state if it is really needed */
                uae_u8 cdir, cbuttons;
-               if (catweasel_read_joystick(&cdir, &cbuttons)) {
+               if (catweasel_read_joystick (&cdir, &cbuttons)) {
                    cdir >>= did->catweasel * 4;
                    cbuttons >>= did->catweasel * 4;
-                   setjoystickstate(i, 0, !(cdir & 1) ? 1 : !(cdir & 2) ? -1 : 0, 0);
-                   setjoystickstate(i, 1, !(cdir & 4) ? 1 : !(cdir & 8) ? -1 : 0, 0);
-                   setjoybuttonstate(i, 0, cbuttons & 8);
-                   setjoybuttonstate(i, 1, cbuttons & 4);
-                   setjoybuttonstate(i, 2, cbuttons & 2);
+                   setjoystickstate (i, 0, !(cdir & 1) ? 1 : !(cdir & 2) ? -1 : 0, 0);
+                   setjoystickstate (i, 1, !(cdir & 4) ? 1 : !(cdir & 8) ? -1 : 0, 0);
+                   setjoybuttonstate (i, 0, cbuttons & 8);
+                   setjoybuttonstate (i, 1, cbuttons & 4);
+                   setjoybuttonstate (i, 2, cbuttons & 2);
                }
            }
            continue;
@@ -1866,7 +1876,7 @@ static void read_joystick (void)
            continue;
        elements = DI_BUFFER;
        hr = IDirectInputDevice8_GetDeviceData (lpdi, sizeof (DIDEVICEOBJECTDATA), didod, &elements, 0);
-       if (hr == DI_OK || hr == DI_BUFFEROVERFLOW) {
+       if (SUCCEEDED (hr) || hr == DI_BUFFEROVERFLOW) {
            for (j = 0; j < elements; j++) {
                int dimofs = didod[j].dwOfs;
                int data = didod[j].dwData;
@@ -1959,9 +1969,9 @@ static int init_joystick (void)
        did = &di_joystick[i];
        if (!did->disabled && did->connection == DIDC_DX) {
            hr = IDirectInput8_CreateDevice (g_lpdi, &did->guid, &lpdi, NULL);
-           if (hr == DI_OK) {
-               hr = IDirectInputDevice8_SetDataFormat(lpdi, &c_dfDIJoystick);
-               if (hr == DI_OK) {
+           if (SUCCEEDED (hr)) {
+               hr = IDirectInputDevice8_SetDataFormat (lpdi, &c_dfDIJoystick);
+               if (SUCCEEDED (hr)) {
                    did->lpdi = lpdi;
                    IDirectInputDevice8_EnumObjects (lpdi, EnumObjectsCallback, (void*)did, DIDFT_ALL);
                    fixbuttons (did);
@@ -2002,14 +2012,14 @@ static int acquire_joystick (int num, int flags)
     if (di_joystick[num].connection == DIDC_DX && lpdi) {
        setcoop (lpdi, flags ? (DISCL_FOREGROUND | DISCL_EXCLUSIVE) : (DISCL_BACKGROUND | DISCL_NONEXCLUSIVE), "joystick");
        memset (&dipdw, 0, sizeof (dipdw));
-       dipdw.diph.dwSize = sizeof(DIPROPDWORD);
-       dipdw.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+       dipdw.diph.dwSize = sizeof (DIPROPDWORD);
+       dipdw.diph.dwHeaderSize = sizeof (DIPROPHEADER);
        dipdw.diph.dwObj = 0;
        dipdw.diph.dwHow = DIPH_DEVICE;
        dipdw.dwData = DI_BUFFER;
        hr = IDirectInputDevice8_SetProperty (lpdi, DIPROP_BUFFERSIZE, &dipdw.diph);
-       if (hr != DI_OK)
-       write_log ("joystick setproperty failed, %s\n", DXError (hr));
+       if (FAILED (hr))
+           write_log ("joystick setproperty failed, %s\n", DXError (hr));
        di_joystick[num].acquired = acquire (lpdi, "joystick") ? 1 : -1;
     } else {
        di_joystick[num].acquired = 1;
index afe1d034fbb1e49da42ff9896526b299b599e3e3..e4aaf9e9963587d9911445ec8aaf4833802e0e56 100755 (executable)
@@ -111,21 +111,21 @@ static int restoredeviceobjects(void)
     hr = IDirect3DSurface9_Release (bb);
 
     // Set up the texture
-    hr = IDirect3DDevice9_SetTextureStageState(d3ddev, 0, D3DTSS_COLOROP,   D3DTOP_MODULATE);
-    hr = IDirect3DDevice9_SetTextureStageState(d3ddev, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
-    hr = IDirect3DDevice9_SetTextureStageState(d3ddev, 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
+    hr = IDirect3DDevice9_SetTextureStageState (d3ddev, 0, D3DTSS_COLOROP,   D3DTOP_MODULATE);
+    hr = IDirect3DDevice9_SetTextureStageState (d3ddev, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
+    hr = IDirect3DDevice9_SetTextureStageState (d3ddev, 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
 
     // Set miscellaneous render states
-    hr = IDirect3DDevice9_SetRenderState(d3ddev, D3DRS_DITHERENABLE, TRUE);
-    hr = IDirect3DDevice9_SetRenderState(d3ddev, D3DRS_ZENABLE, FALSE);
+    hr = IDirect3DDevice9_SetRenderState (d3ddev, D3DRS_DITHERENABLE, TRUE);
+    hr = IDirect3DDevice9_SetRenderState (d3ddev, D3DRS_ZENABLE, FALSE);
 
     // Set the projection matrix
     aspect = ((FLOAT)dsdbb.Width) / dsdbb.Height;
     xD3DXMatrixPerspectiveFovLH (&matrix, D3DX_PI/4, aspect, 1.0f, 100.0f);
-    hr = IDirect3DDevice9_SetTransform(d3ddev, D3DTS_PROJECTION, &matrix);
+    hr = IDirect3DDevice9_SetTransform (d3ddev, D3DTS_PROJECTION, &matrix);
 
     // turn off lighting
-    hr = IDirect3DDevice9_SetRenderState(d3ddev, D3DRS_LIGHTING, FALSE);
+    hr = IDirect3DDevice9_SetRenderState (d3ddev, D3DRS_LIGHTING, FALSE);
 
     switch (currprefs.gfx_filter_filtermode & 1)
     {
@@ -137,12 +137,12 @@ static int restoredeviceobjects(void)
        v = D3DTEXF_LINEAR;
        break;
     }
-    hr = IDirect3DDevice9_SetSamplerState(d3ddev, 0, D3DSAMP_MAGFILTER, v);
-    hr = IDirect3DDevice9_SetSamplerState(d3ddev, 0, D3DSAMP_MINFILTER, v);
+    hr = IDirect3DDevice9_SetSamplerState (d3ddev, 0, D3DSAMP_MAGFILTER, v);
+    hr = IDirect3DDevice9_SetSamplerState (d3ddev, 0, D3DSAMP_MINFILTER, v);
     return 1;
 }
 
-static LPDIRECT3DTEXTURE9 createtext(int *ww, int *hh, D3DFORMAT format)
+static LPDIRECT3DTEXTURE9 createtext (int *ww, int *hh, D3DFORMAT format)
 {
     LPDIRECT3DTEXTURE9 t;
     HRESULT hr;
@@ -171,7 +171,7 @@ static LPDIRECT3DTEXTURE9 createtext(int *ww, int *hh, D3DFORMAT format)
     else
        h = 4096;
 
-    hr = IDirect3DDevice9_CreateTexture(d3ddev, w, h, 1, 0, format, D3DPOOL_MANAGED, &t, NULL);
+    hr = IDirect3DDevice9_CreateTexture (d3ddev, w, h, 1, 0, format, D3DPOOL_MANAGED, &t, NULL);
     if (FAILED (hr)) {
        write_log ("DIDirect3DDevice9_CreateTexture failed: %s\n", D3D_ErrorString (hr));
        return 0;
@@ -188,7 +188,7 @@ static int createtexture (int w, int h)
     UINT ww = w;
     UINT hh = h;
 
-    texture = createtext(&ww, &hh, tformat);
+    texture = createtext (&ww, &hh, tformat);
     if (!texture)
        return 0;
     twidth = ww;
@@ -202,7 +202,7 @@ static int createsltexture (void)
     UINT ww = required_sl_texture_w;
     UINT hh = required_sl_texture_h;
 
-    sltexture = createtext(&ww, &hh, D3DFMT_A4R4G4B4);
+    sltexture = createtext (&ww, &hh, D3DFMT_A4R4G4B4);
     if (!sltexture)
        return 0;
     required_sl_texture_w = ww;
@@ -237,7 +237,7 @@ static void createscanlines (int force)
     l1 = currprefs.gfx_filter_scanlineratio & 15;
     l2 = currprefs.gfx_filter_scanlineratio >> 4;
 
-    hr = IDirect3DTexture9_LockRect(sltexture, 0, &locked, NULL, D3DLOCK_DISCARD);
+    hr = IDirect3DTexture9_LockRect (sltexture, 0, &locked, NULL, D3DLOCK_DISCARD);
     if (FAILED (hr)) {
        write_log ("SL IDirect3DTexture9_LockRect failed: %s\n", D3D_ErrorString (hr));
        return;
@@ -259,11 +259,11 @@ static void createscanlines (int force)
     IDirect3DTexture9_UnlockRect (sltexture, 0);
     if (scanlines_ok) {
        /* enable alpha blending for scanlines */
-       IDirect3DDevice9_SetRenderState(d3ddev, D3DRS_ALPHABLENDENABLE, TRUE);
-       IDirect3DDevice9_SetRenderState(d3ddev, D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
-       IDirect3DDevice9_SetRenderState(d3ddev, D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
+       IDirect3DDevice9_SetRenderState (d3ddev, D3DRS_ALPHABLENDENABLE, TRUE);
+       IDirect3DDevice9_SetRenderState (d3ddev, D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
+       IDirect3DDevice9_SetRenderState (d3ddev, D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
     } else {
-       IDirect3DDevice9_SetRenderState(d3ddev, D3DRS_ALPHABLENDENABLE, FALSE);
+       IDirect3DDevice9_SetRenderState (d3ddev, D3DRS_ALPHABLENDENABLE, FALSE);
     }
 }
 
@@ -298,8 +298,8 @@ const char *D3D_init (HWND ahwnd, int w_w, int w_h, int t_w, int t_h, int depth)
        return errmsg;
     }
 
-    IDirect3D9_GetAdapterDisplayMode(d3d, adapter, &mode);
-    IDirect3D9_GetDeviceCaps(d3d, adapter, D3DDEVTYPE_HAL, &d3dCaps);
+    IDirect3D9_GetAdapterDisplayMode (d3d, adapter, &mode);
+    IDirect3D9_GetDeviceCaps (d3d, adapter, D3DDEVTYPE_HAL, &d3dCaps);
 
     memset (&dpp, 0, sizeof (dpp));
     dpp.Windowed = isfullscreen() <= 0;
@@ -326,7 +326,7 @@ const char *D3D_init (HWND ahwnd, int w_w, int w_h, int t_w, int t_h, int depth)
 
     ret = IDirect3D9_CreateDevice (d3d, adapter, D3DDEVTYPE_HAL, ahwnd,
        USAGE, &dpp, &d3ddev);
-    if(FAILED(ret)) {
+    if(FAILED (ret)) {
        sprintf (errmsg, "CreateDevice failed, %s\n", D3D_ErrorString (ret));
        D3D_free ();
        return errmsg;
@@ -504,7 +504,7 @@ void D3D_unlocktexture (void)
     BlitRect (d3ddev, texture, x, y, sx, sy, 0xffffff, 0.1f);
     if (scanlines_ok)
        BlitRect (d3ddev, sltexture, 0, 0, required_sl_texture_w, required_sl_texture_h, 0xffffff, 0.2f);
-    IDirect3DDevice9_EndScene(d3ddev);
+    IDirect3DDevice9_EndScene (d3ddev);
     IDirect3DDevice9_Present (d3ddev, 0, 0, 0 ,0);
     if (vsync2)
        D3D_render ();
index c63fa5afaa84033c8d28e83f52991f74f2fa3af4..2b82ce80bf54326fa7cf25ec6b1aecde2e0e576f 100755 (executable)
@@ -25,7 +25,6 @@ HRESULT DirectDraw_GetDisplayMode (void)
     return ddrval;
 }
 
-
 #define releaser(x, y) if (x) { y (x); x = NULL; }
 
 static LPDIRECTDRAWSURFACE7 getlocksurface (void)
@@ -46,6 +45,7 @@ static void freemainsurface (void)
     releaser (dxdata.flipping[0], IDirectDrawSurface7_Release);
     releaser (dxdata.primary, IDirectDrawSurface7_Release);
     releaser (dxdata.secondary, IDirectDrawSurface7_Release);
+    releaser (dxdata.cursorsurface, IDirectDrawSurface7_Release);
     dxdata.backbuffers = 0;
 }
 
@@ -171,13 +171,18 @@ LPDIRECTDRAWSURFACE7 allocsurface (int width, int height)
 {
     LPDIRECTDRAWSURFACE7 s;
     int mode = ddforceram;
+    static int failednonlocal;
 
+    if (failednonlocal && mode == DDFORCED_NONLOCAL)
+       mode = DDFORCED_DEFAULT;
     for (;;) {
        s = allocsurface_2 (width, height, NULL, 0, mode);
        if (s) {
            clearsurf (s);
            return s;
        }
+       if (mode == DDFORCED_NONLOCAL)
+           failednonlocal = 1;
        mode++;
        if (mode >= 4)
            mode = 0;
@@ -201,6 +206,37 @@ void DirectDraw_FreeMainSurface (void)
     freemainsurface ();
 }
 
+STATIC_INLINE uae_u16 rgb32torgb16pc (uae_u32 rgb)
+{
+    return (((rgb >> (16 + 3)) & 0x1f) << 11) | (((rgb >> (8 + 2)) & 0x3f) << 5) | (((rgb >> (0 + 3)) & 0x1f) << 0);
+}
+
+static void createcursorsurface (void)
+{
+    HRESULT ddrval;
+    DDSURFACEDESC2 desc = { 0 };
+    DWORD mask = 0xff00fe;
+
+    dxdata.cursorsurface = NULL;
+    desc.dwSize = sizeof desc;
+    desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CKSRCBLT;
+    desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;
+    desc.dwWidth = dxdata.cursorwidth;
+    desc.dwHeight = dxdata.cursorheight * 2;
+    DirectDraw_GetPrimaryPixelFormat (&desc);
+    if (desc.ddpfPixelFormat.dwRGBBitCount == 16)
+       mask = rgb32torgb16pc (mask);
+    else if (desc.ddpfPixelFormat.dwRGBBitCount == 8)
+       mask = 16;
+    dxdata.colorkey = mask;
+    desc.ddckCKSrcBlt.dwColorSpaceLowValue = mask;
+    desc.ddckCKSrcBlt.dwColorSpaceHighValue = mask;
+    ddrval = IDirectDraw7_CreateSurface (dxdata.maindd, &desc, &dxdata.cursorsurface, NULL);
+    if (FAILED(ddrval))
+       write_log ("Cursor surface creation failed: %s\n", DXError (ddrval));
+    clearsurf (dxdata.cursorsurface);
+}
+
 HRESULT DirectDraw_CreateMainSurface (int width, int height)
 {
     HRESULT ddrval;
@@ -242,6 +278,7 @@ HRESULT DirectDraw_CreateMainSurface (int width, int height)
         write_log ("IDirectDraw7_CreateSurface: %s\n", DXError (ddrval));
         return ddrval;
     }
+    dxdata.native.dwSize = sizeof (DDSURFACEDESC2);
     ddrval = IDirectDrawSurface7_GetSurfaceDesc (dxdata.primary, &dxdata.native);
     if (FAILED (ddrval))
        write_log ("IDirectDrawSurface7_GetSurfaceDesc: %s\n", DXError (ddrval));
@@ -259,6 +296,8 @@ HRESULT DirectDraw_CreateMainSurface (int width, int height)
            dxdata.pitch = desc.lPitch;
            unlocksurface (surf);
        }
+       createcursorsurface ();
+
     } else {
        ddrval = DD_FALSE;
     }
@@ -617,7 +656,7 @@ static void DirectDraw_Blt (LPDIRECTDRAWSURFACE7 dst, RECT *dstrect, LPDIRECTDRA
        return;
     while (FAILED(ddrval = IDirectDrawSurface7_Blt (dst, dstrect, src, srcrect, DDBLT_ROP | DDBLT_WAIT, &fx))) {
        if (ddrval == DDERR_SURFACELOST) {
-           ddrval = restoresurface (dst);
+           ddrval = restoresurface_2 (dst);
            if (FAILED (ddrval))
                break;
        } else if (ddrval != DDERR_SURFACEBUSY) {
@@ -666,19 +705,12 @@ static void flip (void)
     int result = 0;
     HRESULT ddrval = DD_OK;
     DWORD flags = DDFLIP_WAIT;
-    static int skip;
 
     if (dxdata.backbuffers == 2) {
         DirectDraw_Blit (dxdata.flipping[1], dxdata.flipping[0]);
        if (currprefs.gfx_avsync) {
            if (vblank_skip >= 0) {
-               skip++;
-               if (vblank_skip > skip) {
-                   ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags | DDFLIP_NOVSYNC);
-               } else {
-                   skip = 0;
-                   ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
-               }
+               ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
            } else {
                if (flipinterval_supported) {
                    ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags | DDFLIP_INTERVAL2);
@@ -795,6 +827,8 @@ int DirectDraw_Start (GUID *guid)
        return 0;
     }
 
+    dxdata.cursorwidth = 64;
+    dxdata.cursorheight = 64;
     dxdata.maxwidth = 16384;
     dxdata.maxheight = 16384;
     d3d = Direct3DCreate9 (D3D9b_SDK_VERSION);
index c6458916c621efbefb1577b89fd092cdbff127e0..6caaa45dda2aedca382469412b8ec396118b980c 100755 (executable)
@@ -25,6 +25,10 @@ struct ddstuff
     DWORD pitch;
     HWND hwnd;
     int maxwidth, maxheight;
+    uae_u32 colorkey;
+
+    LPDIRECTDRAWSURFACE7 cursorsurface;
+    int cursorwidth, cursorheight;
 };
 extern struct ddstuff dxdata;
 
index d35f4392adff5e60ffc7686dd23bfc052705f125..04ee241bce72ceddf530a5d02ca194a67cc62f50 100755 (executable)
@@ -67,7 +67,7 @@ int ioport_init (void)
                break;
            }
            if (!pIsDriverOpened()) {
-               write_log ("IO: tvicport.dll failed to initialized!\n");
+               write_log ("IO: tvicport.dll failed to initialize!\n");
                pCloseTVicPort();
                break;
            }
@@ -131,7 +131,7 @@ uae_u8 ioport_read (int port)
     else if (initialized == 2)
        pGetPortVal (port, &v, 1);
 #endif
-    io_log ("ioport_read %04.4X returned %02.2X\n", port, v);
+    io_log ("ioport_read %04X returned %02X\n", port, v);
     return (uae_u8)v;
 }
 
@@ -143,7 +143,7 @@ void ioport_write (int port, uae_u8 v)
     else if (initialized == 2)
        pSetPortVal (port, v, 1);
 #endif
-    io_log ("ioport_write %04.4X %02.2X\n", port, v);
+    io_log ("ioport_write %04X %02X\n", port, v);
 }
 
 
@@ -267,10 +267,10 @@ int parallel_direct_write_status (uae_u8 v, uae_u8 dir)
     if ((dir & 4) && !(v & 4))
        c[0].Control |= PARAPORT_MASK_CONTROL_SELECTIN;
     if (!pp_executecycle (pport, c, 1)) {
-       write_log ("PARAPORT: write executeCycle failed, CTL=%02.2X DIR=%02.2X\n", v & 7, dir & 7);
+       write_log ("PARAPORT: write executeCycle failed, CTL=%02X DIR=%02X\n", v & 7, dir & 7);
        return 0;
     }
-    para_log ("PARAPORT: write CTL=%02.2X DIR=%02.2X\n", v & 7, dir & 7);
+    para_log ("PARAPORT: write CTL=%02X DIR=%02X\n", v & 7, dir & 7);
     return ok;
 }
 
@@ -303,7 +303,7 @@ int parallel_direct_read_status (uae_u8 *vp)
     } else {
        oldack = 0;
     }
-    para_log ("PARAPORT: read CTL=%02.2X\n", v);
+    para_log ("PARAPORT: read CTL=%02X\n", v);
     v &= 7;
     *vp &= ~7;
     *vp |= v;
@@ -318,7 +318,7 @@ int parallel_direct_write_data (uae_u8 v, uae_u8 dir)
     if (!pport)
        return 0;
     if (dir != 0xff) {
-       write_log ("PARAPORT: unsupported mixed i/o attempted, DATA=%02.2X DIR=%02.2X, ignored\n", v, dir);
+       write_log ("PARAPORT: unsupported mixed i/o attempted, DATA=%02X DIR=%02X, ignored\n", v, dir);
        return 0;
     }
     memset (c, 0, 3 * sizeof (PARAPORT_CYCLE));
@@ -333,10 +333,10 @@ int parallel_direct_write_data (uae_u8 v, uae_u8 dir)
     c[2].MaskControl = PARAPORT_MASK_CONTROL_STROBE;
 
     if (!pp_executecycle (pport, c, 3)) {
-       write_log ("PARAPORT: write executeCycle failed, data=%02.2X\n", v);
+       write_log ("PARAPORT: write executeCycle failed, data=%02X\n", v);
        return 0;
     }
-    para_log ("PARAPORT: write DATA=%02.2X\n", v);
+    para_log ("PARAPORT: write DATA=%02X\n", v);
     return 1;
 }
 
@@ -364,7 +364,7 @@ int parallel_direct_read_data (uae_u8 *v)
        return 0;
     }
     *v = c[0].Data;
-    para_log ("PARAPORT: read DATA=%02.2X\n", v);
+    para_log ("PARAPORT: read DATA=%02X\n", v);
     return ok;
 }
 
index d6887eb2444aea05741ae6eebf46f8f5e06cb9b2..ebb25b2ca7a486a2aa419b715196d80136379741 100755 (executable)
@@ -185,7 +185,7 @@ static int specialkeycode (void)
 }
 static int specialpressed (void)
 {
-    return ispressed(specialkeycode());
+    return ispressed (specialkeycode ());
 }
 
 static int shiftpressed (void)
@@ -268,24 +268,24 @@ static int handlecdtv (int scancode, int state)
     switch (scancode)
     {
        case DIK_UP:
-       if (specialpressed())
+       if (specialpressed ())
            e = INPUTEVENT_KEY_CDTV_PLAYPAUSE;
        break;
        case DIK_DOWN:
-       if (specialpressed())
+       if (specialpressed ())
            e = INPUTEVENT_KEY_CDTV_STOP;
        break;
        case DIK_LEFT:
-       if (specialpressed()) {
-           if (shiftpressed())
+       if (specialpressed ()) {
+           if (shiftpressed ())
                e = INPUTEVENT_KEY_CDTV_REW;
            else
                e = INPUTEVENT_KEY_CDTV_PREV;
        }
        break;
        case DIK_RIGHT:
-       if (specialpressed()) {
-           if (shiftpressed())
+       if (specialpressed ()) {
+           if (shiftpressed ())
                e = INPUTEVENT_KEY_CDTV_FF;
            else
                e = INPUTEVENT_KEY_CDTV_NEXT;
@@ -346,15 +346,12 @@ static int np[] = { DIK_NUMPAD0, 0, DIK_NUMPADPERIOD, 0, DIK_NUMPAD1, 1, DIK_NUM
     DIK_NUMPAD3, 3, DIK_NUMPAD4, 4, DIK_NUMPAD5, 5, DIK_NUMPAD6, 6, DIK_NUMPAD7, 7,
     DIK_NUMPAD8, 8, DIK_NUMPAD9, 9, -1 };
 
-int filesys_insert(int nr, char *volume, char *rootdir, int readonly, int flags);
-int filesys_eject(int nr);
-
 void my_kbd_handler (int keyboard, int scancode, int newstate)
 {
     int code = 0;
     static int swapperdrive = 0;
 
-    if (scancode == specialkeycode())
+    if (scancode == specialkeycode ())
        return;
 
     //write_log ( "keyboard = %d scancode = 0x%02.2x state = %d\n", keyboard, scancode, newstate );
@@ -375,7 +372,7 @@ void my_kbd_handler (int keyboard, int scancode, int newstate)
            break;
            case DIK_F11:
            if (currprefs.win32_ctrl_F11_is_quit) {
-               if (ctrlpressed())
+               if (ctrlpressed ())
                    code = AKS_QUIT;
            }
            break;
@@ -453,7 +450,7 @@ void my_kbd_handler (int keyboard, int scancode, int newstate)
            }
            break;
            case DIK_SYSRQ:
-           screenshot (specialpressed() ? 1 : 0, 1);
+           screenshot (specialpressed () ? 1 : 0, 1);
            break;
            case DIK_PAUSE:
            if (specialpressed ()) {
@@ -490,7 +487,7 @@ void my_kbd_handler (int keyboard, int scancode, int newstate)
            break;
            case DIK_NUMPADSTAR:
            if (specialpressed ()) {
-               if (ctrlpressed())
+               if (ctrlpressed ())
                    code = AKS_MVOLMUTE;
                else
                    code = AKS_VOLMUTE;
@@ -508,7 +505,7 @@ void my_kbd_handler (int keyboard, int scancode, int newstate)
        return;
     }
 
-    if (!specialpressed() && scancode == DIK_CAPITAL) {
+    if (!specialpressed () && scancode == DIK_CAPITAL) {
        if (!newstate)
            return;
        capslockstate = capslockstate ? 0 : 1;
index 77b8aec4500f65e9679b69bf1349038dbe8caed1..379cf9645162d8c1798aec7f2c21f9a6ae58d5f2 100755 (executable)
@@ -24,8 +24,8 @@ static int old_pri;
 
 void lcd_close(void)
 {
-    lgLcdDeInit();
-    xfree(lbh);
+    lgLcdDeInit ();
+    xfree (lbh);
     lbh = NULL;
     bitmap = NULL;
     inited = 0;
@@ -41,7 +41,7 @@ static int lcd_init(void)
     int x, y;
 
     old_pri = 0;
-    ret = lgLcdInit();
+    ret = lgLcdInit ();
     if (ret != ERROR_SUCCESS) {
        if (ret == RPC_S_SERVER_UNAVAILABLE || ret == ERROR_OLD_WIN_VERSION) {
            write_log ("LCD: Logitech LCD system not detected\n");
@@ -54,13 +54,13 @@ static int lcd_init(void)
     cctx.appFriendlyName = "WinUAE";
     cctx.isPersistent = TRUE;
     cctx.isAutostartable = FALSE;
-    ret = lgLcdConnect(&cctx);
+    ret = lgLcdConnect (&cctx);
     if (ret != ERROR_SUCCESS) {
        write_log ("LCD: lgLcdConnect() returned %d\n", ret);
        lcd_close();
        return 0;
     }
-    ret = lgLcdEnumerate(cctx.connection, 0, &desc);
+    ret = lgLcdEnumerate (cctx.connection, 0, &desc);
     if (ret != ERROR_SUCCESS) {
        write_log ("LCD: lgLcdEnumerate() returned %d\n", ret);
        lcd_close();
@@ -73,7 +73,7 @@ static int lcd_init(void)
     memset (&octx, 0, sizeof (octx));
     octx.connection = cctx.connection;
     octx.index = 0;
-    ret = lgLcdOpen(&octx);
+    ret = lgLcdOpen (&octx);
     if (ret != ERROR_SUCCESS) {
        write_log ("LCD: lgLcdOpen() returned %d\n", ret);
        lcd_close();
@@ -81,18 +81,18 @@ static int lcd_init(void)
     }
     device = octx.device;
 
-    bmp = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_LCD160X43));
-    dc = CreateCompatibleDC(NULL);
+    bmp = LoadBitmap (hInst, MAKEINTRESOURCE(IDB_LCD160X43));
+    dc = CreateCompatibleDC (NULL);
     SelectObject(dc, bmp);
     GetObject (bmp, sizeof (binfo), &binfo);
     for (y = 0; y < binfo.bmHeight; y++) {
        for (x = 0; x < binfo.bmWidth; x++) {
-           bitmap[y * binfo.bmWidth + x] = GetPixel(dc, x, y) == 0 ? 0xff : 0;
+           bitmap[y * binfo.bmWidth + x] = GetPixel (dc, x, y) == 0 ? 0xff : 0;
        }
     }
     numbers = bitmap + desc.Width * desc.Height;
     memcpy (origbitmap, bitmap, desc.Width * desc.Height);
-    DeleteDC(dc);
+    DeleteDC (dc);
 
     write_log ("LCD: Logitech LCD system initialized\n");
     return 1;
@@ -137,8 +137,8 @@ static void putnumber(int x, int y, int n, int inv)
 
 static void putnumbers(int x, int y, int num, int inv)
 {
-    putnumber(x, y, num < 0 ? num : ((num / 10) > 0 ? num / 10 : -1), inv);
-    putnumber(x + numbers_width, y, num < 0 ? num : num % 10, inv);
+    putnumber (x, y, num < 0 ? num : ((num / 10) > 0 ? num / 10 : -1), inv);
+    putnumber (x + numbers_width, y, num < 0 ? num : num % 10, inv);
 }
 
 static int coords[] = {
@@ -153,7 +153,7 @@ void lcd_priority (int priority)
        return;
     if (old_pri == priority)
        return;
-    if (lgLcdSetAsLCDForegroundApp(device, priority ? LGLCD_LCD_FOREGROUND_APP_YES : LGLCD_LCD_FOREGROUND_APP_NO) == ERROR_SUCCESS)
+    if (lgLcdSetAsLCDForegroundApp (device, priority ? LGLCD_LCD_FOREGROUND_APP_YES : LGLCD_LCD_FOREGROUND_APP_NO) == ERROR_SUCCESS)
        old_pri = priority;
 }
 
@@ -165,7 +165,7 @@ void lcd_update(int led, int on)
        return;
 
     if (led < 0) {
-       lgLcdUpdateBitmap(device, lbh, LGLCD_PRIORITY_IDLE_NO_SHOW);
+       lgLcdUpdateBitmap (device, lbh, LGLCD_PRIORITY_IDLE_NO_SHOW);
        return;
     }
 
@@ -175,29 +175,29 @@ void lcd_update(int led, int on)
        track = gui_data.drive_track[led - 1];
        if (gui_data.drive_disabled[led - 1])
            track = -1;
-       putnumbers(x, y, track, on);
+       putnumbers (x, y, track, on);
     } else if (led == 0) {
-       dorect(&coords[4 * 2], on);
+       dorect (&coords[4 * 2], on);
     } else if (led == 5) {
-       dorect(&coords[4 * 1], on);
+       dorect (&coords[4 * 1], on);
     } else if (led == 6) {
-       dorect(&coords[4 * 0], on);
+       dorect (&coords[4 * 0], on);
     } else if (led == 7) {
        y = 2;
        x = 125;
-       putnumbers(x, y, gui_data.fps <= 999 ? (gui_data.fps + 5) / 10 : 99, 0);
+       putnumbers (x, y, gui_data.fps <= 999 ? (gui_data.fps + 5) / 10 : 99, 0);
     } else if (led == 8) {
        y = 2;
        x = 98;
-       putnumbers(x, y, gui_data.idle <= 999 ? gui_data.idle / 10 : 99, 0);
+       putnumbers (x, y, gui_data.idle <= 999 ? gui_data.idle / 10 : 99, 0);
     }
-    lgLcdUpdateBitmap(device, lbh, LGLCD_ASYNC_UPDATE(LGLCD_PRIORITY_NORMAL + 1));
+    lgLcdUpdateBitmap (device, lbh, LGLCD_ASYNC_UPDATE (LGLCD_PRIORITY_NORMAL + 1));
 }
 
 int lcd_open(void)
 {
     if (!inited) {
-       if (!lcd_init())
+       if (!lcd_init ())
            return 0;
        inited = 1;
     }
index 27e471436026c202d607486d9f79a585c4197117..326c3608ab773c01c827d2e44777dcf0b0775d0e 100755 (executable)
@@ -22,6 +22,7 @@ uae_u8 *natmem_offset, *natmem_offset_end;
 static uae_u8 *p96mem_offset;
 static int p96mem_size;
 static SYSTEM_INFO si;
+int maxmem;
 
 static void *virtualallocwithlock(LPVOID addr, SIZE_T size, DWORD allocationtype, DWORD protect)
 {
@@ -210,6 +211,10 @@ void preinit_shm (void)
        }
     }
     size64 = total64 - (total64 >> 3);
+    if (maxmem < 0)
+       size64 = 0x7f000000;
+    else if (maxmem > 0)
+       size64 = maxmem * 1024 * 1024;
     if (os_64bit) {
        if (size64 > 0x7f000000)
            size64 = 0x7f000000;
@@ -311,7 +316,7 @@ restart:
        memwatchtable = 0;
        if (currprefs.gfxmem_size) {
            if (!memwatchok) {
-               write_log ("GetWriteWatch() not supported, using guard pages, performance will be slower.\n");
+               write_log ("GetWriteWatch() not supported, using guard pages, RTG performance will be slower.\n");
                memwatchtable = xcalloc (currprefs.gfxmem_size / si.dwPageSize + 1, 1);
            }
        }
index 8a69ec144b28e6c41120b87bd56ae64287348a3c..0c42db4de185343a93bb05cbbcaf8dee34bba5c3 100755 (executable)
@@ -216,7 +216,7 @@ const char *OGL_init (HWND ahwnd, int w_w, int w_h, int t_w, int t_h, int depth)
 
        openglhdc = GetDC (hwnd);
 
-       if(!arbMultisampleSupported) {
+       if (!arbMultisampleSupported) {
            PixelFormat = ChoosePixelFormat (openglhdc, &pfd);  // Find A Compatible Pixel Format
            if (PixelFormat == 0) {                             // Did We Find A Compatible Format?
                strcpy (errmsg, "OPENGL: can't find suitable pixelformat");
@@ -255,7 +255,7 @@ const char *OGL_init (HWND ahwnd, int w_w, int w_h, int t_w, int t_h, int depth)
     glGetIntegerv (GL_MAX_TEXTURE_SIZE, &max_texture_size);
     required_texture_size = 2 << exact_log2 (t_width > t_height ? t_width : t_height);
     if (max_texture_size < t_width || max_texture_size < t_height) {
-       sprintf (errmsg, "OPENGL: %d * %d or bigger texture support required\nYour card's maximum texture size is only %d * %d",
+       sprintf (errmsg, "OPENGL: %d * %d or bigger texture support required\nYour gfx card's maximum texture size is only %d * %d",
            required_texture_size, required_texture_size, max_texture_size, max_texture_size);
        return errmsg;
     }
@@ -273,8 +273,8 @@ const char *OGL_init (HWND ahwnd, int w_w, int w_h, int t_w, int t_h, int depth)
     if (strstr (ext1, "EXT_packed_pixels"))
        packed_pixels = 1;
     if (strstr (ext1, "WGL_EXT_swap_control")) {
-       wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT");
-       wglGetSwapIntervalEXT = (PFNWGLGETSWAPINTERVALEXTPROC)wglGetProcAddress("wglGetSwapIntervalEXT");
+       wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress ("wglSwapIntervalEXT");
+       wglGetSwapIntervalEXT = (PFNWGLGETSWAPINTERVALEXTPROC)wglGetProcAddress ("wglGetSwapIntervalEXT");
        if (!wglGetSwapIntervalEXT || !wglSwapIntervalEXT) {
            write_log ("OPENGL: WGL_EXT_swap_control extension found but no wglGetSwapIntervalEXT or wglSwapIntervalEXT found!?\n");
            wglSwapIntervalEXT = 0;
@@ -291,7 +291,7 @@ const char *OGL_init (HWND ahwnd, int w_w, int w_h, int t_w, int t_h, int depth)
        if (!packed_pixels) {
            sprintf(errmsg, "OPENGL: can't use 15/16 bit screen depths because\n"
                "EXT_packed_pixels extension was not found.");
-           OGL_free();
+           OGL_free ();
            return errmsg;
        }
        ti2d_internalformat = GL_RGB5_A1;
@@ -310,7 +310,7 @@ const char *OGL_init (HWND ahwnd, int w_w, int w_h, int t_w, int t_h, int depth)
     }
     if (ti2d_type < 0) {
        sprintf (errmsg, "OPENGL: Only 15, 16 or 32 bit screen depths supported (was %d)", depth);
-       OGL_free();
+       OGL_free ();
        return errmsg;
     }
 
@@ -372,12 +372,15 @@ static void createscanlines (int force)
     sl8 = currprefs.gfx_filter_scanlines * 256 / 100;
     sl42 = currprefs.gfx_filter_scanlinelevel * 16 / 100;
     sl82 = currprefs.gfx_filter_scanlinelevel * 256 / 100;
-    if (sl4 > 15) sl4 = 15;
-    if (sl8 > 255) sl8 = 255;
-    if (sl42 > 15) sl42 = 15;
-    if (sl82 > 255) sl82 = 255;
-    sld = malloc (w_width * w_height * 4);
-    memset (sld, 0, w_width * w_height * 4);
+    if (sl4 > 15)
+       sl4 = 15;
+    if (sl8 > 255)
+       sl8 = 255;
+    if (sl42 > 15)
+       sl42 = 15;
+    if (sl82 > 255)
+       sl82 = 255;
+    sld = xcalloc (w_width * w_height * 4, 1);
     l1 = currprefs.gfx_filter_scanlineratio & 15;
     l2 = currprefs.gfx_filter_scanlineratio >> 4;
     if (!l1) l1 = 1;
@@ -401,7 +404,7 @@ static void createscanlines (int force)
        }
     }
     glTexSubImage2D (GL_TEXTURE_2D, 0, 0, 0, w_width, w_height, sl_ti2d_format, sl_ti2d_type, sld);
-    free (sld);
+    xfree (sld);
 }
 
 static void setfilter (void)
@@ -446,7 +449,6 @@ void OGL_resize (int width, int height)
 {
     if (!ogl_enabled)
        return;
-
     w_width = width;
     w_height = height;
     glViewport (0, 0, w_width, w_height);
@@ -555,7 +557,6 @@ void OGL_render (void)
 {
     if (!ogl_enabled)
        return;
-
     OGL_dorender (1);
     SwapBuffers (openglhdc);
     if (doublevsync) {
@@ -568,7 +569,6 @@ void OGL_refresh (void)
 {
     if (!ogl_enabled)
        return;
-
     createscanlines (0);
     setfilter ();
     OGL_swapinterval ();
index 4cc05c177b207cbbb9fe25e0f39ac39916a37749..b82ef3600dc69d276bdf4073b50d7dc712cc3c38 100755 (executable)
@@ -118,8 +118,7 @@ uae_u32 p96_rgbx16[65536];
 #if P96DX > 0
 static LPDIRECTDRAWSURFACE7 p96surface;
 #endif
-static LPDIRECTDRAWSURFACE7 cursorsurface;
-static int cursorwidth, cursorheight;
+static int cursorwidth, cursorheight, cursorok;
 static uae_u32 cursorrgb[4], cursorrgbn[4];
 static int reloadcursor, cursorvisible, cursordeactivate;
 static uaecptr cursorbi;
@@ -563,9 +562,7 @@ static void do_fillrect_frame_buffer (struct RenderInfo *ri, int X, int Y,
 
 static void disablemouse (void)
 {
-    if (cursorsurface)
-        IDirectDraw7_Release (cursorsurface);
-    cursorsurface = NULL;
+    cursorok = FALSE;
     cursordeactivate = 0;
 }
 
@@ -720,6 +717,14 @@ typedef enum {
     RGBFB_CLUT_8
 };
 
+static uae_u32 setspriteimage (uaecptr bi);
+static void recursor (void)
+{
+    reloadcursor = 1;
+    cursorok = FALSE;
+    setspriteimage (cursorbi);
+}
+
 static void setconvert (void)
 {
     int d = picasso_vidinfo.pixbytes;
@@ -794,6 +799,7 @@ static void setconvert (void)
     picasso_convert = v;
     host_mode = DirectDraw_GetSurfacePixelFormat (NULL);
     write_log ("RTG conversion: Depth=%d HostRGBF=%d P96RGBF=%d Mode=%d\n", d, host_mode, picasso96_state.RGBFormat, v);
+    recursor ();
     full_refresh = 1;
 }
 
@@ -1251,23 +1257,15 @@ static uae_u32 REGPARAM2 picasso_SetSpriteColor (TrapContext *ctx)
 }
 
 
-static uae_u32 setspriteimage (uaecptr bi);
 static RECT cursor_r1, cursor_r2;
 static int mouseput;
-static void recursor (HRESULT ddrval)
-{
-    if (ddrval == DDERR_SURFACELOST || ddrval == DDERR_DEVICEDOESNTOWNSURFACE) {
-       reloadcursor = 1;
-        setspriteimage (cursorbi);
-    }
-}
 void picasso_putcursor (int sx, int sy, int sw, int sh)
 {
     int xdiff, ydiff, xdiff2, ydiff2;
     DWORD ddrval;
     LPDIRECTDRAWSURFACE7 dstsurf = dxdata.secondary;
     
-    if (cursorsurface == NULL || !cursorvisible || !hwsprite)
+    if (!cursorvisible || !hwsprite || !cursorok)
        return;
 
     if (remcursor_x + remcursor_w < sx)
@@ -1314,10 +1312,10 @@ void picasso_putcursor (int sx, int sy, int sw, int sh)
     cursor_r2.right = cursorwidth + xdiff + xdiff2;
     cursor_r2.bottom = cursorheight + cursorheight + ydiff + ydiff2;
 
-    ddrval = IDirectDrawSurface7_Blt (cursorsurface, &cursor_r2, dstsurf, &cursor_r1, DDBLT_WAIT, NULL);
+    ddrval = IDirectDrawSurface7_Blt (dxdata.cursorsurface, &cursor_r2, dstsurf, &cursor_r1, DDBLT_WAIT, NULL);
     if (FAILED(ddrval)) {
        write_log ("Cursor surface blit1 failed: %s\n", DXError (ddrval));
-       recursor (ddrval);
+       recursor ();
        return;
     }
 
@@ -1326,10 +1324,10 @@ void picasso_putcursor (int sx, int sy, int sw, int sh)
     cursor_r2.right = cursor_r2.left + cursorwidth + xdiff + xdiff2;
     cursor_r2.bottom = cursor_r2.top + cursorheight + ydiff + ydiff2;
 
-    ddrval = IDirectDrawSurface7_Blt (dstsurf, &cursor_r1, cursorsurface, &cursor_r2, DDBLT_WAIT | DDBLT_KEYSRC, NULL);
+    ddrval = IDirectDrawSurface7_Blt (dstsurf, &cursor_r1, dxdata.cursorsurface, &cursor_r2, DDBLT_WAIT | DDBLT_KEYSRC, NULL);
     if (FAILED(ddrval)) {
        write_log ("Cursor surface blit2 failed: %s\n", DXError (ddrval));
-       recursor (ddrval);
+       recursor ();
        return;
     }
 
@@ -1345,13 +1343,13 @@ void picasso_clearcursor (void)
     DWORD ddrval;
     LPDIRECTDRAWSURFACE7 dstsurf = dxdata.secondary;
 
-    if (cursorsurface == NULL)
+    if (!cursorok)
        return;
     if (!mouseput)
        return;
     mouseput = 0;
 
-    ddrval = IDirectDrawSurface7_Blt (dstsurf, &cursor_r1, cursorsurface, &cursor_r2, DDBLT_WAIT, NULL);
+    ddrval = IDirectDrawSurface7_Blt (dstsurf, &cursor_r1, dxdata.cursorsurface, &cursor_r2, DDBLT_WAIT, NULL);
     if (FAILED(ddrval))
        write_log ("Cursor surface clearblit failed: %s\n", DXError (ddrval));
 }
@@ -1370,17 +1368,13 @@ static void updatesprcolors (void)
        switch (picasso_vidinfo.pixbytes)
        {
            case 1:
-           cursorrgbn[0] = 16;
             /* use custom chip sprite palette */
            cursorrgbn[i] = i + 16;
            break;
            case 2:
-           vx = 0xff00ff; /* RGB -> B5G6R5 */
-           cursorrgbn[0] = rgb32torgb16pc (vx);
            cursorrgbn[i] = rgb32torgb16pc (v);
            break;
            case 4:
-           cursorrgbn[0] = 0xff00ff;
            cursorrgbn[i] = v;
            break;
        }
@@ -1389,7 +1383,13 @@ static void updatesprcolors (void)
 
 static void putmousepixel (uae_u8 *d, int bpp, int idx)
 {
-    uae_u32 val = cursorrgbn[idx];
+    uae_u32 val;
+    
+    if (idx == 0)
+       val = dxdata.colorkey;
+    else
+       val = cursorrgbn[idx];
+
     switch (bpp)
     {
        case 1:
@@ -1418,7 +1418,7 @@ static uae_u32 setspriteimage (uaecptr bi)
     int w, h;
 
     cursordeactivate = 0;
-    if (!hwsprite)
+    if (!hwsprite || !dxdata.cursorsurface)
        return 0;
     oldcursor_x = -10000;
     w = (uae_u32)get_byte (bi + PSSO_BoardInfo_MouseWidth);
@@ -1437,6 +1437,11 @@ static uae_u32 setspriteimage (uaecptr bi)
        bi, get_long (bi + PSSO_BoardInfo_MouseImage), w, h,
        hiressprite - 1, doubledsprite, bi + PSSO_BoardInfo_MouseImage));
 
+    if (w > dxdata.cursorwidth)
+       w = dxdata.cursorwidth;
+    if (h > dxdata.cursorheight)
+       h = dxdata.cursorheight;
+
     bpp = picasso_vidinfo.pixbytes;
     if (!w || !h || get_long (bi + PSSO_BoardInfo_MouseImage) == 0) {
        cursordeactivate = 1;
@@ -1477,15 +1482,15 @@ static uae_u32 setspriteimage (uaecptr bi)
        }
     }
 
-    if (cursorsurface) {
+    if (cursorok) {
        for (;;) {
            if (!reloadcursor && w == cursorwidth && h == cursorheight) {
                int different = 0;
                desc.dwSize = sizeof (desc);
                ddrval = DD_OK;
-               while (FAILED (ddrval = IDirectDrawSurface7_Lock (cursorsurface, NULL, &desc, DDLOCK_SURFACEMEMORYPTR | DDLOCK_WAIT, NULL))) {
+               while (FAILED (ddrval = IDirectDrawSurface7_Lock (dxdata.cursorsurface, NULL, &desc, DDLOCK_SURFACEMEMORYPTR | DDLOCK_WAIT, NULL))) {
                    if (ddrval == DDERR_SURFACELOST) {
-                       ddrval = IDirectDrawSurface7_Restore (cursorsurface);
+                       ddrval = IDirectDrawSurface7_Restore (dxdata.cursorsurface);
                        if (FAILED (ddrval))
                            break;
                    }
@@ -1500,7 +1505,7 @@ static uae_u32 setspriteimage (uaecptr bi)
                    if (memcmp (p1, p2, w * bpp))
                        different = 1;
                }
-               IDirectDrawSurface_Unlock (cursorsurface, NULL);
+               IDirectDrawSurface_Unlock (dxdata.cursorsurface, NULL);
                if (!different) {
                    P96TRACE_SPR (("sprite was same as previously\n"));
                    ret = 1;
@@ -1509,31 +1514,16 @@ static uae_u32 setspriteimage (uaecptr bi)
            }
            break;
        }
-       IDirectDraw7_Release (cursorsurface);
+       cursorok = FALSE;
     }
 
     cursorwidth = w;
     cursorheight = h;
-    cursorsurface = NULL;
-
-    ZeroMemory (&desc, sizeof desc);
-    desc.dwSize = sizeof desc;
-    desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CKSRCBLT;
-    desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
-    desc.dwWidth = w;
-    desc.dwHeight = h * 2;
-    DirectDraw_GetPrimaryPixelFormat (&desc);
-    desc.ddckCKSrcBlt.dwColorSpaceLowValue = cursorrgbn[0];
-    desc.ddckCKSrcBlt.dwColorSpaceHighValue = cursorrgbn[0];
-    ddrval = IDirectDraw7_CreateSurface (dxdata.maindd, &desc, &cursorsurface, NULL);
-    if (FAILED(ddrval)) {
-       write_log ("Cursor surface creation failed: %s\n", DXError (ddrval));
-       return 0;
-    }
+
     desc.dwSize = sizeof (desc);
-    while (FAILED(ddrval = IDirectDrawSurface7_Lock (cursorsurface, NULL, &desc, DDLOCK_SURFACEMEMORYPTR | DDLOCK_WAIT, NULL))) {
+    while (FAILED(ddrval = IDirectDrawSurface7_Lock (dxdata.cursorsurface, NULL, &desc, DDLOCK_SURFACEMEMORYPTR | DDLOCK_WAIT, NULL))) {
        if (ddrval == DDERR_SURFACELOST) {
-           ddrval = IDirectDrawSurface7_Restore (cursorsurface);
+           ddrval = IDirectDrawSurface7_Restore (dxdata.cursorsurface);
            if (FAILED(ddrval)) {
                write_log ("sprite surface failed to restore: %s\n", DXError (ddrval));
                goto end;
@@ -1547,9 +1537,10 @@ static uae_u32 setspriteimage (uaecptr bi)
        uae_u8 *p2 = dptr + pitch * y;
        memcpy (p2, p1, w * bpp);
     }
-    IDirectDrawSurface_Unlock (cursorsurface, NULL);
+    IDirectDrawSurface_Unlock (dxdata.cursorsurface, NULL);
     ret = 1;
     reloadcursor = 0;
+    cursorok = TRUE;
     P96TRACE_SPR (("hardware sprite created\n"));
 end:
     xfree (tmpbuf);
@@ -3667,7 +3658,7 @@ static void flushpixels (void)
        if (doskip () && p96skipmode == 2)
            break;
 
-       if (dofull) {
+        if (dofull) {
            copyall (src + off, dst);
            miny = 0;
            maxy = picasso96_state.Height;
@@ -3712,7 +3703,14 @@ static void flushpixels (void)
        break;
     }
 
-    if(lock)
+    if (maxy >= 0) {
+       if (doskip () && p96skipmode == 4) {
+           ;
+       } else {
+           DX_Invalidate (0, miny, picasso96_state.Width, maxy - miny);
+       }
+    }
+    if (lock)
        gfx_unlock_picasso ();
     if (dst && gwwcnt) {
        if (doskip () && p96skipmode == 3) {
@@ -3722,13 +3720,6 @@ static void flushpixels (void)
        }
        full_refresh = 0;
     }
-    if (maxy >= 0) {
-       if (doskip () && p96skipmode == 4) {
-           ;
-       } else {
-           DX_Invalidate (0, miny, picasso96_state.Width, maxy - miny);
-       }
-    }
 }
 
 static uae_u32 REGPARAM2 gfxmem_lgetx (uaecptr addr)
@@ -3738,7 +3729,7 @@ static uae_u32 REGPARAM2 gfxmem_lgetx (uaecptr addr)
     addr -= gfxmem_start & gfxmem_mask;
     addr &= gfxmem_mask;
     m = (uae_u32 *)(gfxmemory + addr);
-    return do_get_mem_long(m);
+    return do_get_mem_long (m);
 }
 
 static uae_u32 REGPARAM2 gfxmem_wgetx (uaecptr addr)
@@ -3747,7 +3738,7 @@ static uae_u32 REGPARAM2 gfxmem_wgetx (uaecptr addr)
     addr -= gfxmem_start & gfxmem_mask;
     addr &= gfxmem_mask;
     m = (uae_u16 *)(gfxmemory + addr);
-    return do_get_mem_word(m);
+    return do_get_mem_word (m);
 }
 
 static uae_u32 REGPARAM2 gfxmem_bgetx (uaecptr addr)
@@ -3763,7 +3754,7 @@ static void REGPARAM2 gfxmem_lputx (uaecptr addr, uae_u32 l)
     addr -= gfxmem_start & gfxmem_mask;
     addr &= gfxmem_mask;
     m = (uae_u32 *)(gfxmemory + addr);
-    do_put_mem_long(m, l);
+    do_put_mem_long (m, l);
 }
 
 static void REGPARAM2 gfxmem_wputx (uaecptr addr, uae_u32 w)
@@ -3772,7 +3763,7 @@ static void REGPARAM2 gfxmem_wputx (uaecptr addr, uae_u32 w)
     addr -= gfxmem_start & gfxmem_mask;
     addr &= gfxmem_mask;
     m = (uae_u16 *)(gfxmemory + addr);
-    do_put_mem_word(m, (uae_u16)w);
+    do_put_mem_word (m, (uae_u16)w);
 }
 
 static void REGPARAM2 gfxmem_bputx (uaecptr addr, uae_u32 b)
@@ -3810,11 +3801,10 @@ void InitPicasso96 (void)
 {
     int i;
 
-    full_refresh = 0;
 //fastscreen
     oldscr = 0;
 //fastscreen
-    memset (&picasso96_state, 0, sizeof(struct picasso96_state_struct));
+    memset (&picasso96_state, 0, sizeof (struct picasso96_state_struct));
 
     for (i = 0; i < 256; i++) {
         p2ctab[i][0] = (((i & 128) ? 0x01000000 : 0)
index 1d4c5c1f0507d7b8938f778c0e59bec2ce4ad17d..4aa5516d7c0aa39486117eca406105e7d1e01b36 100755 (executable)
@@ -78,11 +78,11 @@ static DWORD getattr(const char *name, LPFILETIME lpft, size_t *size)
     HANDLE hFind;
     WIN32_FIND_DATA fd;
 
-    if ((hFind = FindFirstFile(name,&fd)) == INVALID_HANDLE_VALUE) {
-       fd.dwFileAttributes = GetFileAttributes(name);
+    if ((hFind = FindFirstFile (name,&fd)) == INVALID_HANDLE_VALUE) {
+       fd.dwFileAttributes = GetFileAttributes (name);
        return fd.dwFileAttributes;
     }
-    FindClose(hFind);
+    FindClose (hFind);
 
     if (lpft)
        *lpft = fd.ftLastWriteTime;
@@ -97,7 +97,7 @@ int posixemu_stat(const char *name, struct stat *statbuf)
     DWORD attr;
     FILETIME ft, lft;
 
-    if ((attr = getattr(name,&ft,(size_t*)&statbuf->st_size)) == (DWORD)~0) {
+    if ((attr = getattr (name,&ft,(size_t*)&statbuf->st_size)) == (DWORD)~0) {
        return -1;
     } else {
        statbuf->st_mode = (attr & FILE_ATTRIBUTE_READONLY) ? FILEFLAG_READ : FILEFLAG_READ | FILEFLAG_WRITE;
@@ -105,7 +105,7 @@ int posixemu_stat(const char *name, struct stat *statbuf)
            statbuf->st_mode |= FILEFLAG_ARCHIVE;
        if (attr & FILE_ATTRIBUTE_DIRECTORY)
            statbuf->st_mode |= FILEFLAG_DIR;
-       FileTimeToLocalFileTime(&ft,&lft);
+       FileTimeToLocalFileTime (&ft,&lft);
        statbuf->st_mtime = (long)((*(__int64 *)&lft-((__int64)(369*365+89)*(__int64)(24*60*60)*(__int64)10000000))/(__int64)10000000);
     }
     return 0;
@@ -139,30 +139,30 @@ static void tmToSystemTime(struct tm *tmtime, LPSYSTEMTIME systime)
     }
 }
 
-static int setfiletime(const char *name, unsigned int days, int minute, int tick, int tolocal)
+static int setfiletime (const char *name, unsigned int days, int minute, int tick, int tolocal)
 {
     FILETIME LocalFileTime, FileTime;
     HANDLE hFile;
     int success;
-    if ((hFile = CreateFile(name, GENERIC_WRITE,FILE_SHARE_READ | FILE_SHARE_WRITE,NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL)) == INVALID_HANDLE_VALUE)
+    if ((hFile = CreateFile (name, GENERIC_WRITE,FILE_SHARE_READ | FILE_SHARE_WRITE,NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL)) == INVALID_HANDLE_VALUE)
        return 0;
 
     *(__int64 *)&LocalFileTime = (((__int64)(377*365+91+days)*(__int64)1440+(__int64)minute)*(__int64)(60*50)+(__int64)tick)*(__int64)200000;
 
     if (tolocal) {
-       if (!LocalFileTimeToFileTime(&LocalFileTime,&FileTime))
+       if (!LocalFileTimeToFileTime (&LocalFileTime,&FileTime))
            FileTime = LocalFileTime;
     } else {
        FileTime = LocalFileTime;
     }
 
-    success = SetFileTime(hFile,&FileTime,&FileTime,&FileTime);
-    CloseHandle(hFile);
+    success = SetFileTime (hFile,&FileTime,&FileTime,&FileTime);
+    CloseHandle (hFile);
 
     return success;
 }
 
-int posixemu_utime( const char *name, struct utimbuf *ttime )
+int posixemu_utime (const char *name, struct utimbuf *ttime)
 {
     int result = -1, tolocal;
     long days, mins, ticks;
@@ -175,9 +175,9 @@ int posixemu_utime( const char *name, struct utimbuf *ttime )
        tolocal = 1;
        actime = ttime->actime;
     }
-    get_time(actime, &days, &mins, &ticks);
+    get_time (actime, &days, &mins, &ticks);
 
-    if(setfiletime (name, days, mins, ticks, tolocal))
+    if (setfiletime (name, days, mins, ticks, tolocal))
        result = 0;
 
        return result;
@@ -187,9 +187,9 @@ void uae_sem_init (uae_sem_t * event, int manual_reset, int initial_state)
 {
     if(*event) {
        if (initial_state)
-           SetEvent(*event);
+           SetEvent (*event);
        else
-           ResetEvent(*event);
+           ResetEvent (*event);
     } else {
        *event = CreateEvent (NULL, manual_reset, initial_state, NULL);
     }
@@ -212,8 +212,8 @@ int uae_sem_trywait (uae_sem_t * event)
 
 void uae_sem_destroy (uae_sem_t * event)
 {
-    if(*event) {
-       CloseHandle(*event);
+    if (*event) {
+       CloseHandle (*event);
        *event = NULL;
     }
 }
@@ -234,8 +234,8 @@ static unsigned __stdcall thread_init(void *f)
 
     xfree(f);
     __try {
-       fp(arg);
-    } __except(WIN32_ExceptionFilter(GetExceptionInformation(), GetExceptionCode())) {
+       fp (arg);
+    } __except (WIN32_ExceptionFilter (GetExceptionInformation (), GetExceptionCode ())) {
     }
     return 0;
 }
@@ -250,7 +250,7 @@ int uae_start_thread (char *name, void *(*f)(void *), void *arg, uae_thread_id *
     thp = malloc (sizeof (struct thparms));
     thp->f = f;
     thp->arg = arg;
-    hThread = (HANDLE)_beginthreadex(NULL, 0, thread_init, thp, 0, &foo);
+    hThread = (HANDLE)_beginthreadex (NULL, 0, thread_init, thp, 0, &foo);
     *tid = hThread;
     if (hThread) {
        SetThreadPriority (hThread, THREAD_PRIORITY_ABOVE_NORMAL);
@@ -265,14 +265,12 @@ int uae_start_thread (char *name, void *(*f)(void *), void *arg, uae_thread_id *
 
 int uae_start_thread_fast (void *(*f)(void *), void *arg, uae_thread_id *tid)
 {
-    return uae_start_thread(NULL, f, arg, tid);
+    return uae_start_thread (NULL, f, arg, tid);
 }
 
 DWORD_PTR cpu_affinity = 1, cpu_paffinity = 1;
 
 void uae_set_thread_priority (int pri)
 {
-    /* workaround for filesystem emulation freeze with some dual core systems */
-    //SetThreadAffinityMask(GetCurrentThread(), cpu_affinity);
 }
 
index 60dae73902c50f30b4dbf622975346458a4b0bbd..f618498f59bc45fb366d3fc9dfa4190d3ae6fd27 100755 (executable)
 #define IDC_NOFLAGS                     1581
 #define IDC_SOUNDDRIVEVOLUME2           1581
 #define IDC_CS_CACHE_TEXT               1582
-#define IDC_FORCE                       1583
 #define IDC_COLLISIONS                  1584
 #define IDC_JITENABLE                   1584
 #define IDC_DISASSEMBLY                 1585
index 268585c9075681ede080746dd4d5740b0640d036..17c1ff357d1e5b743c08ec7214be5de9459b702e 100755 (executable)
 #define IDC_NOFLAGS                     1581
 #define IDC_SOUNDDRIVEVOLUME2           1581
 #define IDC_CS_CACHE_TEXT               1582
-#define IDC_FORCE                       1583
 #define IDC_COLLISIONS                  1584
 #define IDC_JITENABLE                   1584
 #define IDC_DISASSEMBLY                 1585
index 5fbab4395d73840a02c5a2dd7ce4541181857c22..4dea8cde021b4dfef7a32b42461d0f2849b935f2 100755 (executable)
-// Microsoft Visual C++ generated resource script.\r
-//\r
-#include "resource."\r
-\r
-#define APSTUDIO_READONLY_SYMBOLS\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 2 resource.\r
-//\r
-#include "afxres.h"\r\r
-/////////////////////////////////////////////////////////////////////////////\r
-#undef APSTUDIO_READONLY_SYMBOLS\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// English (U.S.) resources\r
-\r
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r
-#ifdef _WIN32\r
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\r
-#pragma code_page(1252)\r
-#endif //_WIN32\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Accelerator\r
-//\r
-\r
-IDR_DBGACCEL ACCELERATORS \r
-BEGIN\r
-    VK_F1,          ID_DBG_PAGE1,           VIRTKEY, NOINVERT\r
-    VK_F2,          ID_DBG_PAGE2,           VIRTKEY, NOINVERT\r
-    VK_F3,          ID_DBG_PAGE3,           VIRTKEY, NOINVERT\r
-    VK_F4,          ID_DBG_PAGE4,           VIRTKEY, NOINVERT\r
-    VK_F5,          ID_DBG_PAGE5,           VIRTKEY, NOINVERT\r
-    VK_F6,          ID_DBG_PAGE6,           VIRTKEY, NOINVERT\r
-    VK_F7,          ID_DBG_PAGE7,           VIRTKEY, NOINVERT\r
-    VK_F8,          ID_DBG_PAGE8,           VIRTKEY, NOINVERT\r
-    VK_F9,          ID_DBG_PAGE9,           VIRTKEY, NOINVERT\r
-    VK_F11,         ID_DBG_STEP_OVER,       VIRTKEY, NOINVERT\r
-    VK_F12,         ID_DBG_STEP_INTO,       VIRTKEY, NOINVERT\r
-    VK_DOWN,        IDC_DBG_MEMDOWN,        VIRTKEY, ALT, NOINVERT\r
-    VK_RIGHT,       IDC_DBG_MEMDOWNFAST,    VIRTKEY, ALT, NOINVERT\r
-    VK_UP,          IDC_DBG_MEMUP,          VIRTKEY, ALT, NOINVERT\r
-    VK_LEFT,        IDC_DBG_MEMUPFAST,      VIRTKEY, ALT, NOINVERT\r
-    "H",            IDC_DBG_HELP,           VIRTKEY, ALT, NOINVERT\r
-    "P",            IDC_DBG_MEMTOPC,        VIRTKEY, ALT, NOINVERT\r
-    "A",            IDC_DBG_AUTOSET,        VIRTKEY, ALT, NOINVERT\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Dialog\r
-//\r
-\r
-IDD_KICKSTART DIALOGEX 0, 0, 300, 176\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-EXSTYLE WS_EX_CONTEXTHELP\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
-    GROUPBOX        "System ROM Settings",-1,5,0,290,93\r
-    RTEXT           "Main ROM file:",IDC_ROMTEXT,10,13,75,10\r
-    COMBOBOX        IDC_ROMFILE,12,26,263,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP\r
-    PUSHBUTTON      "...",IDC_KICKCHOOSER,280,25,10,15\r
-    RTEXT           "Extended ROM file:",IDC_ROMFILE2TEXT,10,43,75,10\r
-    COMBOBOX        IDC_ROMFILE2,12,56,263,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP\r
-    PUSHBUTTON      "...",IDC_ROMCHOOSER2,280,55,10,15\r
-    CONTROL         "MapROM emulation [] Creates a BlizKick-compatible memory area.",IDC_MAPROM,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,95,77,87,10\r
-    CONTROL         "ShapeShifter support [] Patches the system ROM for ShapeShifter compatibility.",IDC_KICKSHIFTER,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,77,87,10\r
-    GROUPBOX        "Miscellaneous",-1,5,99,290,75\r
-    RTEXT           "Cartridge ROM file:",IDC_FLASHTEXT2,8,110,75,10\r
-    COMBOBOX        IDC_CARTFILE,12,123,263,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP\r
-    PUSHBUTTON      "...",IDC_CARTCHOOSER,280,122,10,15\r
-    RTEXT           "Flash RAM file:",IDC_FLASHTEXT,8,142,75,10\r
-    EDITTEXT        IDC_FLASHFILE,12,155,262,13,ES_AUTOHSCROLL\r
-    PUSHBUTTON      "...",IDC_FLASHCHOOSER,280,154,10,15\r
-END\r
-\r
-IDD_DISPLAY DIALOGEX 0, 0, 300, 235\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
-    GROUPBOX        "Screen",IDC_SCREENRESTEXT,12,0,270,67,BS_LEFT\r
-    RTEXT           "Full screen:",IDC_SELECTRESTEXT,15,17,40,15,SS_CENTERIMAGE\r
-    COMBOBOX        IDC_DISPLAYSELECT,59,10,215,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_RESOLUTION,59,27,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_REFRESHRATE,187,27,87,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    EDITTEXT        IDC_XSIZE,59,48,48,12,ES_NUMBER\r
-    EDITTEXT        IDC_YSIZE,114,48,47,12,ES_NUMBER\r
-    GROUPBOX        "Settings",IDC_SETTINGSTEXT,12,73,199,125\r
-    CONTROL         "Correct aspect ratio",IDC_ASPECT,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,19,126,92,10\r
-    LTEXT           "Refresh:",IDC_REFRESHTEXT,18,162,28,8\r
-    CONTROL         "Slider1",IDC_FRAMERATE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,47,157,75,20\r
-    EDITTEXT        IDC_RATETEXT,124,161,77,12,ES_CENTER | ES_READONLY\r
-    GROUPBOX        "Centering",IDC_STATIC,221,73,61,49\r
-    CONTROL         "Horizontal",IDC_XCENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,229,87,49,10\r
-    CONTROL         "Vertical",IDC_YCENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,229,103,49,10\r
-    GROUPBOX        "Line Mode",IDC_LINEMODE,222,126,61,73\r
-    CONTROL         "Normal",IDC_LM_NORMAL,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_GROUP | WS_TABSTOP,231,142,44,10\r
-    CONTROL         "Double",IDC_LM_DOUBLED,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,231,158,45,10\r
-    CONTROL         "Scanlines",IDC_LM_SCANLINES,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,231,174,46,10\r
-    COMBOBOX        IDC_DA_MODE,20,211,58,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    CONTROL         "",IDC_DA_SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,84,207,101,20\r
-    LTEXT           "FPS adj.:",IDC_REFRESH2TEXT,16,182,32,8\r
-    CONTROL         "",IDC_FRAMERATE2,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,47,177,127,20\r
-    EDITTEXT        IDC_RATE2TEXT,175,181,26,12,ES_CENTER | ES_READONLY\r
-    COMBOBOX        IDC_RESOLUTIONDEPTH,134,27,46,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    CONTROL         "Filtered low resolution",IDC_LORES_SMOOTHED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,126,89,10\r
-    COMBOBOX        IDC_SCREENMODE_NATIVE,100,85,102,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_SCREENMODE_RTG,100,103,102,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    RTEXT           "Native mode:",IDC_STATIC,19,85,59,15,SS_CENTERIMAGE\r
-    RTEXT           "Windowed:",IDC_WINDOWEDTEXT,15,51,40,8\r
-    RTEXT           "RTG mode:",IDC_STATIC,19,101,59,15,SS_CENTERIMAGE\r
-    PUSHBUTTON      "Reset to defaults",IDC_DA_RESET,212,211,73,14\r
-    RTEXT           "Resolution:",IDC_STATIC,27,140,59,15,SS_CENTERIMAGE\r
-    COMBOBOX        IDC_LORES,100,140,102,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-END\r
-\r
-IDD_MEMORY DIALOGEX 0, 0, 300, 239\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-EXSTYLE WS_EX_CONTEXTHELP\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
-    GROUPBOX        "Memory Settings",-1,14,7,274,69\r
-    RTEXT           "Chip:",-1,24,26,20,10,SS_CENTERIMAGE\r
-    CONTROL         "Slider1",IDC_CHIPMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,54,22,50,20\r
-    EDITTEXT        IDC_CHIPRAM,105,25,30,12,ES_CENTER | ES_READONLY\r
-    RTEXT           "Slow:",-1,149,26,20,10,SS_CENTERIMAGE\r
-    CONTROL         "Slider1",IDC_SLOWMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,179,22,60,20\r
-    EDITTEXT        IDC_SLOWRAM,243,25,30,12,ES_CENTER | ES_READONLY\r
-    RTEXT           "Fast:",IDC_FASTTEXT,24,51,20,10,SS_CENTERIMAGE\r
-    CONTROL         "Slider1",IDC_FASTMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,54,47,50,20\r
-    EDITTEXT        IDC_FASTRAM,105,53,30,12,ES_CENTER | ES_READONLY\r
-    RTEXT           "Z3 Fast:",IDC_Z3TEXT,139,51,30,10,SS_CENTERIMAGE\r
-    CONTROL         "Slider1",IDC_Z3FASTMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,179,47,60,20\r
-    EDITTEXT        IDC_Z3FASTRAM,243,50,30,12,ES_CENTER | ES_READONLY\r
-    RTEXT           "Memory: [] Graphics card memory. Required for RTG (Picasso96) emulation.",IDC_GFXCARDTEXT,25,98,53,10,SS_NOTIFY | SS_CENTERIMAGE\r
-    CONTROL         "Slider1",IDC_P96MEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,88,94,60,20\r
-    EDITTEXT        IDC_P96RAM,152,97,30,12,ES_CENTER | ES_READONLY\r
-    GROUPBOX        "Advanced Memory Settings",-1,13,171,275,65\r
-    RTEXT           "Motherboard RAM (Low area):",-1,39,190,129,10,SS_CENTERIMAGE\r
-    CONTROL         "",IDC_MBMEM1,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,180,186,59,20\r
-    EDITTEXT        IDC_MBRAM1,243,189,30,12,ES_CENTER | ES_READONLY\r
-    RTEXT           "Motherboard RAM (High area):",-1,39,215,129,10,SS_CENTERIMAGE\r
-    CONTROL         "",IDC_MBMEM2,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,180,211,59,20\r
-    EDITTEXT        IDC_MBRAM2,243,214,30,12,ES_CENTER | ES_READONLY\r
-    GROUPBOX        "RTG Graphics Card Settings",-1,14,81,275,87\r
-    CONTROL         "Scale instead of switching resolution",IDC_RTG_SCALE,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,134,162,10\r
-    CONTROL         "Match host and RTG color depth if possible",IDC_RTG_MATCH_DEPTH,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,119,163,10\r
-    COMBOBOX        IDC_RTG_8BIT,211,101,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_RTG_16BIT,211,117,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_RTG_24BIT,211,133,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_RTG_32BIT,211,149,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-END\r
-\r
-IDD_CPU DIALOGEX 0, 0, 300, 226\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
-    GROUPBOX        "CPU",IDC_STATIC,5,3,81,139,BS_LEFT\r
-    CONTROL         "68000",IDC_CPU0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,16,63,10\r
-    CONTROL         "68010",IDC_CPU1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,30,65,10\r
-    CONTROL         "68020",IDC_CPU2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,44,63,10\r
-    CONTROL         "68030",IDC_CPU3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,58,64,10\r
-    CONTROL         "68040",IDC_CPU4,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,72,66,10\r
-    CONTROL         "68060",IDC_CPU5,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,86,66,10\r
-    CONTROL         "More compatible [] Emulate 68000's prefetch registers. More compatible but slower.",IDC_COMPATIBLE,\r
-                    "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,10,114,73,8\r
-    CONTROL         "JIT [] Enable just-in-time CPU emulator. Significantly increases the speed of the CPU emulation. Requires 68020 or higher CPU.",IDC_JITENABLE,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,127,73,10\r
-    GROUPBOX        "CPU Emulation Speed",IDC_STATIC,90,3,205,90\r
-    CONTROL         "Fastest possible, but maintain chipset timing",IDC_CS_HOST,\r
-                    "Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_GROUP | WS_TABSTOP,95,18,195,10\r
-    CONTROL         "Match A500 speed",IDC_CS_68000,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,95,32,195,10\r
-    CONTROL         "Adjustable between CPU and chipset",IDC_CS_ADJUSTABLE,\r
-                    "Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,95,46,195,10\r
-    RTEXT           "CPU",IDC_CS_CPU_TEXT,96,73,15,10,SS_CENTERIMAGE | WS_TABSTOP\r
-    CONTROL         "Slider1",IDC_SPEED,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,114,68,67,20\r
-    LTEXT           "Chipset",IDC_CS_CHIPSET_TEXT,182,73,25,10,SS_CENTERIMAGE | NOT WS_GROUP | WS_TABSTOP\r
-    RTEXT           "CPU idle",IDC_CS_CPU_TEXT2,236,56,32,10,SS_CENTERIMAGE | WS_TABSTOP\r
-    CONTROL         "",IDC_CPUIDLE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,219,68,69,20\r
-    GROUPBOX        "Advanced JIT Settings",IDC_STATIC,90,94,205,93\r
-    RTEXT           "Cache size:",IDC_CS_CACHE_TEXT,95,113,45,10,SS_CENTERIMAGE | WS_TABSTOP\r
-    CONTROL         "Slider1",IDC_CACHE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,140,108,115,20\r
-    EDITTEXT        IDC_CACHETEXT,255,113,30,12,ES_CENTER | ES_READONLY\r
-    CONTROL         "Hard flush",IDC_HARDFLUSH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,100,141,63,10\r
-    CONTROL         "Constant jump",IDC_CONSTJUMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,100,155,63,10\r
-    CONTROL         "FPU support",IDC_JITFPU,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,100,169,62,10\r
-    CONTROL         "Force settings",IDC_FORCE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,141,62,10\r
-    CONTROL         "No flags",IDC_NOFLAGS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,155,62,10\r
-    CONTROL         "Direct",IDC_TRUST0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,235,141,52,10\r
-    CONTROL         "Indirect",IDC_TRUST1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,235,155,52,10\r
-    CONTROL         "More compatible [] More compatible but slower FPU emulation.",IDC_COMPATIBLE_FPU,\r
-                    "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,9,210,73,10\r
-    GROUPBOX        "FPU",IDC_STATIC,6,146,81,80,BS_LEFT\r
-    CONTROL         "24-bit addressing",IDC_COMPATIBLE24,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,10,100,73,8\r
-    CONTROL         "None",IDC_FPU0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,14,157,63,10\r
-    CONTROL         "68881",IDC_FPU1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,14,171,63,10\r
-    CONTROL         "68882",IDC_FPU2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,14,185,63,10\r
-    CONTROL         "CPU internal",IDC_FPU3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,14,199,63,10\r
-END\r
-\r
-IDD_FLOPPY DIALOGEX 0, 0, 300, 240\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
-    COMBOBOX        IDC_DF0TEXT,2,22,296,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_DF0TYPE,115,6,57,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    RTEXT           "Write-protected",IDC_STATIC,174,8,59,10,SS_CENTERIMAGE\r
-    CONTROL         "",IDC_DF0WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,4,10,15\r
-    PUSHBUTTON      "Eject",IDC_EJECT0,253,4,30,15\r
-    PUSHBUTTON      "...",IDC_DF0,287,4,10,15\r
-    COMBOBOX        IDC_DF1TEXT,2,58,296,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_DF1TYPE,115,42,57,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    RTEXT           "Write-protected",IDC_STATIC,174,43,59,10,SS_CENTERIMAGE\r
-    CONTROL         "",IDC_DF1WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,40,10,15\r
-    PUSHBUTTON      "Eject",IDC_EJECT1,253,40,30,15\r
-    PUSHBUTTON      "...",IDC_DF1,287,40,10,15\r
-    COMBOBOX        IDC_DF2TEXT,2,93,296,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_DF2TYPE,115,77,57,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    RTEXT           "Write-protected",IDC_STATIC,174,77,59,10,SS_CENTERIMAGE\r
-    CONTROL         "",IDC_DF2WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,75,9,15\r
-    PUSHBUTTON      "Eject",IDC_EJECT2,253,75,30,15\r
-    PUSHBUTTON      "...",IDC_DF2,287,75,10,15\r
-    COMBOBOX        IDC_DF3TEXT,2,128,296,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_DF3TYPE,115,112,57,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    RTEXT           "Write-protected",IDC_STATIC,174,113,59,10,SS_CENTERIMAGE\r
-    CONTROL         "",IDC_DF3WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,111,9,15\r
-    PUSHBUTTON      "Eject",IDC_EJECT3,253,110,30,15\r
-    PUSHBUTTON      "...",IDC_DF3,287,109,10,15\r
-    GROUPBOX        "New Floppy Disk Image",IDC_SETTINGSTEXT,5,183,289,49\r
-    COMBOBOX        IDC_FLOPPYTYPE,16,197,51,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    PUSHBUTTON      "Create Standard Disk [] Creates a standard 880 or 1760 KB ADF disk image.",IDC_CREATE,77,196,97,15\r
-    PUSHBUTTON      "Create Custom Disk [] Creates a low level (MFM) ADF disk image (about 2MB). Useful for programs that use non-standard disk formats (for example some save disks or DOS-formatted floppies)",IDC_CREATE_RAW,183,196,101,15\r
-    GROUPBOX        "Floppy Drive Emulation Speed",IDC_SETTINGSTEXT2,5,144,289,35\r
-    CONTROL         "",IDC_FLOPPYSPD,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,32,154,116,20\r
-    EDITTEXT        IDC_FLOPPYSPDTEXT,183,157,101,12,ES_CENTER | ES_READONLY\r
-    PUSHBUTTON      "Delete save image",IDC_SAVEIMAGE0,43,5,70,15,NOT WS_VISIBLE\r
-    PUSHBUTTON      "Delete save image",IDC_SAVEIMAGE1,43,40,70,15,NOT WS_VISIBLE\r
-    PUSHBUTTON      "Delete save image",IDC_SAVEIMAGE2,43,75,70,15,NOT WS_VISIBLE\r
-    PUSHBUTTON      "Delete save image",IDC_SAVEIMAGE3,43,110,70,15,NOT WS_VISIBLE\r
-    EDITTEXT        IDC_CREATE_NAME,77,215,97,13,ES_AUTOHSCROLL\r
-    RTEXT           "Disk label:",IDC_STATIC,15,216,52,10,SS_CENTERIMAGE\r
-    CONTROL         "DF0:",IDC_DF0ENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,3,6,34,15\r
-    CONTROL         "DF1:",IDC_DF1ENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,3,41,34,15\r
-    CONTROL         "DF2:",IDC_DF2ENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,3,76,34,15\r
-    CONTROL         "DF3:",IDC_DF3ENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,3,111,34,15\r
-END\r
-\r
-IDD_HARDDISK DIALOGEX 0, 0, 300, 237\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-EXSTYLE WS_EX_CONTEXTHELP\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
-    CONTROL         "List1",IDC_VOLUMELIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,5,0,290,176\r
-    PUSHBUTTON      "Add &Directory or Archive...",IDC_NEW_FS,10,179,103,15\r
-    PUSHBUTTON      "Add &Hardfile...",IDC_NEW_HF,130,179,74,15\r
-    PUSHBUTTON      "Add Ha&rd Drive...",IDC_NEW_HD,220,179,75,15\r
-    PUSHBUTTON      "Remove",IDC_REMOVE,235,203,60,15\r
-    PUSHBUTTON      "&Properties",IDC_EDIT,235,220,60,15\r
-    CONTROL         "Add PC drives at startup",IDC_MAPDRIVES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,202,100,10\r
-    CONTROL         "Disable UAEFSDB-support",IDC_NOUAEFSDB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,202,119,10\r
-    CONTROL         "Don't use Windows Recycle Bin",IDC_NORECYCLEBIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,213,121,10\r
-    CONTROL         "Include network drives..",IDC_MAPDRIVES_NET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,225,101,10\r
-    CONTROL         "Include CD/DVD drives..",IDC_MAPDRIVES_CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,213,100,10\r
-    CONTROL         "Automount removable drives",IDC_MAPDRIVES_AUTO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,225,115,10\r
-END\r
-\r
-IDD_SOUND DIALOGEX 0, 0, 300, 231\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
-    RTEXT           "Sound device:",IDC_SOUNDCARD,8,9,51,13,SS_CENTERIMAGE\r
-    COMBOBOX        IDC_SOUNDCARDLIST,64,9,229,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    GROUPBOX        "Sound Emulation",IDC_SOUNDSETTINGS,5,30,120,81\r
-    CONTROL         "Disabled",IDC_SOUND0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,45,101,10\r
-    CONTROL         "Disabled, but emulated",IDC_SOUND1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,57,102,10\r
-    CONTROL         "Enabled",IDC_SOUND2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,69,102,10\r
-    CONTROL         "Enabled, 100% accurate",IDC_SOUND3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,81,101,10\r
-    GROUPBOX        "Volume",IDC_STATIC,132,36,164,31\r
-    CONTROL         "",IDC_SOUNDVOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,137,44,105,20\r
-    EDITTEXT        IDC_SOUNDVOLUME2,247,47,40,12,ES_CENTER | ES_READONLY\r
-    GROUPBOX        "Sound Buffer Size",IDC_STATIC,132,73,164,31\r
-    CONTROL         "Slider1",IDC_SOUNDBUFFERRAM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,137,81,105,19\r
-    EDITTEXT        IDC_SOUNDBUFFERMEM,247,84,40,12,ES_CENTER | ES_READONLY\r
-    GROUPBOX        "Settings",IDC_SOUNDINTERPOLATION2,6,114,290,60\r
-    LTEXT           "Frequency:",IDC_SOUNDFREQTXT,11,148,53,8,SS_CENTERIMAGE\r
-    COMBOBOX        IDC_SOUNDFREQ,13,157,51,75,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP\r
-    LTEXT           "Audio filter:",IDC_SOUNDFILTERTXT,209,148,77,8,SS_CENTERIMAGE\r
-    COMBOBOX        IDC_SOUNDFILTER,209,157,80,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    LTEXT           "Channel mode:",IDC_SOUNDSTEREOTXT,11,124,57,8,SS_CENTERIMAGE\r
-    COMBOBOX        IDC_SOUNDSTEREO,13,133,122,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    LTEXT           "Interpolation:",IDC_SOUNDINTERPOLATIONTXT,209,124,75,8,SS_CENTERIMAGE\r
-    COMBOBOX        IDC_SOUNDINTERPOLATION,209,133,80,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    LTEXT           "Stereo separation:",IDC_SOUNDSTEREOSEPTXT,141,124,63,8,SS_CENTERIMAGE\r
-    COMBOBOX        IDC_SOUNDSTEREOSEP,142,133,62,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    LTEXT           "Stereo delay:",IDC_SOUNDSTEREOMIXTXT,141,148,63,8,SS_CENTERIMAGE\r
-    COMBOBOX        IDC_SOUNDSTEREOMIX,142,157,62,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    GROUPBOX        "Floppy Drive Sound Emulation",IDC_STATIC,6,177,290,46\r
-    CONTROL         "",IDC_SOUNDDRIVEVOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,14,185,107,19\r
-    EDITTEXT        IDC_SOUNDDRIVEVOLUME2,124,187,40,12,ES_CENTER | ES_READONLY\r
-    COMBOBOX        IDC_SOUNDDRIVE,237,187,46,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_SOUNDDRIVESELECT,18,205,265,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_SOUNDSWAP,73,157,62,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    LTEXT           "Swap channels:",IDC_SOUNDSWAPTXT,74,148,61,8,SS_CENTERIMAGE\r
-    CONTROL         "Automatic switching",IDC_SOUND_AUTO,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,14,95,103,10\r
-END\r
-\r
-IDD_LOADSAVE DIALOGEX 0, 0, 302, 241\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
-    CONTROL         "",IDC_CONFIGTREE,"SysTreeView32",TVS_HASLINES | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,6,3,289,153,WS_EX_CLIENTEDGE\r
-    RTEXT           "Name:",IDC_STATIC,4,161,40,15,SS_CENTERIMAGE\r
-    EDITTEXT        IDC_EDITNAME,48,162,146,13,ES_AUTOHSCROLL\r
-    RTEXT           "Description:",IDC_STATIC,2,182,41,15,SS_CENTERIMAGE\r
-    EDITTEXT        IDC_EDITDESCRIPTION,48,183,146,13,ES_AUTOHSCROLL\r
-    RTEXT           "Link:",IDC_STATIC,4,204,40,15,SS_CENTERIMAGE\r
-    COMBOBOX        IDC_CONFIGLINK,48,205,93,150,CBS_DROPDOWN | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    CONTROL         "Ignore link",IDC_CONFIGNOLINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,146,207,48,10\r
-    EDITTEXT        IDC_EDITPATH,199,161,49,15,ES_AUTOHSCROLL | WS_DISABLED\r
-    CONTROL         "Autoload",IDC_CONFIGAUTO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,253,163,42,10\r
-    GROUPBOX        "Additional Information",IDC_STATIC,199,179,96,38,BS_LEFT\r
-    PUSHBUTTON      "View",IDC_VIEWINFO,208,195,37,15\r
-    PUSHBUTTON      "Set",IDC_SETINFO,250,195,37,15\r
-    PUSHBUTTON      "Load",IDC_QUICKLOAD,5,225,44,15\r
-    PUSHBUTTON      "Save",IDC_QUICKSAVE,54,225,44,15\r
-    PUSHBUTTON      "Load From...",IDC_LOAD,121,225,49,15\r
-    PUSHBUTTON      "Delete",IDC_DELETE,251,225,44,15\r
-    PUSHBUTTON      "Save As...",IDC_SAVE,175,225,44,15\r
-END\r
-\r
-IDD_PORTS DIALOGEX 0, 0, 300, 238\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
-    GROUPBOX        "Parallel Port",IDC_SERPARFRAME,5,2,291,68\r
-    RTEXT           "Printer:",IDC_STATIC,12,15,25,15,SS_CENTERIMAGE\r
-    COMBOBOX        IDC_PRINTERLIST,49,15,153,134,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    PUSHBUTTON      "Flush print job",IDC_FLUSHPRINTER,220,15,58,12\r
-    CONTROL         "PostScript detection",IDC_PSPRINTERDETECT,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,11,33,79,12\r
-    CONTROL         "PostScript printer emulation",IDC_PSPRINTER,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,95,33,110,12\r
-    RTEXT           "Autoflush [] Time in seconds after a pending print job is automatically flushed.",IDC_PRINTERAUTOFLUSHTXT,202,32,57,15,SS_NOTIFY | SS_CENTERIMAGE\r
-    EDITTEXT        IDC_PRINTERAUTOFLUSH,263,33,25,12,ES_NUMBER\r
-    RTEXT           "Ghostscript extra parameters:",IDC_STATIC,12,49,102,15,SS_CENTERIMAGE\r
-    EDITTEXT        IDC_PS_PARAMS,124,50,165,12,ES_AUTOHSCROLL\r
-    GROUPBOX        "Serial Port",IDC_SERIALFRAME,4,72,292,48\r
-    COMBOBOX        IDC_SERIAL,49,84,232,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    CONTROL         "Shared",IDC_SER_SHARED,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,15,103,48,12\r
-    CONTROL         "RTS/CTS",IDC_SER_CTSRTS,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,75,103,55,12\r
-    GROUPBOX        "MIDI",IDC_MIDIFRAME,4,123,292,33\r
-    RTEXT           "Out:",IDC_MIDI,10,134,34,15,SS_CENTERIMAGE\r
-    COMBOBOX        IDC_MIDIOUTLIST,50,134,95,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    RTEXT           "In:",IDC_MIDI2,150,134,29,15,SS_CENTERIMAGE\r
-    COMBOBOX        IDC_MIDIINLIST,185,134,95,134,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    GROUPBOX        "Mouse/Joystick Ports",IDC_PORT0,4,158,292,75\r
-    COMBOBOX        IDC_PORT0_JOYS,45,174,241,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_PORT1_JOYS,45,195,241,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    PUSHBUTTON      "Swap ports",IDC_SWAP,211,214,75,14\r
-    RTEXT           "Port 0:",IDC_STATIC,11,173,25,15,SS_CENTERIMAGE\r
-    RTEXT           "Port 1:",IDC_STATIC,11,194,25,15,SS_CENTERIMAGE\r
-    LTEXT           "X-Arcade layout information []#1",IDC_STATIC,16,213,106,15,SS_NOTIFY | SS_CENTERIMAGE\r
-    CONTROL         "Direct []Use when emulating serial-link games on two PCs running WinUAE",IDC_SER_DIRECT,\r
-                    "Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,135,103,65,12\r
-    CONTROL         "uaeserial.device",IDC_UAESERIAL,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,200,103,78,12\r
-END\r
-\r
-IDD_CONTRIBUTORS DIALOGEX 0, 0, 411, 242\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION\r
-CAPTION "UAE Authors and Contributors..."\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
-    DEFPUSHBUTTON   "Ok",ID_OK,177,219,53,14\r
-    CONTROL         "",IDC_CONTRIBUTORS,"RICHEDIT",TCS_HOTTRACK | TCS_VERTICAL | TCS_RAGGEDRIGHT | TCS_OWNERDRAWFIXED | TCS_MULTISELECT | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,4,5,404,206\r
-END\r
-\r
-IDD_ABOUT DIALOGEX 0, 0, 300, 191\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
-    CONTROL         "",IDC_RICHEDIT1,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,45,10,210,15\r
-    CONTROL         "",IDC_RICHEDIT2,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,30,260,13\r
-    PUSHBUTTON      "Contributors",IDC_CONTRIBUTORS,110,55,80,15\r
-    CONTROL         "",IDC_UAEHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,120,80,15\r
-    CONTROL         "",IDC_PICASSOHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,200,90,80,20\r
-    CONTROL         "",IDC_AMIGAHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,109,90,80,20\r
-    CONTROL         "",IDC_WINUAEHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,200,120,80,15\r
-    CONTROL         "",IDC_AIABHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,110,120,80,15\r
-    CONTROL         "",IDC_THEROOTS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,145,80,15\r
-    CONTROL         "",IDC_CAPS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,200,145,80,15\r
-    CONTROL         "",IDC_ABIME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,110,145,80,15\r
-    CONTROL         "",IDC_CLOANTOHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,90,80,20\r
-    CONTROL         "",IDC_AMIGASYS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,63,169,80,15\r
-    CONTROL         "",IDC_AMIKIT,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,157,169,80,15\r
-END\r
-\r
-IDD_MISC1 DIALOGEX 0, 0, 300, 237\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
-    GROUPBOX        "Advanced",IDC_STATIC,8,2,285,110\r
-    CONTROL         "Untrap mouse with middle button",IDC_JULIAN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,15,129,10\r
-    CONTROL         "Show GUI on startup",IDC_SHOWGUI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,27,120,10\r
-    CONTROL         "On-screen LEDs",IDC_SHOWLEDS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,40,115,10\r
-    CONTROL         "uaescsi.device",IDC_SCSIDEVICE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,53,63,10\r
-    CONTROL         "Don't show taskbar button",IDC_NOTASKBARBUTTON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,66,117,10\r
-    CONTROL         "bsdsocket.library emulation",IDC_SOCKETS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,15,120,10\r
-    CONTROL         "Use CTRL-F11 to quit",IDC_CTRLF11,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,27,120,10\r
-    CONTROL         "Synchronize clock",IDC_CLOCKSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,40,115,10\r
-    GROUPBOX        "Keyboard LEDs",IDC_STATIC,7,140,85,94\r
-    COMBOBOX        IDC_KBLED1,22,154,56,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_KBLED2,22,173,56,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_KBLED3,22,193,56,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    GROUPBOX        "Logging",IDC_STATIC,97,140,195,25\r
-    CONTROL         "Create log file",IDC_CREATELOGFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,151,72,10\r
-    CONTROL         "Illegal memory accesses",IDC_ILLEGAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,189,151,95,10\r
-    GROUPBOX        "State Files",IDC_STATIC,98,167,195,68\r
-    PUSHBUTTON      "Load state...",IDC_DOLOADSTATE,105,180,49,14\r
-    PUSHBUTTON      "Save state...",IDC_DOSAVESTATE,105,208,49,14\r
-    CONTROL         "Enable state recording",IDC_STATE_CAPTURE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,200,182,88,10\r
-    RTEXT           "Recording rate (seconds):",IDC_STATIC,157,199,86,10,SS_CENTERIMAGE | WS_TABSTOP\r
-    COMBOBOX        IDC_STATE_RATE,248,197,38,65,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP\r
-    RTEXT           "Recording buffer (MB):",IDC_STATIC,160,219,83,10,SS_CENTERIMAGE | WS_TABSTOP\r
-    COMBOBOX        IDC_STATE_BUFFERSIZE,248,217,38,65,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP\r
-    CONTROL         "Always on top",IDC_ALWAYSONTOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,79,117,10\r
-    CONTROL         "Catweasel",IDC_CATWEASEL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,53,115,10\r
-    CONTROL         "USB mode",IDC_KBLED_USB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,216,64,10\r
-    COMBOBOX        IDC_SCSIMODE,92,51,64,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_LANGUAGE,103,121,179,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    GROUPBOX        "Language",IDC_STATIC,7,113,285,25\r
-    CONTROL         "Disable powersaving features",IDC_POWERSAVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,92,120,10\r
-    CONTROL         "Magic Mouse",IDC_MOUSETRICK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,66,119,10\r
-    CONTROL         "uaenet.device",IDC_SANA2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,79,94,10\r
-    COMBOBOX        IDC_DD_SURFACETYPE,217,93,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    RTEXT           "Display buffer:",IDC_STATIC,159,94,52,10,SS_CENTERIMAGE\r
-END\r
-\r
-IDD_HARDFILE DIALOGEX 0, 0, 299, 249\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Hardfile Settings"\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
-    GROUPBOX        "Settings",IDC_STATIC,10,5,280,146\r
-    RTEXT           "Path:",IDC_HARDFILE_DIR_TEXT,25,18,22,10\r
-    EDITTEXT        IDC_PATH_NAME,52,15,213,15,ES_AUTOHSCROLL\r
-    PUSHBUTTON      "...",IDC_SELECTOR,271,15,11,15\r
-    RTEXT           "FileSys:",IDC_HARDFILE_FILESYS_TEXT,13,38,34,10\r
-    EDITTEXT        IDC_PATH_FILESYS,52,35,213,15,ES_AUTOHSCROLL\r
-    PUSHBUTTON      "...",IDC_FILESYS_SELECTOR,271,35,11,15\r
-    RTEXT           "Device:",IDC_HARDFILE_DEVICE_TEXT,16,58,31,10\r
-    EDITTEXT        IDC_HARDFILE_DEVICE,52,55,66,15,ES_AUTOHSCROLL\r
-    RTEXT           "Boot priority:",IDC_HARDFILE_BOOTPRI_TEXT,20,94,48,8\r
-    EDITTEXT        IDC_HARDFILE_BOOTPRI,73,90,44,15\r
-    CONTROL         "Read/write",IDC_HDF_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,53,74,64,10\r
-    PUSHBUTTON      "Enable RDB mode",IDC_HDF_RDB,174,55,92,14\r
-    RTEXT           "Surfaces:",IDC_SURFACES_TEXT,118,94,32,10\r
-    EDITTEXT        IDC_HEADS,155,90,40,15,ES_NUMBER\r
-    RTEXT           "Reserved:",IDC_RESERVED_TEXT,197,94,35,10\r
-    EDITTEXT        IDC_RESERVED,237,90,40,15,ES_NUMBER\r
-    RTEXT           "Sectors:",IDC_SECTORS_TEXT,120,113,30,10\r
-    EDITTEXT        IDC_SECTORS,155,111,40,15,ES_NUMBER\r
-    RTEXT           "Block size:",IDC_BLOCKSIZE_TEXT,197,113,35,10\r
-    EDITTEXT        IDC_BLOCKSIZE,237,111,40,15,ES_NUMBER\r
-    GROUPBOX        "New hard disk image file",IDC_STATIC,10,156,280,62\r
-    PUSHBUTTON      "Create",IDC_HF_CREATE,23,171,80,14\r
-    EDITTEXT        IDC_HF_SIZE,119,171,61,15,ES_NUMBER\r
-    PUSHBUTTON      "OK",IDOK,102,226,50,14\r
-    PUSHBUTTON      "Cancel",IDCANCEL,158,226,50,14\r
-    EDITTEXT        IDC_HF_DOSTYPE,119,194,61,15\r
-    COMBOBOX        IDC_HF_TYPE,23,195,80,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_HDF_CONTROLLER,73,112,44,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    RTEXT           "DOS type",IDC_STATIC,187,196,32,10,SS_CENTERIMAGE\r
-    RTEXT           "MB",IDC_STATIC,185,174,17,10,SS_CENTERIMAGE\r
-    RTEXT           "HD Controller:",IDC_STATIC,16,113,52,10,SS_CENTERIMAGE\r
-    CONTROL         "Bootable",IDC_HDF_AUTOBOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,136,74,53,10\r
-    CONTROL         "Do not mount",IDC_HDF_DONOTMOUNT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,217,74,67,10\r
-    EDITTEXT        IDC_HDFINFO,16,131,268,12,ES_CENTER | ES_READONLY\r
-    CONTROL         "Sparse file",IDC_HF_SPARSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,220,174,62,10\r
-END\r
-\r
-IDD_FILESYS DIALOGEX 15, 25, 299, 111\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Volume Settings"\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
-    LTEXT           "Device name:",-1,11,7,54,10\r
-    EDITTEXT        IDC_VOLUME_DEVICE,65,5,104,15,ES_AUTOHSCROLL\r
-    LTEXT           "Volume label:",-1,13,28,54,10\r
-    EDITTEXT        IDC_VOLUME_NAME,65,25,104,15,ES_AUTOHSCROLL\r
-    LTEXT           "Path:",-1,38,49,44,10\r
-    EDITTEXT        IDC_PATH_NAME,65,46,227,15,ES_AUTOHSCROLL\r
-    PUSHBUTTON      "Select Directory",IDC_FS_SELECT_DIR,65,66,103,15\r
-    CONTROL         "Read/write",IDC_FS_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,174,7,55,10\r
-    RTEXT           "Boot priority:",IDC_VOLUME_BOOTPRI_TEXT,178,28,49,8\r
-    EDITTEXT        IDC_VOLUME_BOOTPRI,236,25,30,15\r
-    PUSHBUTTON      "OK",IDOK,65,91,48,15\r
-    PUSHBUTTON      "Cancel",IDCANCEL,120,91,48,15\r
-    PUSHBUTTON      "Select Archive or Plain File",IDC_FS_SELECT_FILE,190,66,103,15\r
-    PUSHBUTTON      "Eject",IDC_FS_SELECT_EJECT,230,91,62,15\r
-    CONTROL         "Bootable",IDC_FS_AUTOBOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,236,7,53,10\r
-END\r
-\r
-IDD_SETINFO DIALOGEX 0, 0, 229, 85\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Additional Information Settings"\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
-    RTEXT           "Path:",-1,5,20,24,15,SS_CENTERIMAGE\r
-    EDITTEXT        IDC_PATH_NAME,35,20,169,15,ES_AUTOHSCROLL\r
-    PUSHBUTTON      "...",IDC_SELECTOR,210,20,10,15\r
-    PUSHBUTTON      "OK",IDOK,120,65,48,15\r
-    PUSHBUTTON      "Cancel",IDCANCEL,175,65,48,15\r
-END\r
-\r
-IDD_CHIPSET DIALOGEX 0, 65490, 300, 229\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
-    GROUPBOX        "Chipset",IDC_STATIC,14,11,145,90\r
-    CONTROL         "OCS [] Original chipset. A1000 and most A500s.",IDC_OCS,\r
-                    "Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,37,26,51,10\r
-    CONTROL         "ECS Agnus [] Enhanced chipset (ECS Agnus chip only). CDTV and later A500 and A2000 hardware revisions.",IDC_ECS_AGNUS,\r
-                    "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,37,42,55,10\r
-    CONTROL         "ECS Denise [] Enhanced chipset (ECS Denise chip only). Normally paired with ECS Agnus.",IDC_ECS_DENISE,\r
-                    "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,100,42,55,10\r
-    CONTROL         "Full ECS [] Full ECS chipset (ECS Agnus and ECS Denise chips). A500+, A600 and A3000.",IDC_ECS,\r
-                    "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,37,58,52,10\r
-    CONTROL         "AGA [] Advanced Graphics Architecture chipset. A1200, A4000 and CD32.",IDC_AGA,\r
-                    "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,100,26,51,10\r
-    CONTROL         "NTSC [] North American and Japanese display standard, 60Hz refresh rate. Other countries use PAL (50Hz. display refresh rate)",IDC_NTSC,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,100,58,50,10\r
-    GROUPBOX        "Options",IDC_STATIC,168,11,114,89\r
-    CONTROL         "Immediate Blitter [] Faster but less compatible blitter emulation.",IDC_BLITIMM,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,179,33,96,10\r
-    CONTROL         "Cycle-exact [] The most compatible A500 emulation mode. Very fast PC recommended.",IDC_CYCLEEXACT,\r
-                    "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,179,46,100,10\r
-    GROUPBOX        "Collision Level",IDC_STATIC,14,105,267,48\r
-    CONTROL         "None [] Collision hardware emulation disabled.",IDC_COLLISION0,\r
-                    "Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,37,121,59,10\r
-    CONTROL         "Sprites only [] Emulate only sprite vs. sprite collisions.",IDC_COLLISION1,\r
-                    "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,37,137,62,10\r
-    CONTROL         "Sprites and Sprites vs. Playfield [] Recommended collision emulation level.",IDC_COLLISION2,\r
-                    "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,100,121,161,10\r
-    CONTROL         "Full [] 100% collision hardware emulation. Only very few games need this option. Slowest.",IDC_COLLISION3,\r
-                    "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,100,137,119,10\r
-    GROUPBOX        "Sound Emulation",IDC_STATIC,13,159,268,65\r
-    CONTROL         "Disabled",IDC_CS_SOUND0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,37,175,102,10\r
-    CONTROL         "Emulated",IDC_CS_SOUND1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,37,190,91,10\r
-    CONTROL         "Emulated, 100% accurate",IDC_CS_SOUND2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,37,205,95,10\r
-    CONTROL         "Genlock connected [] Allow boot sequence to detect genlock. Genlock is not emulated.",IDC_GENLOCK,\r
-                    "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,179,59,100,10\r
-    CONTROL         "Faster RTG [] Enables less accurate custom chipset emulation mode when Picasso96 is enabled.",IDC_FASTERRTG,\r
-                    "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,179,72,100,10\r
-    COMBOBOX        IDC_CS_EXT,100,80,49,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    RTEXT           "Chipset Extra",IDC_STATIC,25,79,52,15,SS_CENTERIMAGE\r
-END\r
-\r
-IDD_CHIPSET2 DIALOGEX 0, 65490, 300, 247\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
-    GROUPBOX        "Battery Backed Up Real Time Clock",IDC_STATIC,11,24,275,29\r
-    CONTROL         "None",IDC_CS_RTC1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,19,36,55,10\r
-    CONTROL         "MSM6242B",IDC_CS_RTC2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,90,36,52,10\r
-    CONTROL         "RF5C01A",IDC_CS_RTC3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,159,36,46,10\r
-    EDITTEXT        IDC_CS_RTCADJUST,215,34,64,13,ES_AUTOHSCROLL\r
-    GROUPBOX        "CIA-A TOD Clock Source",IDC_STATIC,11,56,275,29\r
-    CONTROL         "Vertical Sync",IDC_CS_CIAA_TOD1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,19,68,63,10\r
-    CONTROL         "Power Supply 50Hz",IDC_CS_CIAA_TOD2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,90,68,85,10\r
-    CONTROL         "Power Supply 60Hz",IDC_CS_CIAA_TOD3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,186,68,88,10\r
-    CONTROL         "ROM Mirror (A8)",IDC_CS_KSMIRROR_A8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,146,80,10\r
-    CONTROL         "A1000 Boot RAM/ROM",IDC_CS_A1000RAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,95,88,10\r
-    CONTROL         "CD32 CD",IDC_CS_CD32CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,108,76,10\r
-    CONTROL         "CD32 C2P",IDC_CS_CD32C2P,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,108,87,10\r
-    CONTROL         "CD32 NVRAM",IDC_CS_CD32NVRAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,108,84,10\r
-    CONTROL         "CDTV CD",IDC_CS_CDTVCD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,121,47,10\r
-    CONTROL         "CDTV SRAM",IDC_CS_CDTVRAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,120,87,10\r
-    CONTROL         "CDTV SRAM Expansion",IDC_CS_CDTVRAMEXP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,120,90,10\r
-    CONTROL         "A600/A1200 IDE",IDC_CS_IDE1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,133,79,10\r
-    CONTROL         "A4000/A4000T IDE",IDC_CS_IDE2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,133,88,10\r
-    CONTROL         "Ramsey revision:",IDC_CS_RAMSEY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,216,71,10\r
-    EDITTEXT        IDC_CS_RAMSEYREV,91,214,45,13,ES_AUTOHSCROLL\r
-    CONTROL         "Fat Gary revision:",IDC_CS_FATGARY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,229,71,10\r
-    EDITTEXT        IDC_CS_FATGARYREV,91,228,45,13,ES_AUTOHSCROLL\r
-    CONTROL         "A3000 SCSI",IDC_CS_DMAC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,188,76,10\r
-    CONTROL         "Compatible Settings",IDC_CS_COMPATIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,8,234,10\r
-    CONTROL         "DF0: ID Hardware",IDC_CS_DF0IDHW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,95,92,10\r
-    CONTROL         "Agnus/Alice revision:",IDC_CS_AGNUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,147,216,81,10\r
-    EDITTEXT        IDC_CS_AGNUSREV,232,214,45,13,ES_AUTOHSCROLL\r
-    CONTROL         "Denise/Lisa revision:",IDC_CS_DENISE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,147,229,81,10\r
-    EDITTEXT        IDC_CS_DENISEREV,232,228,45,13,ES_AUTOHSCROLL\r
-    CONTROL         "A590/A2091 SCSI",IDC_CS_A2091,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,188,76,10\r
-    CONTROL         "A4000T SCSI",IDC_CS_DMAC2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,188,88,10\r
-    LTEXT           "A4091/A4000T SCSI not yet implemented.",IDC_STATIC,22,174,224,8,SS_CENTERIMAGE\r
-    CONTROL         "PCMCIA",IDC_CS_PCMCIA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,133,92,10\r
-    CONTROL         "A4091 SCSI",IDC_CS_A4091,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,200,76,10\r
-    CONTROL         "CDTV SCSI",IDC_CS_CDTVSCSI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,200,76,10\r
-    CONTROL         "Include host SCSI devices",IDC_CS_SCSIMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,200,101,10\r
-    CONTROL         "C00000 is Fast RAM",IDC_CS_SLOWISFAST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,146,92,10\r
-    CONTROL         "ROM Mirror (E0)",IDC_CS_KSMIRROR_E0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,146,80,10\r
-    CONTROL         "CIA ROM Overlay",IDC_CS_CIAOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,95,80,10\r
-    CONTROL         "KB Reset Warning",IDC_CS_RESETWARNING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,159,80,10\r
-    CONTROL         "No-EHB Denise",IDC_CS_NOEHB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,159,80,10\r
-    CONTROL         "Blitter Busy Bug",IDC_CS_BLITTERBUG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,159,80,10\r
-END\r
-\r
-IDD_AVIOUTPUT DIALOGEX 0, 0, 288, 203\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
-    GROUPBOX        "Output Properties",IDC_STATIC,5,0,274,126\r
-    EDITTEXT        IDC_AVIOUTPUT_FILETEXT,15,15,226,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER,WS_EX_CLIENTEDGE\r
-    PUSHBUTTON      "...",IDC_AVIOUTPUT_FILE,249,15,19,12\r
-    CONTROL         "Audio",IDC_AVIOUTPUT_AUDIO,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_FLAT | WS_TABSTOP,15,33,39,14\r
-    CONTROL         "",IDC_AVIOUTPUT_AUDIO_STATIC,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | SS_SUNKEN | WS_GROUP,59,34,209,13\r
-    CONTROL         "Video",IDC_AVIOUTPUT_VIDEO,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_FLAT | WS_TABSTOP,15,50,39,14\r
-    CONTROL         "",IDC_AVIOUTPUT_VIDEO_STATIC,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | SS_SUNKEN | WS_GROUP,59,51,209,13\r
-    CONTROL         "Disable frame rate limit while recording",IDC_AVIOUTPUT_FRAMELIMITER,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,68,158,10\r
-    CONTROL         "AVI output enabled",IDC_AVIOUTPUT_ACTIVATED,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,15,103,108,14\r
-    CONTROL         "PAL",IDC_AVIOUTPUT_PAL,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,131,103,66,14\r
-    CONTROL         "NTSC",IDC_AVIOUTPUT_NTSC,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,204,103,66,14\r
-    CONTROL         "Slider1",IDC_AVIOUTPUT_FPS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | TBS_ENABLESELRANGE | WS_TABSTOP,166,84,87,11\r
-    LTEXT           "fps",IDC_AVIOUTPUT_FPS_STATIC,255,84,19,8\r
-    PUSHBUTTON      "Save screenshot",IDC_SCREENSHOT,16,141,77,14\r
-    GROUPBOX        "Ripper",IDC_STATIC,5,127,274,38\r
-    PUSHBUTTON      "Pro Wizard 1.62",IDC_PROWIZARD,104,141,77,14,WS_DISABLED\r
-    CONTROL         "Sample ripper",IDC_SAMPLERIPPER_ACTIVATED,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,192,141,77,14\r
-    GROUPBOX        "Input Recorder",IDC_STATIC,5,166,274,33\r
-    CONTROL         "Record",IDC_INPREC_RECORD,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,192,178,77,14\r
-    CONTROL         "Playback",IDC_INPREC_PLAY,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,16,178,77,14\r
-    CONTROL         "Alt. playback mode",IDC_INPREC_PLAYMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,103,180,78,10\r
-    CONTROL         "Disable sound output while recording",IDC_AVIOUTPUT_NOSOUNDOUTPUT,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,85,148,10\r
-END\r
-\r
-IDD_INPUT DIALOGEX 0, 0, 300, 242\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
-    COMBOBOX        IDC_INPUTTYPE,5,5,98,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_INPUTDEVICE,109,5,167,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    CONTROL         "",IDC_INPUTDEVICEDISABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,282,8,9,8\r
-    CONTROL         "List1",IDC_INPUTLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,5,22,290,146\r
-    COMBOBOX        IDC_INPUTAMIGACNT,5,174,24,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_INPUTAMIGA,33,174,262,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    RTEXT           "Joystick dead zone (%):",-1,7,196,79,10,SS_CENTERIMAGE\r
-    EDITTEXT        IDC_INPUTDEADZONE,92,195,25,12,ES_NUMBER\r
-    RTEXT           "Autofire rate (frames):",-1,10,212,76,10,SS_CENTERIMAGE\r
-    EDITTEXT        IDC_INPUTAUTOFIRERATE,92,210,25,12,ES_NUMBER\r
-    RTEXT           "Digital joy-mouse speed:",-1,124,196,84,10,SS_CENTERIMAGE\r
-    EDITTEXT        IDC_INPUTSPEEDD,215,195,25,12,ES_NUMBER\r
-    RTEXT           "Analog joy-mouse speed:",-1,120,212,88,10,SS_CENTERIMAGE\r
-    EDITTEXT        IDC_INPUTSPEEDA,215,211,25,12,ES_NUMBER\r
-    RTEXT           "Mouse speed:",-1,132,228,76,10,SS_CENTERIMAGE\r
-    EDITTEXT        IDC_INPUTSPEEDM,215,227,25,12,ES_NUMBER\r
-    PUSHBUTTON      "Copy from:",IDC_INPUTCOPY,249,195,45,14\r
-    COMBOBOX        IDC_INPUTCOPYFROM,249,211,45,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    PUSHBUTTON      "Swap 1<>2",IDC_INPUTSWAP,249,226,45,14\r
-END\r
-\r
-IDD_FILTER DIALOGEX 0, 0, 296, 224\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
-    GROUPBOX        "Filter Settings",-1,0,0,294,186\r
-    CONTROL         "Enable",IDC_FILTERENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,17,46,10\r
-    COMBOBOX        IDC_FILTERMODE,62,15,61,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_FILTERFILTER,128,15,81,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    PUSHBUTTON      "Reset to defaults",IDC_FILTERDEFAULT,213,15,73,14\r
-    RTEXT           "Horiz. size:",-1,7,44,54,10,SS_CENTERIMAGE\r
-    CONTROL         "Slider1",IDC_FILTERHZ,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,37,152,19\r
-    EDITTEXT        IDC_FILTERHZV,253,39,34,12,ES_CENTER | ES_READONLY\r
-    RTEXT           "Vert. size:",-1,7,64,54,10,SS_CENTERIMAGE\r
-    CONTROL         "Slider1",IDC_FILTERVZ,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,57,152,19\r
-    EDITTEXT        IDC_FILTERVZV,253,59,34,12,ES_CENTER | ES_READONLY\r
-    RTEXT           "Horiz. position:",-1,5,84,55,10,SS_CENTERIMAGE\r
-    CONTROL         "Slider1",IDC_FILTERHO,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,77,151,19\r
-    EDITTEXT        IDC_FILTERHOV,253,79,34,12,ES_CENTER | ES_READONLY\r
-    RTEXT           "Vert. position:",-1,5,103,55,10,SS_CENTERIMAGE\r
-    CONTROL         "Slider1",IDC_FILTERVO,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,97,151,19\r
-    EDITTEXT        IDC_FILTERVOV,253,99,34,12,ES_CENTER | ES_READONLY\r
-    RTEXT           "Extra settings:",-1,27,133,57,10,SS_CENTERIMAGE\r
-    CONTROL         "Slider1",IDC_FILTERXL,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,157,151,19\r
-    EDITTEXT        IDC_FILTERXLV,253,159,34,12,ES_CENTER | ES_READONLY\r
-    COMBOBOX        IDC_FILTERSLR,253,130,33,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    GROUPBOX        "Presets",-1,0,187,296,36\r
-    COMBOBOX        IDC_FILTERPRESETS,8,201,119,150,CBS_DROPDOWN | CBS_SORT | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    PUSHBUTTON      "Load",IDC_FILTERPRESETLOAD,132,200,47,14\r
-    PUSHBUTTON      "Save",IDC_FILTERPRESETSAVE,184,200,47,14\r
-    PUSHBUTTON      "Delete",IDC_FILTERPRESETDELETE,236,200,47,14\r
-    COMBOBOX        IDC_FILTERHZMULT,67,43,27,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_FILTERVZMULT,67,63,27,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    CONTROL         "Autoscale",IDC_FILTERAUTORES,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,9,168,63,10\r
-    COMBOBOX        IDC_FILTERXTRA,105,130,138,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    CONTROL         "Keep aspect ratio",IDC_FILTERASPECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,153,87,10\r
-END\r
-\r
-IDD_HARDDRIVE DIALOGEX 0, 0, 380, 76\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Harddrive Settings"\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
-    LTEXT           "Hard drive:",IDC_STATIC,7,11,80,10\r
-    COMBOBOX        IDC_HARDDRIVE,49,9,325,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    CONTROL         "Read/write",IDC_HDF_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,51,55,10\r
-    DEFPUSHBUTTON   "Add hard drive",IDOK,231,48,65,14\r
-    PUSHBUTTON      "Cancel",IDCANCEL,319,48,54,14\r
-    DEFPUSHBUTTON   "Create hard disk image file",IDC_HARDDRIVE_IMAGE,49,30,115,14\r
-    EDITTEXT        IDC_PATH_NAME,183,27,97,15,ES_AUTOHSCROLL | NOT WS_VISIBLE\r
-    COMBOBOX        IDC_HDF_CONTROLLER,102,50,41,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    RTEXT           "HD Controller:",IDC_STATIC,42,51,52,10,SS_CENTERIMAGE\r
-END\r
-\r
-IDD_MISC2 DIALOGEX 0, 0, 300, 92\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
-    GROUPBOX        "When Active",IDC_STATIC,8,7,88,73\r
-    RTEXT           "Run at priority:",IDC_ACTIVE_PRI,14,17,52,10,SS_CENTERIMAGE | WS_TABSTOP\r
-    COMBOBOX        IDC_ACTIVE_PRIORITY,14,29,76,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    GROUPBOX        "When Inactive",IDC_STATIC,102,7,92,73\r
-    RTEXT           "Run at priority:",IDC_INACTIVE_PRI,109,17,51,10,SS_CENTERIMAGE | WS_TABSTOP\r
-    COMBOBOX        IDC_INACTIVE_PRIORITY,109,29,76,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    CONTROL         "Pause emulation",IDC_INACTIVE_PAUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,109,50,69,10\r
-    CONTROL         "Disable sound",IDC_INACTIVE_NOSOUND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,109,63,79,10\r
-    GROUPBOX        "When Minimized",IDC_STATIC,199,7,92,73\r
-    RTEXT           "Run at priority:",IDC_MINIMIZED_PRI,207,18,51,10,SS_CENTERIMAGE | WS_TABSTOP\r
-    COMBOBOX        IDC_MINIMIZED_PRIORITY,207,29,76,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    CONTROL         "Pause emulation",IDC_MINIMIZED_PAUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,207,50,69,10\r
-    CONTROL         "Disable sound",IDC_MINIMIZED_NOSOUND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,207,63,79,10\r
-END\r
-\r
-IDD_DISK DIALOGEX 0, 0, 300, 242\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_CONTROL | DS_CENTER | DS_CENTERMOUSE | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
-    CONTROL         "",IDC_DISKLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,4,6,292,196\r
-    PUSHBUTTON      "Remove floppy disk image",IDC_DISKLISTREMOVE,156,223,101,15\r
-    COMBOBOX        IDC_DISKTEXT,3,205,293,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP\r
-    PUSHBUTTON      "Insert floppy disk image",IDC_DISKLISTINSERT,41,223,101,15\r
-END\r
-\r
-IDD_PANEL DIALOGEX 0, 0, 420, 278\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
-EXSTYLE WS_EX_ACCEPTFILES | WS_EX_CONTROLPARENT\r
-CAPTION "WinUAE Properties"\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
-    GROUPBOX        "",IDC_PANEL_FRAME,112,4,303,247,NOT WS_VISIBLE\r
-    CONTROL         "",IDC_PANELTREE,"SysTreeView32",TVS_HASLINES | TVS_SHOWSELALWAYS | TVS_NOSCROLL | WS_BORDER | WS_HSCROLL | WS_TABSTOP,5,5,101,248,WS_EX_CLIENTEDGE\r
-    GROUPBOX        "",IDC_PANEL_FRAME_OUTER,110,2,307,251\r
-    PUSHBUTTON      "Reset",IDC_RESETAMIGA,6,259,47,14\r
-    PUSHBUTTON      "Quit",IDC_QUITEMU,57,259,47,14\r
-    DEFPUSHBUTTON   "OK",IDOK,260,259,50,14\r
-    PUSHBUTTON      "Cancel",IDCANCEL,313,259,50,14\r
-    PUSHBUTTON      "Help",IDHELP,366,259,50,14,WS_DISABLED\r
-    PUSHBUTTON      "Restart",IDC_RESTARTEMU,109,259,47,14,NOT WS_VISIBLE\r
-END\r
-\r
-IDD_PATHS DIALOGEX 0, 0, 300, 237\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
-    LTEXT           "System ROMs:",IDC_PATHS_ROML,14,9,260,8,SS_CENTERIMAGE\r
-    EDITTEXT        IDC_PATHS_ROM,14,22,261,15,ES_AUTOHSCROLL\r
-    PUSHBUTTON      "...",IDC_PATHS_ROMS,281,22,11,15\r
-    LTEXT           "Configuration files:",IDC_PATHS_CONFIGL,14,40,260,8,SS_CENTERIMAGE\r
-    EDITTEXT        IDC_PATHS_CONFIG,14,52,261,15,ES_AUTOHSCROLL\r
-    PUSHBUTTON      "...",IDC_PATHS_CONFIGS,281,52,11,15\r
-    LTEXT           "Screenshots:",IDC_PATHS_SCREENSHOTL,14,71,260,8,SS_CENTERIMAGE\r
-    EDITTEXT        IDC_PATHS_SCREENSHOT,14,83,261,15,ES_AUTOHSCROLL\r
-    PUSHBUTTON      "...",IDC_PATHS_SCREENSHOTS,281,83,11,15\r
-    LTEXT           "State files:",IDC_PATHS_STATEFILEL,14,102,260,8,SS_CENTERIMAGE\r
-    EDITTEXT        IDC_PATHS_SAVESTATE,14,114,261,15,ES_AUTOHSCROLL\r
-    PUSHBUTTON      "...",IDC_PATHS_SAVESTATES,281,114,11,15\r
-    LTEXT           "Videos:",IDC_PATHS_AVIOUTPUTL,14,132,260,8,SS_CENTERIMAGE\r
-    EDITTEXT        IDC_PATHS_AVIOUTPUT,14,144,261,15,ES_AUTOHSCROLL\r
-    PUSHBUTTON      "...",IDC_PATHS_AVIOUTPUTS,281,144,11,15\r
-    LTEXT           "Saveimages:",IDC_PATHS_SAVEIMAGEL,14,163,260,8,SS_CENTERIMAGE\r
-    EDITTEXT        IDC_PATHS_SAVEIMAGE,14,175,261,15,ES_AUTOHSCROLL\r
-    PUSHBUTTON      "...",IDC_PATHS_SAVEIMAGES,281,175,11,15\r
-    PUSHBUTTON      "Reset to defaults",IDC_PATHS_DEFAULT,14,199,92,14\r
-    PUSHBUTTON      "Rescan ROMs",IDC_ROM_RESCAN,14,218,92,14\r
-    PUSHBUTTON      "Clear registry",IDC_RESETREGISTRY,112,218,77,14\r
-    COMBOBOX        IDC_PATHS_DEFAULTTYPE,112,199,163,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    PUSHBUTTON      "Clear disk history",IDC_RESETDISKHISTORY,198,218,77,14\r
-END\r
-\r
-IDD_QUICKSTART DIALOGEX 0, 0, 300, 242\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
-    GROUPBOX        "Emulated Hardware",IDC_QUICKSTART_CONFIG,3,0,294,54\r
-    RTEXT           "Model:",IDC_STATIC,5,14,50,10,SS_CENTERIMAGE\r
-    COMBOBOX        IDC_QUICKSTART_MODEL,59,12,233,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    RTEXT           "Configuration:",IDC_STATIC,5,33,50,10,SS_CENTERIMAGE\r
-    COMBOBOX        IDC_QUICKSTART_CONFIGURATION,59,31,233,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    GROUPBOX        "Compatibility vs Required CPU Power ",IDC_QUICKSTART_COMPA,3,56,294,33\r
-    RTEXT           "Best compatibility",IDC_STATIC,13,70,67,10,SS_CENTERIMAGE\r
-    CONTROL         "",IDC_QUICKSTART_COMPATIBILITY,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,95,65,115,21\r
-    RTEXT           "Low compatibility",IDC_STATIC,215,70,63,10,SS_CENTERIMAGE\r
-    GROUPBOX        "Host Configuration",IDC_QUICKSTART_HOST,3,91,294,33\r
-    RTEXT           "Configuration:",IDC_STATIC,5,105,55,10,SS_CENTERIMAGE\r
-    COMBOBOX        IDC_QUICKSTART_HOSTCONFIG,65,103,225,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    GROUPBOX        "Emulated Floppy Drives",IDC_QUICKSTART_DF,3,126,294,84\r
-    CONTROL         "Floppy drive DF0:",IDC_DF0QENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,10,136,72,15\r
-    PUSHBUTTON      "Select disk image",IDC_DF0QQ,85,136,98,15\r
-    RTEXT           "Write-protected",IDC_STATIC,185,139,56,10,SS_CENTERIMAGE\r
-    CONTROL         "",IDC_DF0WPQ,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,246,137,10,15\r
-    PUSHBUTTON      "Eject",IDC_EJECT0Q,261,136,30,15\r
-    COMBOBOX        IDC_DF0TEXTQ,9,154,282,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP\r
-    CONTROL         "Floppy drive DF1:",IDC_DF1QENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,172,71,15\r
-    PUSHBUTTON      "Select disk image",IDC_DF1QQ,85,172,98,15\r
-    RTEXT           "Write-protected",IDC_STATIC,185,175,55,10,SS_CENTERIMAGE\r
-    CONTROL         "",IDC_DF1WPQ,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,246,173,10,15\r
-    PUSHBUTTON      "Eject",IDC_EJECT1Q,261,172,30,15\r
-    COMBOBOX        IDC_DF1TEXTQ,9,190,282,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP\r
-    PUSHBUTTON      "Set configuration",IDC_QUICKSTART_SETCONFIG,9,219,72,15,NOT WS_VISIBLE\r
-    GROUPBOX        "Mode",IDC_STATIC,190,211,107,27,BS_LEFT\r
-    CONTROL         "Start in Quickstart mode",IDC_QUICKSTARTMODE,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,197,222,94,10\r
-END\r
-\r
-IDD_FRONTEND DIALOGEX 0, 0, 420, 242\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
-    CONTROL         "",IDC_FE_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,6,9,235,124\r
-    GROUPBOX        "",IDC_FE_INFO,249,140,160,95\r
-    GROUPBOX        "",IDC_FE_SCREENSHOT,249,7,160,128\r
-END\r
-\r
-IDD_PROGRESSBAR DIALOGEX 0, 0, 229, 58\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Processing..."\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
-    PUSHBUTTON      "Cancel",IDCANCEL,88,40,50,14\r
-    CONTROL         "",IDC_PROGRESSBAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,7,19,215,14\r
-    CTEXT           "x",IDC_PROGRESSBAR_TEXT,23,5,187,10,SS_CENTERIMAGE | WS_TABSTOP\r
-END\r
-\r
-IDD_STRINGBOX DIALOGEX 0, 0, 229, 58\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Enter text..."\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
-    DEFPUSHBUTTON   "OK",IDOK,48,39,50,14\r
-    PUSHBUTTON      "Cancel",IDCANCEL,151,39,50,14\r
-    EDITTEXT        IDC_STRINGBOXEDIT,7,17,214,14,ES_AUTOHSCROLL | ES_WANTRETURN\r
-END\r
-\r
-IDD_DEBUGGER DIALOGEX 0, 0, 454, 368\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME\r
-EXSTYLE WS_EX_CONTROLPARENT\r
-CAPTION "WinUAE Debugger"\r
-FONT 8, "Courier New", 0, 0, 0x0\r
-BEGIN\r
-    EDITTEXT        IDC_DBG_OUTPUT1,1,255,370,86,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | ES_WANTRETURN | WS_VSCROLL | NOT WS_TABSTOP\r
-    EDITTEXT        IDC_DBG_OUTPUT2,1,79,370,262,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | ES_WANTRETURN | WS_VSCROLL | NOT WS_TABSTOP\r
-    LISTBOX         IDC_DBG_MEM,1,92,370,249,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
-    LISTBOX         IDC_DBG_DASM,1,92,370,249,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
-    EDITTEXT        IDC_DBG_MEMINPUT,1,79,36,12,ES_AUTOHSCROLL | ES_WANTRETURN\r
-    EDITTEXT        IDC_DBG_INPUT,1,342,354,12,ES_AUTOHSCROLL | ES_WANTRETURN\r
-    PUSHBUTTON      "?",IDC_DBG_HELP,356,342,15,12,NOT WS_TABSTOP\r
-    PUSHBUTTON      "Set to PC",IDC_DBG_MEMTOPC,38,79,45,12,NOT WS_TABSTOP\r
-    LISTBOX         IDC_DBG_DREG,1,1,52,66,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
-    LISTBOX         IDC_DBG_AREG,54,1,52,66,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
-    LISTBOX         IDC_DBG_AMEM,106,1,231,66,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
-    LISTBOX         IDC_DBG_CCR,338,1,57,42,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
-    LISTBOX         IDC_DBG_SP_VBR,338,44,115,34,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
-    LISTBOX         IDC_DBG_MMISC,396,1,57,42,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
-    LISTBOX         IDC_DBG_PC,1,68,52,10,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
-    LISTBOX         IDC_DBG_PREFETCH,54,68,283,10,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
-    LISTBOX         IDC_DBG_FPREG,372,218,81,66,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
-    LISTBOX         IDC_DBG_FPSR,372,285,81,34,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
-    LISTBOX         IDC_DBG_MISCCPU,372,320,81,34,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
-    CONTROL         "",IDC_DBG_STATUS,"msctls_statusbar32",0x103,0,355,453,12\r
-    LISTBOX         IDC_DBG_BRKPTS,1,79,370,262,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL\r
-    LISTBOX         IDC_DBG_MCUSTOM,372,79,81,138,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
-    LISTBOX         IDC_DBG_MISC,1,79,370,262,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL\r
-    LISTBOX         IDC_DBG_CUSTOM,1,79,370,262,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL\r
-    CONTROL         "Auto set",IDC_DBG_AUTOSET,"Button",BS_AUTOCHECKBOX,84,79,50,12\r
-    LISTBOX         IDC_DBG_DASM2,1,79,370,87,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
-    LISTBOX         IDC_DBG_MEM2,1,167,370,87,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
-END\r
-\r
-IDD_DBGMEMINPUT DIALOGEX 0, 0, 150, 58\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Enter address..."\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
-    DEFPUSHBUTTON   "OK",IDOK,15,39,50,14\r
-    PUSHBUTTON      "Cancel",IDCANCEL,75,39,50,14\r
-    EDITTEXT        IDC_DBG_MEMINPUT2,20,12,100,14,ES_AUTOHSCROLL | ES_WANTRETURN\r
-    CTEXT           "Enter address",IDC_DBG_ADDRINPUTTXT,20,1,100,10,SS_CENTERIMAGE | WS_TABSTOP\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Icon\r
-//\r
-\r
-// Icon with lowest ID value placed first to ensure application icon\r
-// remains consistent on all systems.\r
-IDI_APPICON             ICON                    "winuae.ico"\r
-IDI_FLOPPY              ICON                    "35floppy.ico"\r
-IDI_ABOUT               ICON                    "amigainfo.ico"\r
-IDI_HARDDISK            ICON                    "Drive.ico"\r
-IDI_CPU                 ICON                    "cpu.ico"\r
-IDI_PORTS               ICON                    "joystick.ico"\r
-IDI_INPUT               ICON                    "joystick.ico"\r
-IDI_MISC1               ICON                    "misc.ico"\r
-IDI_MISC2               ICON                    "misc.ico"\r
-IDI_MOVE_UP             ICON                    "move_up.ico"\r
-IDI_MOVE_DOWN           ICON                    "move_dow.ico"\r
-IDI_AVIOUTPUT           ICON                    "avioutput.ico"\r
-IDI_DISK                ICON                    "Drive.ico"\r
-IDI_CONFIGFILE          ICON                    "file.ico"\r
-IDI_FOLDER              ICON                    "folder.ico"\r
-IDI_SOUND               ICON                    "sound.ico"\r
-IDI_DISPLAY             ICON                    "screen.ico"\r
-IDI_ROOT                ICON                    "root.ico"\r
-IDI_MEMORY              ICON                    "chip.ico"\r
-IDI_QUICKSTART          ICON                    "quickstart.ico"\r
-IDI_PATHS               ICON                    "paths.ico"\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Version\r
-//\r
-\r
-VS_VERSION_INFO VERSIONINFO\r
- FILEVERSION 1,5,0,0\r
- PRODUCTVERSION 1,5,0,0\r
- FILEFLAGSMASK 0x3fL\r
-#ifdef _DEBUG\r
- FILEFLAGS 0x1L\r
-#else\r
- FILEFLAGS 0x0L\r
-#endif\r
- FILEOS 0x40004L\r
- FILETYPE 0x1L\r
- FILESUBTYPE 0x0L\r
-BEGIN\r
-    BLOCK "StringFileInfo"\r
-    BEGIN\r
-        BLOCK "040904b0"\r
-        BEGIN\r
-            VALUE "FileDescription", "WinUAE"\r
-            VALUE "FileVersion", "1.5.0"\r
-            VALUE "InternalName", "WinUAE"\r
-            VALUE "LegalCopyright", "© 1996-2008 under the GNU Public License (GPL)"\r
-            VALUE "OriginalFilename", "WinUAE.exe"\r
-            VALUE "ProductName", "WinUAE"\r
-            VALUE "ProductVersion", "1.5.0"\r
-        END\r
-    END\r
-    BLOCK "VarFileInfo"\r
-    BEGIN\r
-        VALUE "Translation", 0x409, 1200\r
-    END\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Cursor\r
-//\r
-\r
-IDC_MYHAND              CURSOR                  "H_arrow.cur"\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Menu\r
-//\r
-\r
-IDM_SYSTRAY MENU \r
-BEGIN\r
-    POPUP "Menu"\r
-    BEGIN\r
-        MENUITEM "Configuration",               ID_ST_CONFIGURATION\r
-        POPUP "Floppy drives"\r
-        BEGIN\r
-            MENUITEM "Eject all drives",            ID_ST_EJECTALL\r
-            MENUITEM "DF0:",                        ID_ST_DF0\r
-            MENUITEM "DF1:",                        ID_ST_DF1\r
-            MENUITEM "DF2:",                        ID_ST_DF2\r
-            MENUITEM "DF3:",                        ID_ST_DF3\r
-        END\r
-        MENUITEM "Reset",                       ID_ST_RESET\r
-        MENUITEM "Help",                        ID_ST_HELP\r
-        MENUITEM "Quit WinUAE",                 ID_ST_QUIT\r
-    END\r
-END\r
-\r
-IDM_DBGCONTEXTMENU MENU \r
-BEGIN\r
-    POPUP "Inactive"\r
-    BEGIN\r
-        POPUP "Copy"\r
-        BEGIN\r
-            MENUITEM "Copy line",                   ID_DBG_COPYLBLINE\r
-            MENUITEM "Copy all",                    ID_DBG_COPYLB\r
-        END\r
-    END\r
-    POPUP "Memory"\r
-    BEGIN\r
-        POPUP "Copy"\r
-        BEGIN\r
-            MENUITEM "Copy line",                   ID_DBG_COPYLBLINE\r
-            MENUITEM "Copy all",                    ID_DBG_COPYLB\r
-        END\r
-        POPUP "Set top address"\r
-        BEGIN\r
-            MENUITEM "Set to A0",                   ID_DBG_SETTOA0\r
-            MENUITEM "Set to A1",                   ID_DBG_SETTOA1\r
-            MENUITEM "Set to A2",                   ID_DBG_SETTOA2\r
-            MENUITEM "Set to A3",                   ID_DBG_SETTOA3\r
-            MENUITEM "Set to A4",                   ID_DBG_SETTOA4\r
-            MENUITEM "Set to A5",                   ID_DBG_SETTOA5\r
-            MENUITEM "Set to A6",                   ID_DBG_SETTOA6\r
-            MENUITEM "Set to A7",                   ID_DBG_SETTOA7\r
-            MENUITEM "Enter address",               ID_DBG_ENTERADDR\r
-        END\r
-    END\r
-    POPUP "Disassembly"\r
-    BEGIN\r
-        POPUP "Copy"\r
-        BEGIN\r
-            MENUITEM "Copy line",                   ID_DBG_COPYLBLINE\r
-            MENUITEM "Copy all",                    ID_DBG_COPYLB\r
-        END\r
-        POPUP "Breakpoints"\r
-        BEGIN\r
-            MENUITEM "Toggle breakpoint",           ID_DBG_TOGGLEBP\r
-            MENUITEM "Clear all breakpoints",       ID_DBG_DELETEBPS\r
-        END\r
-        POPUP "Set top address"\r
-        BEGIN\r
-            MENUITEM "Set to PC",                   ID_DBG_SETTOPC\r
-            MENUITEM "Enter address",               ID_DBG_ENTERADDR\r
-        END\r
-    END\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// WAVE\r
-//\r
-\r
-IDR_DRIVE_STARTUP_A500_1 WAVE                    "drive_startup.wav"\r
-IDR_DRIVE_CLICK_A500_1  WAVE                    "drive_click.wav"\r
-IDR_DRIVE_SPIN_A500_1   WAVE                    "drive_spin.wav"\r
-IDR_DRIVE_SNATCH_A500_1 WAVE                    "drive_snatch.wav"\r
-IDR_DRIVE_SPINND_A500_1 WAVE                    "drive_spinnd.wav"\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Bitmap\r
-//\r
-\r
-IDB_XARCADE             BITMAP                  "xarcade-winuae.bmp"\r
-IDB_LCD160X43           BITMAP                  "lcd.bmp"\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// String Table\r
-//\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_KICKSTART           "ROM"\r
-    IDS_DISK                "Disk swapper"\r
-    IDS_DISPLAY             "Display"\r
-    IDS_HARDDISK            "Hard drives"\r
-    IDS_FLOPPY              "Floppy drives"\r
-    IDS_ABOUT               "About"\r
-    IDS_LOADSAVE            "Configurations"\r
-    IDS_AVIOUTPUT           "Output"\r
-    IDS_PORTS               "Game & I/O ports"\r
-    IDS_MISC1               "Misc"\r
-    IDS_MEMORY              "RAM"\r
-    IDS_CPU                 "CPU and FPU"\r
-    IDS_CHIPSET             "Chipset"\r
-    IDS_INPUT               "Input"\r
-    IDS_FILTER              "Filter"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_MISC2               "Priority"\r
-    IDS_PATHS               "Paths"\r
-    IDS_QUICKSTART          "Quickstart"\r
-    IDS_FRONTEND            "Frontend"\r
-    IDS_CHIPSET2            "Adv. Chipset"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_EXTTEXT             "Floppy disk image files"\r
-    IDS_EXTACTUAL           "ADF"\r
-    IDS_SOUND               "Sound"\r
-    IDS_CDROM               "CD-ROM"\r
-    IDS_FRAMERATE           "Every %1Frame"\r
-    IDS_SECOND              "second "\r
-    IDS_THIRD               "third "\r
-    IDS_FOURTH              "fourth "\r
-    IDS_FIFTH               "fifth "\r
-    IDS_SIXTH               "sixth "\r
-    IDS_SEVENTH             "seventh "\r
-    IDS_EIGHTH              "eighth "\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_NINTH               "ninth "\r
-    IDS_TENTH               "tenth "\r
-    IDS_SELECTADF           "Select a floppy disk image file..."\r
-    IDS_ADF                 "Floppy disk image files"\r
-    IDS_CHOOSEBLANK         "Choose a blank floppy disk image file..."\r
-    IDS_SELECTHDF           "Select a hard disk image file..."\r
-    IDS_HDF                 "Hard disk image files"\r
-    IDS_SELECTUAE           "Select a WinUAE configuration file..."\r
-    IDS_UAE                 "WinUAE configuration files"\r
-    IDS_SELECTROM           "Select a system ROM file..."\r
-    IDS_ROM                 "System ROM files"\r
-    IDS_SELECTKEY           "Select a system ROM key file..."\r
-    IDS_KEY                 "System ROM key files"\r
-    IDS_SELECTINFO          "Select information for your configuration..."\r
-    IDS_NONE                "none"\r
-    IDS_VOLUME              "Volume"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_SELECTFILESYSROOT   "Please select the root directory of the file system..."\r
-    IDS_DEFAULTMIDIOUT      "Default MIDI-Out Device"\r
-    IDS_CONTRIBUTORS1       "Bernd Schmidt - The Grand-Master\nSam Jordan - Custom-chip, floppy-DMA, etc.\nMathias Ortmann - Original WinUAE Main Guy, BSD Socket support\nBrian King - Picasso96 Support, Integrated GUI for WinUAE, previous WinUAE Main Guy\nToni Wilen - Core updates, WinUAE Main Guy\nGustavo Goedert/Peter Remmers/Michael Sontheimer/Tomi Hakala/Tim Gunn/Nemo Pohle - DOS Port Stuff\nSamuel Devulder/Olaf Barthel/Sam Jordan - Amiga Ports\nKrister Bergman - XFree86 and OS/2 Port\nA. Blanchard/Ernesto Corvi - MacOS Port\nChristian Bauer - BeOS Port\nIan Stephenson - NextStep Port\nPeter Teichmann - Acorn/RiscOS Port\nStefan Reinauer - ZorroII/III AutoConfig, Serial Support\nChristian Schmitt/Chris Hames - Serial Support\nHerman ten Brugge - 68020/68881 Emulation Code\nTauno Taipaleenmaki - Various UAE-Control/UAE-Library Support\nBrett Eden/Tim Gunn/Paolo Besser/Nemo Pohle - Various Docs and Web-Sites\nGeorg Veichtlbauer - Help File coordinator, German GUI\nFulvio Leonardi - Italian translator for WinUAE\n"\r
-    IDS_CONTRIBUTORS2       "Bill Panagouleas - Hardware support\nSpecial thanks to Alexander Kneer and Tobias Abt (The Picasso96 Team)\nSteven Weiser  - Postscript printing emulation idea and testing.\nPéter Tóth /Balázs Rátkai/Iván Herczeg/András Arató - Hungarian translation.\nKarsten Bock, Gavin Fance, Dirk Trowe, Christoph Meier and Christian Schindler - Freezer cartridge hardware support."\r
-    IDS_INVALIDPRTPORT      "The printer you have in this configuration is not valid on this machine.\n"\r
-    IDS_RESTOREUSS          "Restore a WinUAE snapshot file"\r
-    IDS_USS                 "WinUAE snapshot files"\r
-    IDS_WRONGOSVERSION      "WinUAE is no longer supported on Windows NT.  Please upgrade to either Windows 2000 or Windows XP or a later version."\r
-    IDS_SELECTFLASH         "Select a flash or battery-backed RAM file..."\r
-    IDS_FLASH               "WinUAE flash or battery-backed RAM file"\r
-    IDS_INPUTHOSTWIDGET     "Input source"\r
-    IDS_INPUTAMIGAEVENT     "Input target"\r
-    IDS_INPUTAUTOFIRE       "Autofire"\r
-    IDS_SAVEUSS             "Save a WinUAE snapshot file"\r
-    IDS_MIDIOVERFLOW        "Sysexbuffer overflow. Should not happen. Please report this to\nberndroesch1@compuserve.de"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_PATH                "Path"\r
-    IDS_RW                  "R/W"\r
-    IDS_SECTORS             "Sectors"\r
-    IDS_SURFACES            "Bill Panagouleas - Hardware support\nSpecial thanks to Alexander Kneer and Tobias Abt (The Picasso96 Team)\nSteven Weiser  - Postscript printing emulation idea and testing.\nHungarian translation - Péter Tóth , Balázs Rátkai , Iván Herczeg , András Arató"\r
-    IDS_RESERVED            "Reserved"\r
-    IDS_BLOCKSIZE           "Block size"\r
-    IDS_NAME                "Name"\r
-    IDS_DESCRIPTION         "Description"\r
-    IDS_COULDNOTLOADCONFIG  "Could not load the selected configuration!\n"\r
-    IDS_NOHELP              "Online help is disabled because the HTML Help functionality is not installed on this system. HTML Help is available from http://www.microsoft.com/downloads/.\n"\r
-    IDS_MUSTSELECTCONFIG    "You must select a configuration or enter a name before selecting Load...\n"\r
-    IDS_INVALIDCOMPORT      "The serial port you have in this configuration is not valid on this machine.\n"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_HFDSIZE             "Size"\r
-    IDS_DEVICE              "Device"\r
-    IDS_BOOTPRI             "BootPri"\r
-    IDS_FLOPPY_COMPATIBLE   " (compatible)"\r
-    IDS_FLOPPY_TURBO        "Turbo"\r
-    IDS_YES                 "yes"\r
-    IDS_NO                  "no"\r
-    IDS_PRI_ABOVENORMAL     "Above Normal"\r
-    IDS_PRI_NORMAL          "Normal"\r
-    IDS_PRI_BELOWNORMAL     "Below Normal"\r
-    IDS_PRI_LOW             "Low"\r
-    IDS_OLDRTGLIBRARY       "The installed LIBS:Picasso96/rtg.library (%d.%d) should be updated.\nA newer version is included in the ""Amiga Programs"" directory\n of the WinUAE distribution archive.\n\nNewer library version fixes graphics problems and increases performance."\r
-    IDS_DEFAULT_AF2005      "Amiga Forever 2005+"\r
-    IDS_DEFAULT_AF          "Amiga Forever"\r
-    IDS_DEFAULT_WINUAE      "WinUAE default (old)"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_SOUND_STEREO2       "Cloned Stereo (4 Channels)"\r
-    IDS_INPUT_CUSTOMEVENT   "<Custom event>"\r
-    IDS_DEFAULT_NEWWINUAE   "WinUAE default (new)"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_UNSUPPORTEDPIXELFORMAT \r
-                            "Error: unsupported pixel format. Please use a different screen mode.\n"\r
-    IDS_MUSTENTERNAME       "You must select a configuration or enter a name before selecting Save...\n"\r
-    IDS_MUSTSELECTCONFIGFORDELETE \r
-                            "You must select a configuration or enter a name before selecting Delete...\n"\r
-    IDS_DELETECONFIGCONFIRMATION \r
-                            "Are you sure you want to Delete this configuration?\n"\r
-    IDS_DELETECONFIGTITLE   "Confirm Delete"\r
-    IDS_MUSTSELECTPATH      "You must select a path!"\r
-    IDS_SETTINGSERROR       "Settings error"\r
-    IDS_MUSTSELECTNAME      "You must select a name for the volume!"\r
-    IDS_MUSTSELECTFILE      "You must select a file!"\r
-    IDS_FAILEDHARDFILECREATION "Failed to create hard disk image file..."\r
-    IDS_CREATIONERROR       "Creation error"\r
-    IDS_ERRORTITLE          "WinUAE message"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_INP                 "WinUAE Input Recording"\r
-    IDS_RESTOREINP          "Playback a WinUAE input recording"\r
-    IDS_SAVEINP             "Record a WinUAE input recording"\r
-    IDS_SCREEN_WINDOWED     "Windowed"\r
-    IDS_SCREEN_FULLSCREEN   "Fullscreen"\r
-    IDS_SCREEN_FULLWINDOW   "Full-window"\r
-    IDS_SCREEN_VSYNC        "VSync"\r
-    IDS_SOUND_MONO          "Mono"\r
-    IDS_SOUND_MIXED         "Mixed"\r
-    IDS_SOUND_STEREO        "Stereo"\r
-    IDS_SOUND_INTERPOL_DISABLED "Disabled"\r
-    IDS_SOUND_FILTER_OFF    "Always off"\r
-    IDS_SOUND_FILTER_EMULATED "Emulated (A500)"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_SOUND_FILTER_EMULATED_E "Emulated (A1200)"\r
-    IDS_INPUT_COMPATIBILITY "Compatibility mode"\r
-    IDS_INPUT_CUSTOM        "Configuration #%d"\r
-    IDS_INPUT_COPY_DEFAULT  "Default"\r
-    IDS_INPUT_COPY_CUSTOM   "Config #%d"\r
-    IDS_3D_NO_FILTER        "Point (%d-bit)"\r
-    IDS_3D_BILINEAR         "Bilinear (%d-bit)"\r
-    IDS_VSYNC_DEFAULT       "Default"\r
-    IDS_DRIVESOUND_NONE     "No sound"\r
-    IDS_DRIVESOUND_DEFAULT_A500 "A500 (WinUAE built-in)"\r
-    IDS_AVIOUTPUT_NOCODEC   "no codec selected"\r
-    IDS_DISK_IMAGENAME      "Disk image"\r
-    IDS_DISK_DRIVENAME      "Drive"\r
-    IDS_AGA8BIT             "AGA emulation requires a 16-bit or higher display depth.\nSwitching from 8-bit to 16-bit."\r
-    IDS_UNSUPPORTEDSCREENMODE \r
-                            "The selected screen mode can't be displayed in a window, because %s\nSwitching to full-screen display."\r
-    IDS_UNSUPPORTEDSCREENMODE_1 \r
-                            "the desktop is running in an unknown color mode."\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_UNSUPPORTEDSCREENMODE_2 \r
-                            "the desktop is running in 8-bit color depth, which WinUAE can't use in windowed mode."\r
-    IDS_UNSUPPORTEDSCREENMODE_3 \r
-                            "the desktop is too small for the specified window size."\r
-    IDS_UNSUPPORTEDSCREENMODE_4 \r
-                            "you selected an RTG (Picasso96) display with unsupported color depth."\r
-    IDS_FLOPPYTYPE35DD      "3.5"" DD"\r
-    IDS_FLOPPYTYPE35HD      "3.5"" HD"\r
-    IDS_FLOPPYTYPE525SD     "5.25"" SD"\r
-    IDS_FLOPPYTYPEDISABLED  "Disabled"\r
-    IDS_STMENUNOFLOPPY      "No floppy disk inserted"\r
-    IDS_TREEVIEW_HARDWARE   "Hardware"\r
-    IDS_TREEVIEW_HOST       "Host"\r
-    IDS_TREEVIEW_MISC       "Miscellaneous"\r
-    IDS_TREEVIEW_SETTINGS   "Settings"\r
-    IDS_WINUAETITLE_MMB     "[Mouse active - press ALT+TAB or middle mouse button to cancel]"\r
-    IDS_WINUAETITLE_NORMAL  "[Mouse active - press ALT+TAB to cancel]"\r
-    IDS_STARTEMULATION      "Start"\r
-    IDS_TREEVIEW_ABOUT      "About"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_NOHARDDRIVES        "No hard disks detected that were either empty or RDB-partitioned."\r
-    IDS_DEFAULT_HOST        "Default Configuration"\r
-    IDS_SOUND_4CHANNEL      "4 Channels"\r
-    IDS_HF_FS_CUSTOM        "Custom"\r
-    IDS_SELECTFS            "Select file system handler (FastFileSystem, SmartFilesystem, etc.)"\r
-    IDS_KEYJOY              "Keyboard Layout A (Numeric keypad, 0 and 5 = Fire)\nKeyboard Layout B (Cursor keys, Right CTRL and ALT = Fire)\nKeyboard Layout C (W=Up S=Down A=Left D=Right, Left ALT = Fire)\nX-Arcade (Left)\nX-Arcade (Right)"\r
-    IDS_STATEFILE_UNCOMPRESSED "Uncompressed"\r
-    IDS_STATEFILE_RAMDUMP   "RAM dump"\r
-    IDS_STATEFILE_WAVE      "Wave audio dump"\r
-    IDS_SOUND_SWAP_PAULA    "Paula only"\r
-    IDS_SOUND_SWAP_AHI      "AHI only"\r
-    IDS_SOUND_SWAP_BOTH     "Both"\r
-    IDS_SOUND_FILTER_ON_AGA "Always on (A500)"\r
-    IDS_SOUND_FILTER_ON_A500 "Always on (A1200)"\r
-    IDS_DRIVESOUND_PC_FLOPPY "PC floppy drive %c"\r
-    IDS_FLOPPYTYPE35DDESCOM "3.5"" ESCOM"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_NUMSG_NEEDEXT2      "The software uses a non-standard floppy disk format. You may need to use a custom floppy disk image file instead of a standard one. This message will not appear again."\r
-    IDS_NUMSG_NOROMKEY      "Could not find system ROM key file."\r
-    IDS_NUMSG_KSROMCRCERROR "System ROM checksum incorrect. The system ROM image file may be corrupt."\r
-    IDS_NUMSG_KSROMREADERROR "Error while reading system ROM."\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_NUMSG_NOEXTROM      "No extended ROM found."\r
-    IDS_NUMSG_MODRIP_NOTFOUND "No music modules or packed data found."\r
-    IDS_NUMSG_MODRIP_FINISHED "Scan finished."\r
-    IDS_NUMSG_MODRIP_SAVE   "Module/packed data found\n%s\nStart address %08.8X, Size %d bytes\nWould you like to save it?"\r
-    IDS_NUMSG_KS68020       "The selected system ROM requires a 68020 with 32-bit addressing or 68030 or higher CPU."\r
-    IDS_NUMSG_ROMNEED       "One of the following system ROMs is required:\n\n%s\n\nCheck the System ROM path in the Paths panel and click Rescan ROMs."\r
-    IDS_NUMSG_STATEHD       "WARNING: Current configuration is not fully compatible with state saves.\nThis message will not appear again."\r
-    IDS_NUMSG_NOCAPS        "Selected disk image needs the SPS plugin\nwhich is available from\nhttp//www.softpres.org/"\r
-    IDS_NUMSG_OLDCAPS       "You need an updated SPS plugin\nwhich is available from\nhttp//www.softpres.org/"\r
-    IDS_IMGCHK_BOOTBLOCKCRCERROR \r
-                            "The selected floppy disk image is not bootable (boot block checksum error)"\r
-    IDS_IMGCHK_BOOTBLOCKNO  "The selected floppy disk image is not bootable (no boot block)"\r
-    IDS_IMGCHK_DAMAGED      "The selected floppy disk image is damaged or unformatted"\r
-    IDS_IMGCHK_KS2          "The selected floppy disk image requires a 2.04 or later system ROM.\nThe configuration has been updated."\r
-    IDS_IMGCHK_KS3          "The selected floppy disk image requires a 3.0 or later system ROM.\nThe configuration has been updated."\r
-    IDS_ROMSCANEND          "Scan of ROMs finished"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_ROM_AVAILABLE       "available"\r
-    IDS_ROM_UNAVAILABLE     "unavailable"\r
-    IDS_HARDDRIVESAFETYWARNING1 \r
-                            "Warning: The drive safety check is active. Selected drive is not empty and non-RDB partitioned."\r
-    IDS_NUMSG_KS68EC020     "The selected system ROM requires a 68020 with 24-bit addressing or higher CPU."\r
-    IDS_ROMSCANNOROMS       "No supported system ROMs detected."\r
-    IDS_NUMSG_KICKREP       "You need to have a floppy disk (image file) in DF0: to use the system ROM replacement."\r
-    IDS_NUMSG_KICKREPNO     "The floppy disk (image file) in DF0: is not compatible with the system ROM replacement functionality."\r
-    IDS_NUMSG_NOROM         "Could not load system ROM, trying system ROM replacement."\r
-    IDS_HDCLONE_OK          "Hard drive image file created succesfully."\r
-    IDS_HDCLONE_FAIL        "Hard drive image file creation failed.\nError code %d:%d."\r
-    IDS_NUMSG_KS68030       "The selected system ROM requires a 68030 CPU."\r
-    IDS_NUMSG_EXPROMNEED    "One of the following expansion boot ROMs is required:\n\n%s\n\nCheck the System ROM path in the Paths panel and click Rescan ROMs."\r
-    IDS_HARDDRIVESAFETYWARNING2 \r
-                            "Warning: The drive safety check has been disabled, and non-empty and non-RDB partitioned hard disk(s) were detected."\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_QS_MODELS           "A500\nA500+\nA600\nA1000\nA1200\nA3000\nA4000\nCD32\nCDTV\nArcadia Multi Select system\nExpanded WinUAE example configuration"\r
-    IDS_QS_MODEL_A500       "1.3 ROM, OCS, 512 KB Chip + 512 KB Slow RAM (most common)\nThis configuration is capable of running most games and demos produced for first-generation hardware. Only few exceptions need a different configuration (e.g. the oldest games tend to be incompatible with this configuration).\n1.3 ROM, ECS Agnus, 512 KB Chip RAM + 512 KB Slow RAM\nLater hardware revision of the A500. Nearly 100% compatible with the previous configuration.\n1.3 ROM, ECS Agnus, 1 MB Chip RAM\nFew newer games and demos require this configuration.\n1.3 ROM, OCS Agnus, 512 KB Chip RAM\nVery old (e.g. pre-1988) games and demos may require this configuration.\n1.2 ROM, OCS Agnus, 512 KB Chip RAM\nAs available for the A1000, and installed on the first A500 and A2000 series. Some very old programs only work correctly with this configuration. Note: This system ROM version can only boot from floppy disk (no hard disk boot support).\n1.2 ROM, OCS Agnus, 512 KB Chip RAM + 512 KB Slow RAM\nThis configuration adds expansion memory to the first A500 produced. Try this if your game does not work with newer configurations, but works with the previous one. It could add some features to the game, including faster loading times. Note: This system ROM version can only boot from floppy disk (no hard disk boot support)."\r
-    IDS_QS_MODEL_A500P      "Basic non-expanded configuration\nThe A500+ adds an ECS Agnus chip, 1 MB of Chip RAM and a 2.0 ROM to the A500. Many A500 games and demos don't work properly on an A500+.\n2 MB Chip RAM expanded configuration\n\n4 MB Fast RAM expanded configuration\n"\r
-    IDS_QS_MODEL_A600       "Basic non-expanded configuration\nThe A600 is smaller than the A500+ and has an updated 2.0 ROM.\n2 MB Chip RAM expanded configuration\n\n4 MB Fast RAM expanded configuration\n"\r
-    IDS_QS_MODEL_A1000      "512 KB Chip RAM\nThe A1000 was the first model produced, with a configuration equivalent to that of an A500 with OCS chipset. You normally don't need to use this configuration, unless you are nostalgic and would like to hear the short A1000 boot tune\n""ICS"" Denise without EHB support\nVery first A1000 models had Denise without EHB capability.\n256 KB Chip RAM\n Unexpanded A1000. All later A1000 models were sold with a 256 KB RAM expansion built-in."\r
-    IDS_QS_MODEL_A1200      "Basic non-expanded configuration\nUse this configuration to run most AGA demos and games\n4 MB Fast RAM expanded configuration\nSome newer AGA games and demos need an expanded A1200 to run."\r
-    IDS_QS_MODEL_CD32       "CD32\nThe CD32 was one the first 32-bit consoles on the market. It is basically an A1200 with a built-in CD-ROM drive. Insert your CD32 or CDTV CD-ROM into a free CD-ROM drive before starting the emulation."\r
-    IDS_QS_MODEL_CDTV       "CDTV\nThe CDTV was the first model with a built-in CD-ROM drive. Looking like a black CD player, it featured a configuration equivalent to that of an A500 with 1 MB RAM and an ECS chipset.\nFloppy drive and 64KB SRAM card expanded CDTV\n"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_QS_MODEL_UAE        "High-end expanded configuration"\r
-    IDS_QS_MODEL_ARCADIA    "Arcadia\nArcadia Multi Select system is arcade platform developed by Arcadia and  Mastertronic. It is based on an A500 mainboard with ROM cage attached to expansion port. Arcadia ROM files go to ""Cartridge ROM File"" in ROM-panel."\r
-    IDS_QS_MODEL_A3000      "1.4 ROM, 2MB Chip + 8MB Fast\n\n2.04 ROM, 2MB Chip + 8MB Fast\n\n3.1 ROM, 2MB Chip + 8MB Fast\n"\r
-    IDS_QS_MODEL_A4000      "68030, 3.1 ROM, 2MB Chip + 8MB Fast\n\n68040, 3.1 ROM, 2MB Chip + 8MB Fast\n"\r
-    IDS_QS_MODEL_A4000T     "A4000T (test)\nA4000T"\r
-END\r
-\r
-#endif    // English (U.S.) resources\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// Finnish resources\r
-\r
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FIN)\r
-#ifdef _WIN32\r
-LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT\r
-#pragma code_page(1252)\r
-#endif //_WIN32\r
-\r
-#ifdef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// TEXTINCLUDE\r
-//\r
-\r
-1 TEXTINCLUDE \r
-BEGIN\r
-    "resource.\0"\r
-END\r
-\r
-3 TEXTINCLUDE \r
-BEGIN\r
-    "\r\0"\r
-END\r
-\r
-2 TEXTINCLUDE \r
-BEGIN\r
-    "#include ""afxres.h""\r\0"\r
-END\r
-\r
-#endif    // APSTUDIO_INVOKED\r
-\r
-#endif    // Finnish resources\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-\r
-\r
-#ifndef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 3 resource.\r
-//\r
-\r\r
-/////////////////////////////////////////////////////////////////////////////\r
-#endif    // not APSTUDIO_INVOKED\r
-\r
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Accelerator
+//
+
+IDR_DBGACCEL ACCELERATORS 
+BEGIN
+    VK_F1,          ID_DBG_PAGE1,           VIRTKEY, NOINVERT
+    VK_F2,          ID_DBG_PAGE2,           VIRTKEY, NOINVERT
+    VK_F3,          ID_DBG_PAGE3,           VIRTKEY, NOINVERT
+    VK_F4,          ID_DBG_PAGE4,           VIRTKEY, NOINVERT
+    VK_F5,          ID_DBG_PAGE5,           VIRTKEY, NOINVERT
+    VK_F6,          ID_DBG_PAGE6,           VIRTKEY, NOINVERT
+    VK_F7,          ID_DBG_PAGE7,           VIRTKEY, NOINVERT
+    VK_F8,          ID_DBG_PAGE8,           VIRTKEY, NOINVERT
+    VK_F9,          ID_DBG_PAGE9,           VIRTKEY, NOINVERT
+    VK_F11,         ID_DBG_STEP_OVER,       VIRTKEY, NOINVERT
+    VK_F12,         ID_DBG_STEP_INTO,       VIRTKEY, NOINVERT
+    VK_DOWN,        IDC_DBG_MEMDOWN,        VIRTKEY, ALT, NOINVERT
+    VK_RIGHT,       IDC_DBG_MEMDOWNFAST,    VIRTKEY, ALT, NOINVERT
+    VK_UP,          IDC_DBG_MEMUP,          VIRTKEY, ALT, NOINVERT
+    VK_LEFT,        IDC_DBG_MEMUPFAST,      VIRTKEY, ALT, NOINVERT
+    "H",            IDC_DBG_HELP,           VIRTKEY, ALT, NOINVERT
+    "P",            IDC_DBG_MEMTOPC,        VIRTKEY, ALT, NOINVERT
+    "A",            IDC_DBG_AUTOSET,        VIRTKEY, ALT, NOINVERT
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_KICKSTART DIALOGEX 0, 0, 300, 176
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+EXSTYLE WS_EX_CONTEXTHELP
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    GROUPBOX        "System ROM Settings",-1,5,0,290,93
+    RTEXT           "Main ROM file:",IDC_ROMTEXT,10,13,75,10
+    COMBOBOX        IDC_ROMFILE,12,26,263,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "...",IDC_KICKCHOOSER,280,25,10,15
+    RTEXT           "Extended ROM file:",IDC_ROMFILE2TEXT,10,43,75,10
+    COMBOBOX        IDC_ROMFILE2,12,56,263,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "...",IDC_ROMCHOOSER2,280,55,10,15
+    CONTROL         "MapROM emulation [] Creates a BlizKick-compatible memory area.",IDC_MAPROM,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,95,77,87,10
+    CONTROL         "ShapeShifter support [] Patches the system ROM for ShapeShifter compatibility.",IDC_KICKSHIFTER,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,77,87,10
+    GROUPBOX        "Miscellaneous",-1,5,99,290,75
+    RTEXT           "Cartridge ROM file:",IDC_FLASHTEXT2,8,110,75,10
+    COMBOBOX        IDC_CARTFILE,12,123,263,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "...",IDC_CARTCHOOSER,280,122,10,15
+    RTEXT           "Flash RAM file:",IDC_FLASHTEXT,8,142,75,10
+    EDITTEXT        IDC_FLASHFILE,12,155,262,13,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_FLASHCHOOSER,280,154,10,15
+END
+
+IDD_DISPLAY DIALOGEX 0, 0, 300, 235
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    GROUPBOX        "Screen",IDC_SCREENRESTEXT,12,0,270,67,BS_LEFT
+    RTEXT           "Full screen:",IDC_SELECTRESTEXT,15,17,40,15,SS_CENTERIMAGE
+    COMBOBOX        IDC_DISPLAYSELECT,59,10,215,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_RESOLUTION,59,27,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_REFRESHRATE,187,27,87,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    EDITTEXT        IDC_XSIZE,59,48,48,12,ES_NUMBER
+    EDITTEXT        IDC_YSIZE,114,48,47,12,ES_NUMBER
+    GROUPBOX        "Settings",IDC_SETTINGSTEXT,12,73,199,125
+    CONTROL         "Correct aspect ratio",IDC_ASPECT,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,19,126,92,10
+    LTEXT           "Refresh:",IDC_REFRESHTEXT,18,162,28,8
+    CONTROL         "Slider1",IDC_FRAMERATE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,47,157,75,20
+    EDITTEXT        IDC_RATETEXT,124,161,77,12,ES_CENTER | ES_READONLY
+    GROUPBOX        "Centering",IDC_STATIC,221,73,61,49
+    CONTROL         "Horizontal",IDC_XCENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,229,87,49,10
+    CONTROL         "Vertical",IDC_YCENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,229,103,49,10
+    GROUPBOX        "Line Mode",IDC_LINEMODE,222,126,61,73
+    CONTROL         "Normal",IDC_LM_NORMAL,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_GROUP | WS_TABSTOP,231,142,44,10
+    CONTROL         "Double",IDC_LM_DOUBLED,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,231,158,45,10
+    CONTROL         "Scanlines",IDC_LM_SCANLINES,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,231,174,46,10
+    COMBOBOX        IDC_DA_MODE,20,211,58,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "",IDC_DA_SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,84,207,101,20
+    LTEXT           "FPS adj.:",IDC_REFRESH2TEXT,16,182,32,8
+    CONTROL         "",IDC_FRAMERATE2,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,47,177,127,20
+    EDITTEXT        IDC_RATE2TEXT,175,181,26,12,ES_CENTER | ES_READONLY
+    COMBOBOX        IDC_RESOLUTIONDEPTH,134,27,46,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Filtered low resolution",IDC_LORES_SMOOTHED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,126,89,10
+    COMBOBOX        IDC_SCREENMODE_NATIVE,100,85,102,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_SCREENMODE_RTG,100,103,102,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "Native mode:",IDC_STATIC,19,85,59,15,SS_CENTERIMAGE
+    RTEXT           "Windowed:",IDC_WINDOWEDTEXT,15,51,40,8
+    RTEXT           "RTG mode:",IDC_STATIC,19,101,59,15,SS_CENTERIMAGE
+    PUSHBUTTON      "Reset to defaults",IDC_DA_RESET,212,211,73,14
+    RTEXT           "Resolution:",IDC_STATIC,27,140,59,15,SS_CENTERIMAGE
+    COMBOBOX        IDC_LORES,100,140,102,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+END
+
+IDD_MEMORY DIALOGEX 0, 0, 300, 239
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+EXSTYLE WS_EX_CONTEXTHELP
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    GROUPBOX        "Memory Settings",-1,14,7,274,69
+    RTEXT           "Chip:",-1,24,26,20,10,SS_CENTERIMAGE
+    CONTROL         "Slider1",IDC_CHIPMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,54,22,50,20
+    EDITTEXT        IDC_CHIPRAM,105,25,30,12,ES_CENTER | ES_READONLY
+    RTEXT           "Slow:",-1,149,26,20,10,SS_CENTERIMAGE
+    CONTROL         "Slider1",IDC_SLOWMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,179,22,60,20
+    EDITTEXT        IDC_SLOWRAM,243,25,30,12,ES_CENTER | ES_READONLY
+    RTEXT           "Fast:",IDC_FASTTEXT,24,51,20,10,SS_CENTERIMAGE
+    CONTROL         "Slider1",IDC_FASTMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,54,47,50,20
+    EDITTEXT        IDC_FASTRAM,105,53,30,12,ES_CENTER | ES_READONLY
+    RTEXT           "Z3 Fast:",IDC_Z3TEXT,139,51,30,10,SS_CENTERIMAGE
+    CONTROL         "Slider1",IDC_Z3FASTMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,179,47,60,20
+    EDITTEXT        IDC_Z3FASTRAM,243,50,30,12,ES_CENTER | ES_READONLY
+    RTEXT           "Memory: [] Graphics card memory. Required for RTG (Picasso96) emulation.",IDC_GFXCARDTEXT,25,98,53,10,SS_NOTIFY | SS_CENTERIMAGE
+    CONTROL         "Slider1",IDC_P96MEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,88,94,60,20
+    EDITTEXT        IDC_P96RAM,152,97,30,12,ES_CENTER | ES_READONLY
+    GROUPBOX        "Advanced Memory Settings",-1,13,171,275,65
+    RTEXT           "Motherboard RAM (Low area):",-1,39,190,129,10,SS_CENTERIMAGE
+    CONTROL         "",IDC_MBMEM1,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,180,186,59,20
+    EDITTEXT        IDC_MBRAM1,243,189,30,12,ES_CENTER | ES_READONLY
+    RTEXT           "Motherboard RAM (High area):",-1,39,215,129,10,SS_CENTERIMAGE
+    CONTROL         "",IDC_MBMEM2,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,180,211,59,20
+    EDITTEXT        IDC_MBRAM2,243,214,30,12,ES_CENTER | ES_READONLY
+    GROUPBOX        "RTG Graphics Card Settings",-1,14,81,275,87
+    CONTROL         "Scale instead of switching resolution",IDC_RTG_SCALE,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,134,162,10
+    CONTROL         "Match host and RTG color depth if possible",IDC_RTG_MATCH_DEPTH,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,119,163,10
+    COMBOBOX        IDC_RTG_8BIT,211,101,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_RTG_16BIT,211,117,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_RTG_24BIT,211,133,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_RTG_32BIT,211,149,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+END
+
+IDD_CPU DIALOGEX 0, 0, 300, 226
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+    GROUPBOX        "CPU",IDC_STATIC,5,3,81,139,BS_LEFT
+    CONTROL         "68000",IDC_CPU0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,16,63,10
+    CONTROL         "68010",IDC_CPU1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,30,65,10
+    CONTROL         "68020",IDC_CPU2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,44,63,10
+    CONTROL         "68030",IDC_CPU3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,58,64,10
+    CONTROL         "68040",IDC_CPU4,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,72,66,10
+    CONTROL         "68060",IDC_CPU5,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,86,66,10
+    CONTROL         "More compatible [] Emulate 68000's prefetch registers. More compatible but slower.",IDC_COMPATIBLE,
+                    "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,10,114,73,8
+    CONTROL         "JIT [] Enable just-in-time CPU emulator. Significantly increases the speed of the CPU emulation. Requires 68020 or higher CPU.",IDC_JITENABLE,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,127,73,10
+    GROUPBOX        "CPU Emulation Speed",IDC_STATIC,90,3,205,90
+    CONTROL         "Fastest possible, but maintain chipset timing",IDC_CS_HOST,
+                    "Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_GROUP | WS_TABSTOP,95,18,195,10
+    CONTROL         "Match A500 speed",IDC_CS_68000,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,95,32,195,10
+    CONTROL         "Adjustable between CPU and chipset",IDC_CS_ADJUSTABLE,
+                    "Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,95,46,195,10
+    RTEXT           "CPU",IDC_CS_CPU_TEXT,96,73,15,10,SS_CENTERIMAGE | WS_TABSTOP
+    CONTROL         "Slider1",IDC_SPEED,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,114,68,67,20
+    LTEXT           "Chipset",IDC_CS_CHIPSET_TEXT,182,73,25,10,SS_CENTERIMAGE | NOT WS_GROUP | WS_TABSTOP
+    RTEXT           "CPU idle",IDC_CS_CPU_TEXT2,236,56,32,10,SS_CENTERIMAGE | WS_TABSTOP
+    CONTROL         "",IDC_CPUIDLE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,219,68,69,20
+    GROUPBOX        "Advanced JIT Settings",IDC_STATIC,90,94,205,93
+    RTEXT           "Cache size:",IDC_CS_CACHE_TEXT,95,113,45,10,SS_CENTERIMAGE | WS_TABSTOP
+    CONTROL         "Slider1",IDC_CACHE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,140,108,115,20
+    EDITTEXT        IDC_CACHETEXT,255,113,30,12,ES_CENTER | ES_READONLY
+    CONTROL         "Hard flush",IDC_HARDFLUSH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,100,141,63,10
+    CONTROL         "Constant jump",IDC_CONSTJUMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,100,155,63,10
+    CONTROL         "FPU support",IDC_JITFPU,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,100,169,62,10
+    CONTROL         "No flags",IDC_NOFLAGS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,141,62,10
+    CONTROL         "Direct",IDC_TRUST0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,235,141,52,10
+    CONTROL         "Indirect",IDC_TRUST1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,235,155,52,10
+    CONTROL         "More compatible [] More compatible but slower FPU emulation.",IDC_COMPATIBLE_FPU,
+                    "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,9,210,73,10
+    GROUPBOX        "FPU",IDC_STATIC,6,146,81,80,BS_LEFT
+    CONTROL         "24-bit addressing",IDC_COMPATIBLE24,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,10,100,73,8
+    CONTROL         "None",IDC_FPU0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,14,157,63,10
+    CONTROL         "68881",IDC_FPU1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,14,171,63,10
+    CONTROL         "68882",IDC_FPU2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,14,185,63,10
+    CONTROL         "CPU internal",IDC_FPU3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,14,199,63,10
+END
+
+IDD_FLOPPY DIALOGEX 0, 0, 300, 240
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+    COMBOBOX        IDC_DF0TEXT,2,22,296,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_DF0TYPE,115,6,57,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "Write-protected",IDC_STATIC,174,8,59,10,SS_CENTERIMAGE
+    CONTROL         "",IDC_DF0WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,4,10,15
+    PUSHBUTTON      "Eject",IDC_EJECT0,253,4,30,15
+    PUSHBUTTON      "...",IDC_DF0,287,4,10,15
+    COMBOBOX        IDC_DF1TEXT,2,58,296,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_DF1TYPE,115,42,57,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "Write-protected",IDC_STATIC,174,43,59,10,SS_CENTERIMAGE
+    CONTROL         "",IDC_DF1WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,40,10,15
+    PUSHBUTTON      "Eject",IDC_EJECT1,253,40,30,15
+    PUSHBUTTON      "...",IDC_DF1,287,40,10,15
+    COMBOBOX        IDC_DF2TEXT,2,93,296,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_DF2TYPE,115,77,57,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "Write-protected",IDC_STATIC,174,77,59,10,SS_CENTERIMAGE
+    CONTROL         "",IDC_DF2WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,75,9,15
+    PUSHBUTTON      "Eject",IDC_EJECT2,253,75,30,15
+    PUSHBUTTON      "...",IDC_DF2,287,75,10,15
+    COMBOBOX        IDC_DF3TEXT,2,128,296,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_DF3TYPE,115,112,57,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "Write-protected",IDC_STATIC,174,113,59,10,SS_CENTERIMAGE
+    CONTROL         "",IDC_DF3WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,111,9,15
+    PUSHBUTTON      "Eject",IDC_EJECT3,253,110,30,15
+    PUSHBUTTON      "...",IDC_DF3,287,109,10,15
+    GROUPBOX        "New Floppy Disk Image",IDC_SETTINGSTEXT,5,183,289,49
+    COMBOBOX        IDC_FLOPPYTYPE,16,197,51,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "Create Standard Disk [] Creates a standard 880 or 1760 KB ADF disk image.",IDC_CREATE,77,196,97,15
+    PUSHBUTTON      "Create Custom Disk [] Creates a low level (MFM) ADF disk image (about 2MB). Useful for programs that use non-standard disk formats (for example some save disks or DOS-formatted floppies)",IDC_CREATE_RAW,183,196,101,15
+    GROUPBOX        "Floppy Drive Emulation Speed",IDC_SETTINGSTEXT2,5,144,289,35
+    CONTROL         "",IDC_FLOPPYSPD,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,32,154,116,20
+    EDITTEXT        IDC_FLOPPYSPDTEXT,183,157,101,12,ES_CENTER | ES_READONLY
+    PUSHBUTTON      "Delete save image",IDC_SAVEIMAGE0,43,5,70,15,NOT WS_VISIBLE
+    PUSHBUTTON      "Delete save image",IDC_SAVEIMAGE1,43,40,70,15,NOT WS_VISIBLE
+    PUSHBUTTON      "Delete save image",IDC_SAVEIMAGE2,43,75,70,15,NOT WS_VISIBLE
+    PUSHBUTTON      "Delete save image",IDC_SAVEIMAGE3,43,110,70,15,NOT WS_VISIBLE
+    EDITTEXT        IDC_CREATE_NAME,77,215,97,13,ES_AUTOHSCROLL
+    RTEXT           "Disk label:",IDC_STATIC,15,216,52,10,SS_CENTERIMAGE
+    CONTROL         "DF0:",IDC_DF0ENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,3,6,34,15
+    CONTROL         "DF1:",IDC_DF1ENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,3,41,34,15
+    CONTROL         "DF2:",IDC_DF2ENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,3,76,34,15
+    CONTROL         "DF3:",IDC_DF3ENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,3,111,34,15
+END
+
+IDD_HARDDISK DIALOGEX 0, 0, 300, 237
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+EXSTYLE WS_EX_CONTEXTHELP
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    CONTROL         "List1",IDC_VOLUMELIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,5,0,290,176
+    PUSHBUTTON      "Add &Directory or Archive...",IDC_NEW_FS,10,179,103,15
+    PUSHBUTTON      "Add &Hardfile...",IDC_NEW_HF,130,179,74,15
+    PUSHBUTTON      "Add Ha&rd Drive...",IDC_NEW_HD,220,179,75,15
+    PUSHBUTTON      "Remove",IDC_REMOVE,235,203,60,15
+    PUSHBUTTON      "&Properties",IDC_EDIT,235,220,60,15
+    CONTROL         "Add PC drives at startup",IDC_MAPDRIVES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,202,100,10
+    CONTROL         "Disable UAEFSDB-support",IDC_NOUAEFSDB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,202,119,10
+    CONTROL         "Don't use Windows Recycle Bin",IDC_NORECYCLEBIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,213,121,10
+    CONTROL         "Include network drives..",IDC_MAPDRIVES_NET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,225,101,10
+    CONTROL         "Include CD/DVD drives..",IDC_MAPDRIVES_CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,213,100,10
+    CONTROL         "Automount removable drives",IDC_MAPDRIVES_AUTO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,225,115,10
+END
+
+IDD_SOUND DIALOGEX 0, 0, 300, 231
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    RTEXT           "Sound device:",IDC_SOUNDCARD,8,9,51,13,SS_CENTERIMAGE
+    COMBOBOX        IDC_SOUNDCARDLIST,64,9,229,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    GROUPBOX        "Sound Emulation",IDC_SOUNDSETTINGS,5,30,120,81
+    CONTROL         "Disabled",IDC_SOUND0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,45,101,10
+    CONTROL         "Disabled, but emulated",IDC_SOUND1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,57,102,10
+    CONTROL         "Enabled",IDC_SOUND2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,69,102,10
+    CONTROL         "Enabled, 100% accurate",IDC_SOUND3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,81,101,10
+    GROUPBOX        "Volume",IDC_STATIC,132,36,164,31
+    CONTROL         "",IDC_SOUNDVOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,137,44,105,20
+    EDITTEXT        IDC_SOUNDVOLUME2,247,47,40,12,ES_CENTER | ES_READONLY
+    GROUPBOX        "Sound Buffer Size",IDC_STATIC,132,73,164,31
+    CONTROL         "Slider1",IDC_SOUNDBUFFERRAM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,137,81,105,19
+    EDITTEXT        IDC_SOUNDBUFFERMEM,247,84,40,12,ES_CENTER | ES_READONLY
+    GROUPBOX        "Settings",IDC_SOUNDINTERPOLATION2,6,114,290,60
+    LTEXT           "Frequency:",IDC_SOUNDFREQTXT,11,148,53,8,SS_CENTERIMAGE
+    COMBOBOX        IDC_SOUNDFREQ,13,157,51,75,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
+    LTEXT           "Audio filter:",IDC_SOUNDFILTERTXT,209,148,77,8,SS_CENTERIMAGE
+    COMBOBOX        IDC_SOUNDFILTER,209,157,80,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    LTEXT           "Channel mode:",IDC_SOUNDSTEREOTXT,11,124,57,8,SS_CENTERIMAGE
+    COMBOBOX        IDC_SOUNDSTEREO,13,133,122,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    LTEXT           "Interpolation:",IDC_SOUNDINTERPOLATIONTXT,209,124,75,8,SS_CENTERIMAGE
+    COMBOBOX        IDC_SOUNDINTERPOLATION,209,133,80,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    LTEXT           "Stereo separation:",IDC_SOUNDSTEREOSEPTXT,141,124,63,8,SS_CENTERIMAGE
+    COMBOBOX        IDC_SOUNDSTEREOSEP,142,133,62,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    LTEXT           "Stereo delay:",IDC_SOUNDSTEREOMIXTXT,141,148,63,8,SS_CENTERIMAGE
+    COMBOBOX        IDC_SOUNDSTEREOMIX,142,157,62,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    GROUPBOX        "Floppy Drive Sound Emulation",IDC_STATIC,6,177,290,46
+    CONTROL         "",IDC_SOUNDDRIVEVOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,14,185,107,19
+    EDITTEXT        IDC_SOUNDDRIVEVOLUME2,124,187,40,12,ES_CENTER | ES_READONLY
+    COMBOBOX        IDC_SOUNDDRIVE,237,187,46,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_SOUNDDRIVESELECT,18,205,265,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_SOUNDSWAP,73,157,62,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    LTEXT           "Swap channels:",IDC_SOUNDSWAPTXT,74,148,61,8,SS_CENTERIMAGE
+    CONTROL         "Automatic switching",IDC_SOUND_AUTO,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,14,95,103,10
+END
+
+IDD_LOADSAVE DIALOGEX 0, 0, 302, 241
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    CONTROL         "",IDC_CONFIGTREE,"SysTreeView32",TVS_HASLINES | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,6,3,289,153,WS_EX_CLIENTEDGE
+    RTEXT           "Name:",IDC_STATIC,4,161,40,15,SS_CENTERIMAGE
+    EDITTEXT        IDC_EDITNAME,48,162,146,13,ES_AUTOHSCROLL
+    RTEXT           "Description:",IDC_STATIC,2,182,41,15,SS_CENTERIMAGE
+    EDITTEXT        IDC_EDITDESCRIPTION,48,183,146,13,ES_AUTOHSCROLL
+    RTEXT           "Link:",IDC_STATIC,4,204,40,15,SS_CENTERIMAGE
+    COMBOBOX        IDC_CONFIGLINK,48,205,93,150,CBS_DROPDOWN | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Ignore link",IDC_CONFIGNOLINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,146,207,48,10
+    EDITTEXT        IDC_EDITPATH,199,161,49,15,ES_AUTOHSCROLL | WS_DISABLED
+    CONTROL         "Autoload",IDC_CONFIGAUTO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,253,163,42,10
+    GROUPBOX        "Additional Information",IDC_STATIC,199,179,96,38,BS_LEFT
+    PUSHBUTTON      "View",IDC_VIEWINFO,208,195,37,15
+    PUSHBUTTON      "Set",IDC_SETINFO,250,195,37,15
+    PUSHBUTTON      "Load",IDC_QUICKLOAD,5,225,44,15
+    PUSHBUTTON      "Save",IDC_QUICKSAVE,54,225,44,15
+    PUSHBUTTON      "Load From...",IDC_LOAD,121,225,49,15
+    PUSHBUTTON      "Delete",IDC_DELETE,251,225,44,15
+    PUSHBUTTON      "Save As...",IDC_SAVE,175,225,44,15
+END
+
+IDD_PORTS DIALOGEX 0, 0, 300, 238
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    GROUPBOX        "Parallel Port",IDC_SERPARFRAME,5,2,291,68
+    RTEXT           "Printer:",IDC_STATIC,12,15,25,15,SS_CENTERIMAGE
+    COMBOBOX        IDC_PRINTERLIST,49,15,153,134,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "Flush print job",IDC_FLUSHPRINTER,220,15,58,12
+    CONTROL         "PostScript detection",IDC_PSPRINTERDETECT,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,11,33,79,12
+    CONTROL         "PostScript printer emulation",IDC_PSPRINTER,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,95,33,110,12
+    RTEXT           "Autoflush [] Time in seconds after a pending print job is automatically flushed.",IDC_PRINTERAUTOFLUSHTXT,202,32,57,15,SS_NOTIFY | SS_CENTERIMAGE
+    EDITTEXT        IDC_PRINTERAUTOFLUSH,263,33,25,12,ES_NUMBER
+    RTEXT           "Ghostscript extra parameters:",IDC_STATIC,12,49,102,15,SS_CENTERIMAGE
+    EDITTEXT        IDC_PS_PARAMS,124,50,165,12,ES_AUTOHSCROLL
+    GROUPBOX        "Serial Port",IDC_SERIALFRAME,4,72,292,48
+    COMBOBOX        IDC_SERIAL,49,84,232,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Shared",IDC_SER_SHARED,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,15,103,48,12
+    CONTROL         "RTS/CTS",IDC_SER_CTSRTS,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,75,103,55,12
+    GROUPBOX        "MIDI",IDC_MIDIFRAME,4,123,292,33
+    RTEXT           "Out:",IDC_MIDI,10,134,34,15,SS_CENTERIMAGE
+    COMBOBOX        IDC_MIDIOUTLIST,50,134,95,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "In:",IDC_MIDI2,150,134,29,15,SS_CENTERIMAGE
+    COMBOBOX        IDC_MIDIINLIST,185,134,95,134,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    GROUPBOX        "Mouse/Joystick Ports",IDC_PORT0,4,158,292,75
+    COMBOBOX        IDC_PORT0_JOYS,45,174,241,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_PORT1_JOYS,45,195,241,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "Swap ports",IDC_SWAP,211,214,75,14
+    RTEXT           "Port 0:",IDC_STATIC,11,173,25,15,SS_CENTERIMAGE
+    RTEXT           "Port 1:",IDC_STATIC,11,194,25,15,SS_CENTERIMAGE
+    LTEXT           "X-Arcade layout information []#1",IDC_STATIC,16,213,106,15,SS_NOTIFY | SS_CENTERIMAGE
+    CONTROL         "Direct []Use when emulating serial-link games on two PCs running WinUAE",IDC_SER_DIRECT,
+                    "Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,135,103,65,12
+    CONTROL         "uaeserial.device",IDC_UAESERIAL,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,200,103,78,12
+END
+
+IDD_CONTRIBUTORS DIALOGEX 0, 0, 411, 242
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION
+CAPTION "UAE Authors and Contributors..."
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+    DEFPUSHBUTTON   "Ok",ID_OK,177,219,53,14
+    CONTROL         "",IDC_CONTRIBUTORS,"RICHEDIT",TCS_HOTTRACK | TCS_VERTICAL | TCS_RAGGEDRIGHT | TCS_OWNERDRAWFIXED | TCS_MULTISELECT | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,4,5,404,206
+END
+
+IDD_ABOUT DIALOGEX 0, 0, 300, 191
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+    CONTROL         "",IDC_RICHEDIT1,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,45,10,210,15
+    CONTROL         "",IDC_RICHEDIT2,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,30,260,13
+    PUSHBUTTON      "Contributors",IDC_CONTRIBUTORS,110,55,80,15
+    CONTROL         "",IDC_UAEHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,120,80,15
+    CONTROL         "",IDC_PICASSOHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,200,90,80,20
+    CONTROL         "",IDC_AMIGAHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,109,90,80,20
+    CONTROL         "",IDC_WINUAEHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,200,120,80,15
+    CONTROL         "",IDC_AIABHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,110,120,80,15
+    CONTROL         "",IDC_THEROOTS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,145,80,15
+    CONTROL         "",IDC_CAPS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,200,145,80,15
+    CONTROL         "",IDC_ABIME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,110,145,80,15
+    CONTROL         "",IDC_CLOANTOHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,90,80,20
+    CONTROL         "",IDC_AMIGASYS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,63,169,80,15
+    CONTROL         "",IDC_AMIKIT,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,157,169,80,15
+END
+
+IDD_MISC1 DIALOGEX 0, 0, 300, 237
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    GROUPBOX        "Advanced",IDC_STATIC,8,2,285,110
+    CONTROL         "Untrap mouse with middle button",IDC_JULIAN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,15,129,10
+    CONTROL         "Show GUI on startup",IDC_SHOWGUI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,27,120,10
+    CONTROL         "On-screen LEDs",IDC_SHOWLEDS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,40,115,10
+    CONTROL         "uaescsi.device",IDC_SCSIDEVICE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,53,63,10
+    CONTROL         "Don't show taskbar button",IDC_NOTASKBARBUTTON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,66,117,10
+    CONTROL         "bsdsocket.library emulation",IDC_SOCKETS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,15,120,10
+    CONTROL         "Use CTRL-F11 to quit",IDC_CTRLF11,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,27,120,10
+    CONTROL         "Synchronize clock",IDC_CLOCKSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,40,115,10
+    GROUPBOX        "Keyboard LEDs",IDC_STATIC,7,140,85,94
+    COMBOBOX        IDC_KBLED1,22,154,56,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_KBLED2,22,173,56,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_KBLED3,22,193,56,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    GROUPBOX        "Logging",IDC_STATIC,97,140,195,25
+    CONTROL         "Create log file",IDC_CREATELOGFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,151,72,10
+    CONTROL         "Illegal memory accesses",IDC_ILLEGAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,189,151,95,10
+    GROUPBOX        "State Files",IDC_STATIC,98,167,195,68
+    PUSHBUTTON      "Load state...",IDC_DOLOADSTATE,105,180,49,14
+    PUSHBUTTON      "Save state...",IDC_DOSAVESTATE,105,208,49,14
+    CONTROL         "Enable state recording",IDC_STATE_CAPTURE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,200,182,88,10
+    RTEXT           "Recording rate (seconds):",IDC_STATIC,157,199,86,10,SS_CENTERIMAGE | WS_TABSTOP
+    COMBOBOX        IDC_STATE_RATE,248,197,38,65,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "Recording buffer (MB):",IDC_STATIC,160,219,83,10,SS_CENTERIMAGE | WS_TABSTOP
+    COMBOBOX        IDC_STATE_BUFFERSIZE,248,217,38,65,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Always on top",IDC_ALWAYSONTOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,79,117,10
+    CONTROL         "Catweasel",IDC_CATWEASEL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,53,115,10
+    CONTROL         "USB mode",IDC_KBLED_USB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,216,64,10
+    COMBOBOX        IDC_SCSIMODE,92,51,64,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_LANGUAGE,103,121,179,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    GROUPBOX        "Language",IDC_STATIC,7,113,285,25
+    CONTROL         "Disable powersaving features",IDC_POWERSAVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,92,120,10
+    CONTROL         "Magic Mouse",IDC_MOUSETRICK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,66,119,10
+    CONTROL         "uaenet.device",IDC_SANA2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,79,94,10
+    COMBOBOX        IDC_DD_SURFACETYPE,217,93,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "Display buffer:",IDC_STATIC,159,94,52,10,SS_CENTERIMAGE
+END
+
+IDD_HARDFILE DIALOGEX 0, 0, 299, 249
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Hardfile Settings"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+    GROUPBOX        "Settings",IDC_STATIC,10,5,280,146
+    RTEXT           "Path:",IDC_HARDFILE_DIR_TEXT,25,18,22,10
+    EDITTEXT        IDC_PATH_NAME,52,15,213,15,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_SELECTOR,271,15,11,15
+    RTEXT           "FileSys:",IDC_HARDFILE_FILESYS_TEXT,13,38,34,10
+    EDITTEXT        IDC_PATH_FILESYS,52,35,213,15,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_FILESYS_SELECTOR,271,35,11,15
+    RTEXT           "Device:",IDC_HARDFILE_DEVICE_TEXT,16,58,31,10
+    EDITTEXT        IDC_HARDFILE_DEVICE,52,55,66,15,ES_AUTOHSCROLL
+    RTEXT           "Boot priority:",IDC_HARDFILE_BOOTPRI_TEXT,20,94,48,8
+    EDITTEXT        IDC_HARDFILE_BOOTPRI,73,90,44,15
+    CONTROL         "Read/write",IDC_HDF_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,53,74,64,10
+    PUSHBUTTON      "Enable RDB mode",IDC_HDF_RDB,174,55,92,14
+    RTEXT           "Surfaces:",IDC_SURFACES_TEXT,118,94,32,10
+    EDITTEXT        IDC_HEADS,155,90,40,15,ES_NUMBER
+    RTEXT           "Reserved:",IDC_RESERVED_TEXT,197,94,35,10
+    EDITTEXT        IDC_RESERVED,237,90,40,15,ES_NUMBER
+    RTEXT           "Sectors:",IDC_SECTORS_TEXT,120,113,30,10
+    EDITTEXT        IDC_SECTORS,155,111,40,15,ES_NUMBER
+    RTEXT           "Block size:",IDC_BLOCKSIZE_TEXT,197,113,35,10
+    EDITTEXT        IDC_BLOCKSIZE,237,111,40,15,ES_NUMBER
+    GROUPBOX        "New hard disk image file",IDC_STATIC,10,156,280,62
+    PUSHBUTTON      "Create",IDC_HF_CREATE,23,171,80,14
+    EDITTEXT        IDC_HF_SIZE,119,171,61,15,ES_NUMBER
+    PUSHBUTTON      "OK",IDOK,102,226,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,158,226,50,14
+    EDITTEXT        IDC_HF_DOSTYPE,119,194,61,15
+    COMBOBOX        IDC_HF_TYPE,23,195,80,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_HDF_CONTROLLER,73,112,44,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "DOS type",IDC_STATIC,187,196,32,10,SS_CENTERIMAGE
+    RTEXT           "MB",IDC_STATIC,185,174,17,10,SS_CENTERIMAGE
+    RTEXT           "HD Controller:",IDC_STATIC,16,113,52,10,SS_CENTERIMAGE
+    CONTROL         "Bootable",IDC_HDF_AUTOBOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,136,74,53,10
+    CONTROL         "Do not mount",IDC_HDF_DONOTMOUNT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,217,74,67,10
+    EDITTEXT        IDC_HDFINFO,16,131,268,12,ES_CENTER | ES_READONLY
+    CONTROL         "Sparse file",IDC_HF_SPARSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,220,174,62,10
+END
+
+IDD_FILESYS DIALOGEX 15, 25, 299, 111
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Volume Settings"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+    LTEXT           "Device name:",-1,11,7,54,10
+    EDITTEXT        IDC_VOLUME_DEVICE,65,5,104,15,ES_AUTOHSCROLL
+    LTEXT           "Volume label:",-1,13,28,54,10
+    EDITTEXT        IDC_VOLUME_NAME,65,25,104,15,ES_AUTOHSCROLL
+    LTEXT           "Path:",-1,38,49,44,10
+    EDITTEXT        IDC_PATH_NAME,65,46,227,15,ES_AUTOHSCROLL
+    PUSHBUTTON      "Select Directory",IDC_FS_SELECT_DIR,65,66,103,15
+    CONTROL         "Read/write",IDC_FS_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,174,7,55,10
+    RTEXT           "Boot priority:",IDC_VOLUME_BOOTPRI_TEXT,178,28,49,8
+    EDITTEXT        IDC_VOLUME_BOOTPRI,236,25,30,15
+    PUSHBUTTON      "OK",IDOK,65,91,48,15
+    PUSHBUTTON      "Cancel",IDCANCEL,120,91,48,15
+    PUSHBUTTON      "Select Archive or Plain File",IDC_FS_SELECT_FILE,190,66,103,15
+    PUSHBUTTON      "Eject",IDC_FS_SELECT_EJECT,230,91,62,15
+    CONTROL         "Bootable",IDC_FS_AUTOBOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,236,7,53,10
+END
+
+IDD_SETINFO DIALOGEX 0, 0, 229, 85
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Additional Information Settings"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+    RTEXT           "Path:",-1,5,20,24,15,SS_CENTERIMAGE
+    EDITTEXT        IDC_PATH_NAME,35,20,169,15,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_SELECTOR,210,20,10,15
+    PUSHBUTTON      "OK",IDOK,120,65,48,15
+    PUSHBUTTON      "Cancel",IDCANCEL,175,65,48,15
+END
+
+IDD_CHIPSET DIALOGEX 0, 65490, 300, 229
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+    GROUPBOX        "Chipset",IDC_STATIC,14,11,145,90
+    CONTROL         "OCS [] Original chipset. A1000 and most A500s.",IDC_OCS,
+                    "Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,37,26,51,10
+    CONTROL         "ECS Agnus [] Enhanced chipset (ECS Agnus chip only). CDTV and later A500 and A2000 hardware revisions.",IDC_ECS_AGNUS,
+                    "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,37,42,55,10
+    CONTROL         "ECS Denise [] Enhanced chipset (ECS Denise chip only). Normally paired with ECS Agnus.",IDC_ECS_DENISE,
+                    "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,100,42,55,10
+    CONTROL         "Full ECS [] Full ECS chipset (ECS Agnus and ECS Denise chips). A500+, A600 and A3000.",IDC_ECS,
+                    "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,37,58,52,10
+    CONTROL         "AGA [] Advanced Graphics Architecture chipset. A1200, A4000 and CD32.",IDC_AGA,
+                    "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,100,26,51,10
+    CONTROL         "NTSC [] North American and Japanese display standard, 60Hz refresh rate. Other countries use PAL (50Hz. display refresh rate)",IDC_NTSC,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,100,58,50,10
+    GROUPBOX        "Options",IDC_STATIC,168,11,114,89
+    CONTROL         "Immediate Blitter [] Faster but less compatible blitter emulation.",IDC_BLITIMM,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,179,33,96,10
+    CONTROL         "Cycle-exact [] The most compatible A500 emulation mode. Very fast PC recommended.",IDC_CYCLEEXACT,
+                    "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,179,46,100,10
+    GROUPBOX        "Collision Level",IDC_STATIC,14,105,267,48
+    CONTROL         "None [] Collision hardware emulation disabled.",IDC_COLLISION0,
+                    "Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,37,121,59,10
+    CONTROL         "Sprites only [] Emulate only sprite vs. sprite collisions.",IDC_COLLISION1,
+                    "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,37,137,62,10
+    CONTROL         "Sprites and Sprites vs. Playfield [] Recommended collision emulation level.",IDC_COLLISION2,
+                    "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,100,121,161,10
+    CONTROL         "Full [] 100% collision hardware emulation. Only very few games need this option. Slowest.",IDC_COLLISION3,
+                    "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,100,137,119,10
+    GROUPBOX        "Sound Emulation",IDC_STATIC,13,159,268,65
+    CONTROL         "Disabled",IDC_CS_SOUND0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,37,175,102,10
+    CONTROL         "Emulated",IDC_CS_SOUND1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,37,190,91,10
+    CONTROL         "Emulated, 100% accurate",IDC_CS_SOUND2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,37,205,95,10
+    CONTROL         "Genlock connected [] Allow boot sequence to detect genlock. Genlock is not emulated.",IDC_GENLOCK,
+                    "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,179,59,100,10
+    CONTROL         "Faster RTG [] Enables less accurate custom chipset emulation mode when Picasso96 is enabled.",IDC_FASTERRTG,
+                    "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,179,72,100,10
+    COMBOBOX        IDC_CS_EXT,100,80,49,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "Chipset Extra",IDC_STATIC,25,79,52,15,SS_CENTERIMAGE
+END
+
+IDD_CHIPSET2 DIALOGEX 0, 65490, 300, 247
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+    GROUPBOX        "Battery Backed Up Real Time Clock",IDC_STATIC,11,24,275,29
+    CONTROL         "None",IDC_CS_RTC1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,19,36,55,10
+    CONTROL         "MSM6242B",IDC_CS_RTC2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,90,36,52,10
+    CONTROL         "RF5C01A",IDC_CS_RTC3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,159,36,46,10
+    EDITTEXT        IDC_CS_RTCADJUST,215,34,64,13,ES_AUTOHSCROLL
+    GROUPBOX        "CIA-A TOD Clock Source",IDC_STATIC,11,56,275,29
+    CONTROL         "Vertical Sync",IDC_CS_CIAA_TOD1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,19,68,63,10
+    CONTROL         "Power Supply 50Hz",IDC_CS_CIAA_TOD2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,90,68,85,10
+    CONTROL         "Power Supply 60Hz",IDC_CS_CIAA_TOD3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,186,68,88,10
+    CONTROL         "ROM Mirror (A8)",IDC_CS_KSMIRROR_A8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,146,80,10
+    CONTROL         "A1000 Boot RAM/ROM",IDC_CS_A1000RAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,95,88,10
+    CONTROL         "CD32 CD",IDC_CS_CD32CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,108,76,10
+    CONTROL         "CD32 C2P",IDC_CS_CD32C2P,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,108,87,10
+    CONTROL         "CD32 NVRAM",IDC_CS_CD32NVRAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,108,84,10
+    CONTROL         "CDTV CD",IDC_CS_CDTVCD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,121,47,10
+    CONTROL         "CDTV SRAM",IDC_CS_CDTVRAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,120,87,10
+    CONTROL         "CDTV SRAM Expansion",IDC_CS_CDTVRAMEXP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,120,90,10
+    CONTROL         "A600/A1200 IDE",IDC_CS_IDE1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,133,79,10
+    CONTROL         "A4000/A4000T IDE",IDC_CS_IDE2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,133,88,10
+    CONTROL         "Ramsey revision:",IDC_CS_RAMSEY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,216,71,10
+    EDITTEXT        IDC_CS_RAMSEYREV,91,214,45,13,ES_AUTOHSCROLL
+    CONTROL         "Fat Gary revision:",IDC_CS_FATGARY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,229,71,10
+    EDITTEXT        IDC_CS_FATGARYREV,91,228,45,13,ES_AUTOHSCROLL
+    CONTROL         "A3000 SCSI",IDC_CS_DMAC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,188,76,10
+    CONTROL         "Compatible Settings",IDC_CS_COMPATIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,8,234,10
+    CONTROL         "DF0: ID Hardware",IDC_CS_DF0IDHW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,95,92,10
+    CONTROL         "Agnus/Alice revision:",IDC_CS_AGNUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,147,216,81,10
+    EDITTEXT        IDC_CS_AGNUSREV,232,214,45,13,ES_AUTOHSCROLL
+    CONTROL         "Denise/Lisa revision:",IDC_CS_DENISE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,147,229,81,10
+    EDITTEXT        IDC_CS_DENISEREV,232,228,45,13,ES_AUTOHSCROLL
+    CONTROL         "A590/A2091 SCSI",IDC_CS_A2091,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,188,76,10
+    CONTROL         "A4000T SCSI",IDC_CS_DMAC2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,188,88,10
+    LTEXT           "A4091/A4000T SCSI not yet implemented.",IDC_STATIC,22,174,224,8,SS_CENTERIMAGE
+    CONTROL         "PCMCIA",IDC_CS_PCMCIA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,133,92,10
+    CONTROL         "A4091 SCSI",IDC_CS_A4091,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,200,76,10
+    CONTROL         "CDTV SCSI",IDC_CS_CDTVSCSI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,200,76,10
+    CONTROL         "Include host SCSI devices",IDC_CS_SCSIMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,200,101,10
+    CONTROL         "C00000 is Fast RAM",IDC_CS_SLOWISFAST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,146,92,10
+    CONTROL         "ROM Mirror (E0)",IDC_CS_KSMIRROR_E0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,146,80,10
+    CONTROL         "CIA ROM Overlay",IDC_CS_CIAOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,95,80,10
+    CONTROL         "KB Reset Warning",IDC_CS_RESETWARNING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,159,80,10
+    CONTROL         "No-EHB Denise",IDC_CS_NOEHB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,159,80,10
+    CONTROL         "Blitter Busy Bug",IDC_CS_BLITTERBUG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,159,80,10
+END
+
+IDD_AVIOUTPUT DIALOGEX 0, 0, 288, 203
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    GROUPBOX        "Output Properties",IDC_STATIC,5,0,274,126
+    EDITTEXT        IDC_AVIOUTPUT_FILETEXT,15,15,226,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER,WS_EX_CLIENTEDGE
+    PUSHBUTTON      "...",IDC_AVIOUTPUT_FILE,249,15,19,12
+    CONTROL         "Audio",IDC_AVIOUTPUT_AUDIO,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_FLAT | WS_TABSTOP,15,33,39,14
+    CONTROL         "",IDC_AVIOUTPUT_AUDIO_STATIC,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | SS_SUNKEN | WS_GROUP,59,34,209,13
+    CONTROL         "Video",IDC_AVIOUTPUT_VIDEO,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_FLAT | WS_TABSTOP,15,50,39,14
+    CONTROL         "",IDC_AVIOUTPUT_VIDEO_STATIC,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | SS_SUNKEN | WS_GROUP,59,51,209,13
+    CONTROL         "Disable frame rate limit while recording",IDC_AVIOUTPUT_FRAMELIMITER,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,68,158,10
+    CONTROL         "AVI output enabled",IDC_AVIOUTPUT_ACTIVATED,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,15,103,108,14
+    CONTROL         "PAL",IDC_AVIOUTPUT_PAL,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,131,103,66,14
+    CONTROL         "NTSC",IDC_AVIOUTPUT_NTSC,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,204,103,66,14
+    CONTROL         "Slider1",IDC_AVIOUTPUT_FPS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | TBS_ENABLESELRANGE | WS_TABSTOP,166,84,87,11
+    LTEXT           "fps",IDC_AVIOUTPUT_FPS_STATIC,255,84,19,8
+    PUSHBUTTON      "Save screenshot",IDC_SCREENSHOT,16,141,77,14
+    GROUPBOX        "Ripper",IDC_STATIC,5,127,274,38
+    PUSHBUTTON      "Pro Wizard 1.62",IDC_PROWIZARD,104,141,77,14,WS_DISABLED
+    CONTROL         "Sample ripper",IDC_SAMPLERIPPER_ACTIVATED,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,192,141,77,14
+    GROUPBOX        "Input Recorder",IDC_STATIC,5,166,274,33
+    CONTROL         "Record",IDC_INPREC_RECORD,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,192,178,77,14
+    CONTROL         "Playback",IDC_INPREC_PLAY,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,16,178,77,14
+    CONTROL         "Alt. playback mode",IDC_INPREC_PLAYMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,103,180,78,10
+    CONTROL         "Disable sound output while recording",IDC_AVIOUTPUT_NOSOUNDOUTPUT,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,85,148,10
+END
+
+IDD_INPUT DIALOGEX 0, 0, 300, 242
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    COMBOBOX        IDC_INPUTTYPE,5,5,98,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_INPUTDEVICE,109,5,167,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "",IDC_INPUTDEVICEDISABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,282,8,9,8
+    CONTROL         "List1",IDC_INPUTLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,5,22,290,146
+    COMBOBOX        IDC_INPUTAMIGACNT,5,174,24,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_INPUTAMIGA,33,174,262,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "Joystick dead zone (%):",-1,7,196,79,10,SS_CENTERIMAGE
+    EDITTEXT        IDC_INPUTDEADZONE,92,195,25,12,ES_NUMBER
+    RTEXT           "Autofire rate (frames):",-1,10,212,76,10,SS_CENTERIMAGE
+    EDITTEXT        IDC_INPUTAUTOFIRERATE,92,210,25,12,ES_NUMBER
+    RTEXT           "Digital joy-mouse speed:",-1,124,196,84,10,SS_CENTERIMAGE
+    EDITTEXT        IDC_INPUTSPEEDD,215,195,25,12,ES_NUMBER
+    RTEXT           "Analog joy-mouse speed:",-1,120,212,88,10,SS_CENTERIMAGE
+    EDITTEXT        IDC_INPUTSPEEDA,215,211,25,12,ES_NUMBER
+    RTEXT           "Mouse speed:",-1,132,228,76,10,SS_CENTERIMAGE
+    EDITTEXT        IDC_INPUTSPEEDM,215,227,25,12,ES_NUMBER
+    PUSHBUTTON      "Copy from:",IDC_INPUTCOPY,249,195,45,14
+    COMBOBOX        IDC_INPUTCOPYFROM,249,211,45,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "Swap 1<>2",IDC_INPUTSWAP,249,226,45,14
+END
+
+IDD_FILTER DIALOGEX 0, 0, 296, 224
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    GROUPBOX        "Filter Settings",-1,0,0,294,186
+    CONTROL         "Enable",IDC_FILTERENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,17,46,10
+    COMBOBOX        IDC_FILTERMODE,62,15,61,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_FILTERFILTER,128,15,81,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "Reset to defaults",IDC_FILTERDEFAULT,213,15,73,14
+    RTEXT           "Horiz. size:",-1,7,44,54,10,SS_CENTERIMAGE
+    CONTROL         "Slider1",IDC_FILTERHZ,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,37,152,19
+    EDITTEXT        IDC_FILTERHZV,253,39,34,12,ES_CENTER | ES_READONLY
+    RTEXT           "Vert. size:",-1,7,64,54,10,SS_CENTERIMAGE
+    CONTROL         "Slider1",IDC_FILTERVZ,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,57,152,19
+    EDITTEXT        IDC_FILTERVZV,253,59,34,12,ES_CENTER | ES_READONLY
+    RTEXT           "Horiz. position:",-1,5,84,55,10,SS_CENTERIMAGE
+    CONTROL         "Slider1",IDC_FILTERHO,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,77,151,19
+    EDITTEXT        IDC_FILTERHOV,253,79,34,12,ES_CENTER | ES_READONLY
+    RTEXT           "Vert. position:",-1,5,103,55,10,SS_CENTERIMAGE
+    CONTROL         "Slider1",IDC_FILTERVO,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,97,151,19
+    EDITTEXT        IDC_FILTERVOV,253,99,34,12,ES_CENTER | ES_READONLY
+    RTEXT           "Extra settings:",-1,27,133,57,10,SS_CENTERIMAGE
+    CONTROL         "Slider1",IDC_FILTERXL,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,157,151,19
+    EDITTEXT        IDC_FILTERXLV,253,159,34,12,ES_CENTER | ES_READONLY
+    COMBOBOX        IDC_FILTERSLR,253,130,33,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    GROUPBOX        "Presets",-1,0,187,296,36
+    COMBOBOX        IDC_FILTERPRESETS,8,201,119,150,CBS_DROPDOWN | CBS_SORT | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "Load",IDC_FILTERPRESETLOAD,132,200,47,14
+    PUSHBUTTON      "Save",IDC_FILTERPRESETSAVE,184,200,47,14
+    PUSHBUTTON      "Delete",IDC_FILTERPRESETDELETE,236,200,47,14
+    COMBOBOX        IDC_FILTERHZMULT,67,43,27,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_FILTERVZMULT,67,63,27,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Autoscale",IDC_FILTERAUTORES,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,9,168,63,10
+    COMBOBOX        IDC_FILTERXTRA,105,130,138,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Keep aspect ratio",IDC_FILTERASPECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,153,87,10
+END
+
+IDD_HARDDRIVE DIALOGEX 0, 0, 380, 76
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Harddrive Settings"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+    LTEXT           "Hard drive:",IDC_STATIC,7,11,80,10
+    COMBOBOX        IDC_HARDDRIVE,49,9,325,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Read/write",IDC_HDF_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,51,55,10
+    DEFPUSHBUTTON   "Add hard drive",IDOK,231,48,65,14
+    PUSHBUTTON      "Cancel",IDCANCEL,319,48,54,14
+    DEFPUSHBUTTON   "Create hard disk image file",IDC_HARDDRIVE_IMAGE,49,30,115,14
+    EDITTEXT        IDC_PATH_NAME,183,27,97,15,ES_AUTOHSCROLL | NOT WS_VISIBLE
+    COMBOBOX        IDC_HDF_CONTROLLER,102,50,41,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "HD Controller:",IDC_STATIC,42,51,52,10,SS_CENTERIMAGE
+END
+
+IDD_MISC2 DIALOGEX 0, 0, 300, 92
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    GROUPBOX        "When Active",IDC_STATIC,8,7,88,73
+    RTEXT           "Run at priority:",IDC_ACTIVE_PRI,14,17,52,10,SS_CENTERIMAGE | WS_TABSTOP
+    COMBOBOX        IDC_ACTIVE_PRIORITY,14,29,76,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    GROUPBOX        "When Inactive",IDC_STATIC,102,7,92,73
+    RTEXT           "Run at priority:",IDC_INACTIVE_PRI,109,17,51,10,SS_CENTERIMAGE | WS_TABSTOP
+    COMBOBOX        IDC_INACTIVE_PRIORITY,109,29,76,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Pause emulation",IDC_INACTIVE_PAUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,109,50,69,10
+    CONTROL         "Disable sound",IDC_INACTIVE_NOSOUND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,109,63,79,10
+    GROUPBOX        "When Minimized",IDC_STATIC,199,7,92,73
+    RTEXT           "Run at priority:",IDC_MINIMIZED_PRI,207,18,51,10,SS_CENTERIMAGE | WS_TABSTOP
+    COMBOBOX        IDC_MINIMIZED_PRIORITY,207,29,76,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Pause emulation",IDC_MINIMIZED_PAUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,207,50,69,10
+    CONTROL         "Disable sound",IDC_MINIMIZED_NOSOUND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,207,63,79,10
+END
+
+IDD_DISK DIALOGEX 0, 0, 300, 242
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_CONTROL | DS_CENTER | DS_CENTERMOUSE | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+    CONTROL         "",IDC_DISKLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,4,6,292,196
+    PUSHBUTTON      "Remove floppy disk image",IDC_DISKLISTREMOVE,156,223,101,15
+    COMBOBOX        IDC_DISKTEXT,3,205,293,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "Insert floppy disk image",IDC_DISKLISTINSERT,41,223,101,15
+END
+
+IDD_PANEL DIALOGEX 0, 0, 420, 278
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_ACCEPTFILES | WS_EX_CONTROLPARENT
+CAPTION "WinUAE Properties"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+    GROUPBOX        "",IDC_PANEL_FRAME,112,4,303,247,NOT WS_VISIBLE
+    CONTROL         "",IDC_PANELTREE,"SysTreeView32",TVS_HASLINES | TVS_SHOWSELALWAYS | TVS_NOSCROLL | WS_BORDER | WS_HSCROLL | WS_TABSTOP,5,5,101,248,WS_EX_CLIENTEDGE
+    GROUPBOX        "",IDC_PANEL_FRAME_OUTER,110,2,307,251
+    PUSHBUTTON      "Reset",IDC_RESETAMIGA,6,259,47,14
+    PUSHBUTTON      "Quit",IDC_QUITEMU,57,259,47,14
+    DEFPUSHBUTTON   "OK",IDOK,260,259,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,313,259,50,14
+    PUSHBUTTON      "Help",IDHELP,366,259,50,14,WS_DISABLED
+    PUSHBUTTON      "Restart",IDC_RESTARTEMU,109,259,47,14,NOT WS_VISIBLE
+END
+
+IDD_PATHS DIALOGEX 0, 0, 300, 237
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    LTEXT           "System ROMs:",IDC_PATHS_ROML,14,9,260,8,SS_CENTERIMAGE
+    EDITTEXT        IDC_PATHS_ROM,14,22,261,15,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_PATHS_ROMS,281,22,11,15
+    LTEXT           "Configuration files:",IDC_PATHS_CONFIGL,14,40,260,8,SS_CENTERIMAGE
+    EDITTEXT        IDC_PATHS_CONFIG,14,52,261,15,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_PATHS_CONFIGS,281,52,11,15
+    LTEXT           "Screenshots:",IDC_PATHS_SCREENSHOTL,14,71,260,8,SS_CENTERIMAGE
+    EDITTEXT        IDC_PATHS_SCREENSHOT,14,83,261,15,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_PATHS_SCREENSHOTS,281,83,11,15
+    LTEXT           "State files:",IDC_PATHS_STATEFILEL,14,102,260,8,SS_CENTERIMAGE
+    EDITTEXT        IDC_PATHS_SAVESTATE,14,114,261,15,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_PATHS_SAVESTATES,281,114,11,15
+    LTEXT           "Videos:",IDC_PATHS_AVIOUTPUTL,14,132,260,8,SS_CENTERIMAGE
+    EDITTEXT        IDC_PATHS_AVIOUTPUT,14,144,261,15,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_PATHS_AVIOUTPUTS,281,144,11,15
+    LTEXT           "Saveimages:",IDC_PATHS_SAVEIMAGEL,14,163,260,8,SS_CENTERIMAGE
+    EDITTEXT        IDC_PATHS_SAVEIMAGE,14,175,261,15,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_PATHS_SAVEIMAGES,281,175,11,15
+    PUSHBUTTON      "Reset to defaults",IDC_PATHS_DEFAULT,14,199,92,14
+    PUSHBUTTON      "Rescan ROMs",IDC_ROM_RESCAN,14,218,92,14
+    PUSHBUTTON      "Clear registry",IDC_RESETREGISTRY,112,218,77,14
+    COMBOBOX        IDC_PATHS_DEFAULTTYPE,112,199,163,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "Clear disk history",IDC_RESETDISKHISTORY,198,218,77,14
+END
+
+IDD_QUICKSTART DIALOGEX 0, 0, 300, 242
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    GROUPBOX        "Emulated Hardware",IDC_QUICKSTART_CONFIG,3,0,294,54
+    RTEXT           "Model:",IDC_STATIC,5,14,50,10,SS_CENTERIMAGE
+    COMBOBOX        IDC_QUICKSTART_MODEL,59,12,233,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "Configuration:",IDC_STATIC,5,33,50,10,SS_CENTERIMAGE
+    COMBOBOX        IDC_QUICKSTART_CONFIGURATION,59,31,233,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    GROUPBOX        "Compatibility vs Required CPU Power ",IDC_QUICKSTART_COMPA,3,56,294,33
+    RTEXT           "Best compatibility",IDC_STATIC,13,70,67,10,SS_CENTERIMAGE
+    CONTROL         "",IDC_QUICKSTART_COMPATIBILITY,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,95,65,115,21
+    RTEXT           "Low compatibility",IDC_STATIC,215,70,63,10,SS_CENTERIMAGE
+    GROUPBOX        "Host Configuration",IDC_QUICKSTART_HOST,3,91,294,33
+    RTEXT           "Configuration:",IDC_STATIC,5,105,55,10,SS_CENTERIMAGE
+    COMBOBOX        IDC_QUICKSTART_HOSTCONFIG,65,103,225,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    GROUPBOX        "Emulated Floppy Drives",IDC_QUICKSTART_DF,3,126,294,84
+    CONTROL         "Floppy drive DF0:",IDC_DF0QENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,10,136,72,15
+    PUSHBUTTON      "Select disk image",IDC_DF0QQ,85,136,98,15
+    RTEXT           "Write-protected",IDC_STATIC,185,139,56,10,SS_CENTERIMAGE
+    CONTROL         "",IDC_DF0WPQ,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,246,137,10,15
+    PUSHBUTTON      "Eject",IDC_EJECT0Q,261,136,30,15
+    COMBOBOX        IDC_DF0TEXTQ,9,154,282,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Floppy drive DF1:",IDC_DF1QENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,172,71,15
+    PUSHBUTTON      "Select disk image",IDC_DF1QQ,85,172,98,15
+    RTEXT           "Write-protected",IDC_STATIC,185,175,55,10,SS_CENTERIMAGE
+    CONTROL         "",IDC_DF1WPQ,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,246,173,10,15
+    PUSHBUTTON      "Eject",IDC_EJECT1Q,261,172,30,15
+    COMBOBOX        IDC_DF1TEXTQ,9,190,282,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "Set configuration",IDC_QUICKSTART_SETCONFIG,9,219,72,15,NOT WS_VISIBLE
+    GROUPBOX        "Mode",IDC_STATIC,190,211,107,27,BS_LEFT
+    CONTROL         "Start in Quickstart mode",IDC_QUICKSTARTMODE,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,197,222,94,10
+END
+
+IDD_FRONTEND DIALOGEX 0, 0, 420, 242
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    CONTROL         "",IDC_FE_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,6,9,235,124
+    GROUPBOX        "",IDC_FE_INFO,249,140,160,95
+    GROUPBOX        "",IDC_FE_SCREENSHOT,249,7,160,128
+END
+
+IDD_PROGRESSBAR DIALOGEX 0, 0, 229, 58
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Processing..."
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+    PUSHBUTTON      "Cancel",IDCANCEL,88,40,50,14
+    CONTROL         "",IDC_PROGRESSBAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,7,19,215,14
+    CTEXT           "x",IDC_PROGRESSBAR_TEXT,23,5,187,10,SS_CENTERIMAGE | WS_TABSTOP
+END
+
+IDD_STRINGBOX DIALOGEX 0, 0, 229, 58
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Enter text..."
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,48,39,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,151,39,50,14
+    EDITTEXT        IDC_STRINGBOXEDIT,7,17,214,14,ES_AUTOHSCROLL | ES_WANTRETURN
+END
+
+IDD_DEBUGGER DIALOGEX 0, 0, 454, 368
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+EXSTYLE WS_EX_CONTROLPARENT
+CAPTION "WinUAE Debugger"
+FONT 8, "Courier New", 0, 0, 0x0
+BEGIN
+    EDITTEXT        IDC_DBG_OUTPUT1,1,255,370,86,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | ES_WANTRETURN | WS_VSCROLL | NOT WS_TABSTOP
+    EDITTEXT        IDC_DBG_OUTPUT2,1,79,370,262,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | ES_WANTRETURN | WS_VSCROLL | NOT WS_TABSTOP
+    LISTBOX         IDC_DBG_MEM,1,92,370,249,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+    LISTBOX         IDC_DBG_DASM,1,92,370,249,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+    EDITTEXT        IDC_DBG_MEMINPUT,1,79,36,12,ES_AUTOHSCROLL | ES_WANTRETURN
+    EDITTEXT        IDC_DBG_INPUT,1,342,354,12,ES_AUTOHSCROLL | ES_WANTRETURN
+    PUSHBUTTON      "?",IDC_DBG_HELP,356,342,15,12,NOT WS_TABSTOP
+    PUSHBUTTON      "Set to PC",IDC_DBG_MEMTOPC,38,79,45,12,NOT WS_TABSTOP
+    LISTBOX         IDC_DBG_DREG,1,1,52,66,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+    LISTBOX         IDC_DBG_AREG,54,1,52,66,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+    LISTBOX         IDC_DBG_AMEM,106,1,231,66,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+    LISTBOX         IDC_DBG_CCR,338,1,57,42,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+    LISTBOX         IDC_DBG_SP_VBR,338,44,115,34,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+    LISTBOX         IDC_DBG_MMISC,396,1,57,42,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+    LISTBOX         IDC_DBG_PC,1,68,52,10,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+    LISTBOX         IDC_DBG_PREFETCH,54,68,283,10,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+    LISTBOX         IDC_DBG_FPREG,372,218,81,66,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+    LISTBOX         IDC_DBG_FPSR,372,285,81,34,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+    LISTBOX         IDC_DBG_MISCCPU,372,320,81,34,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+    CONTROL         "",IDC_DBG_STATUS,"msctls_statusbar32",0x103,0,355,453,12
+    LISTBOX         IDC_DBG_BRKPTS,1,79,370,262,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL
+    LISTBOX         IDC_DBG_MCUSTOM,372,79,81,138,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+    LISTBOX         IDC_DBG_MISC,1,79,370,262,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL
+    LISTBOX         IDC_DBG_CUSTOM,1,79,370,262,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL
+    CONTROL         "Auto set",IDC_DBG_AUTOSET,"Button",BS_AUTOCHECKBOX,84,79,50,12
+    LISTBOX         IDC_DBG_DASM2,1,79,370,87,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+    LISTBOX         IDC_DBG_MEM2,1,167,370,87,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+END
+
+IDD_DBGMEMINPUT DIALOGEX 0, 0, 150, 58
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Enter address..."
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,15,39,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,75,39,50,14
+    EDITTEXT        IDC_DBG_MEMINPUT2,20,12,100,14,ES_AUTOHSCROLL | ES_WANTRETURN
+    CTEXT           "Enter address",IDC_DBG_ADDRINPUTTXT,20,1,100,10,SS_CENTERIMAGE | WS_TABSTOP
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_APPICON             ICON                    "winuae.ico"
+IDI_FLOPPY              ICON                    "35floppy.ico"
+IDI_ABOUT               ICON                    "amigainfo.ico"
+IDI_HARDDISK            ICON                    "Drive.ico"
+IDI_CPU                 ICON                    "cpu.ico"
+IDI_PORTS               ICON                    "joystick.ico"
+IDI_INPUT               ICON                    "joystick.ico"
+IDI_MISC1               ICON                    "misc.ico"
+IDI_MISC2               ICON                    "misc.ico"
+IDI_MOVE_UP             ICON                    "move_up.ico"
+IDI_MOVE_DOWN           ICON                    "move_dow.ico"
+IDI_AVIOUTPUT           ICON                    "avioutput.ico"
+IDI_DISK                ICON                    "Drive.ico"
+IDI_CONFIGFILE          ICON                    "file.ico"
+IDI_FOLDER              ICON                    "folder.ico"
+IDI_SOUND               ICON                    "sound.ico"
+IDI_DISPLAY             ICON                    "screen.ico"
+IDI_ROOT                ICON                    "root.ico"
+IDI_MEMORY              ICON                    "chip.ico"
+IDI_QUICKSTART          ICON                    "quickstart.ico"
+IDI_PATHS               ICON                    "paths.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,5,0,0
+ PRODUCTVERSION 1,5,0,0
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "FileDescription", "WinUAE"
+            VALUE "FileVersion", "1.5.0"
+            VALUE "InternalName", "WinUAE"
+            VALUE "LegalCopyright", "© 1996-2008 under the GNU Public License (GPL)"
+            VALUE "OriginalFilename", "WinUAE.exe"
+            VALUE "ProductName", "WinUAE"
+            VALUE "ProductVersion", "1.5.0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Cursor
+//
+
+IDC_MYHAND              CURSOR                  "H_arrow.cur"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+IDM_SYSTRAY MENU 
+BEGIN
+    POPUP "Menu"
+    BEGIN
+        MENUITEM "Configuration",               ID_ST_CONFIGURATION
+        POPUP "Floppy drives"
+        BEGIN
+            MENUITEM "Eject all drives",            ID_ST_EJECTALL
+            MENUITEM "DF0:",                        ID_ST_DF0
+            MENUITEM "DF1:",                        ID_ST_DF1
+            MENUITEM "DF2:",                        ID_ST_DF2
+            MENUITEM "DF3:",                        ID_ST_DF3
+        END
+        MENUITEM "Reset",                       ID_ST_RESET
+        MENUITEM "Help",                        ID_ST_HELP
+        MENUITEM "Quit WinUAE",                 ID_ST_QUIT
+    END
+END
+
+IDM_DBGCONTEXTMENU MENU 
+BEGIN
+    POPUP "Inactive"
+    BEGIN
+        POPUP "Copy"
+        BEGIN
+            MENUITEM "Copy line",                   ID_DBG_COPYLBLINE
+            MENUITEM "Copy all",                    ID_DBG_COPYLB
+        END
+    END
+    POPUP "Memory"
+    BEGIN
+        POPUP "Copy"
+        BEGIN
+            MENUITEM "Copy line",                   ID_DBG_COPYLBLINE
+            MENUITEM "Copy all",                    ID_DBG_COPYLB
+        END
+        POPUP "Set top address"
+        BEGIN
+            MENUITEM "Set to A0",                   ID_DBG_SETTOA0
+            MENUITEM "Set to A1",                   ID_DBG_SETTOA1
+            MENUITEM "Set to A2",                   ID_DBG_SETTOA2
+            MENUITEM "Set to A3",                   ID_DBG_SETTOA3
+            MENUITEM "Set to A4",                   ID_DBG_SETTOA4
+            MENUITEM "Set to A5",                   ID_DBG_SETTOA5
+            MENUITEM "Set to A6",                   ID_DBG_SETTOA6
+            MENUITEM "Set to A7",                   ID_DBG_SETTOA7
+            MENUITEM "Enter address",               ID_DBG_ENTERADDR
+        END
+    END
+    POPUP "Disassembly"
+    BEGIN
+        POPUP "Copy"
+        BEGIN
+            MENUITEM "Copy line",                   ID_DBG_COPYLBLINE
+            MENUITEM "Copy all",                    ID_DBG_COPYLB
+        END
+        POPUP "Breakpoints"
+        BEGIN
+            MENUITEM "Toggle breakpoint",           ID_DBG_TOGGLEBP
+            MENUITEM "Clear all breakpoints",       ID_DBG_DELETEBPS
+        END
+        POPUP "Set top address"
+        BEGIN
+            MENUITEM "Set to PC",                   ID_DBG_SETTOPC
+            MENUITEM "Enter address",               ID_DBG_ENTERADDR
+        END
+    END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// WAVE
+//
+
+IDR_DRIVE_STARTUP_A500_1 WAVE                    "drive_startup.wav"
+IDR_DRIVE_CLICK_A500_1  WAVE                    "drive_click.wav"
+IDR_DRIVE_SPIN_A500_1   WAVE                    "drive_spin.wav"
+IDR_DRIVE_SNATCH_A500_1 WAVE                    "drive_snatch.wav"
+IDR_DRIVE_SPINND_A500_1 WAVE                    "drive_spinnd.wav"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+IDB_XARCADE             BITMAP                  "xarcade-winuae.bmp"
+IDB_LCD160X43           BITMAP                  "lcd.bmp"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE 
+BEGIN
+    IDS_KICKSTART           "ROM"
+    IDS_DISK                "Disk swapper"
+    IDS_DISPLAY             "Display"
+    IDS_HARDDISK            "Hard drives"
+    IDS_FLOPPY              "Floppy drives"
+    IDS_ABOUT               "About"
+    IDS_LOADSAVE            "Configurations"
+    IDS_AVIOUTPUT           "Output"
+    IDS_PORTS               "Game & I/O ports"
+    IDS_MISC1               "Misc"
+    IDS_MEMORY              "RAM"
+    IDS_CPU                 "CPU and FPU"
+    IDS_CHIPSET             "Chipset"
+    IDS_INPUT               "Input"
+    IDS_FILTER              "Filter"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_MISC2               "Priority"
+    IDS_PATHS               "Paths"
+    IDS_QUICKSTART          "Quickstart"
+    IDS_FRONTEND            "Frontend"
+    IDS_CHIPSET2            "Adv. Chipset"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_EXTTEXT             "Floppy disk image files"
+    IDS_EXTACTUAL           "ADF"
+    IDS_SOUND               "Sound"
+    IDS_CDROM               "CD-ROM"
+    IDS_FRAMERATE           "Every %1Frame"
+    IDS_SECOND              "second "
+    IDS_THIRD               "third "
+    IDS_FOURTH              "fourth "
+    IDS_FIFTH               "fifth "
+    IDS_SIXTH               "sixth "
+    IDS_SEVENTH             "seventh "
+    IDS_EIGHTH              "eighth "
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_NINTH               "ninth "
+    IDS_TENTH               "tenth "
+    IDS_SELECTADF           "Select a floppy disk image file..."
+    IDS_ADF                 "Floppy disk image files"
+    IDS_CHOOSEBLANK         "Choose a blank floppy disk image file..."
+    IDS_SELECTHDF           "Select a hard disk image file..."
+    IDS_HDF                 "Hard disk image files"
+    IDS_SELECTUAE           "Select a WinUAE configuration file..."
+    IDS_UAE                 "WinUAE configuration files"
+    IDS_SELECTROM           "Select a system ROM file..."
+    IDS_ROM                 "System ROM files"
+    IDS_SELECTKEY           "Select a system ROM key file..."
+    IDS_KEY                 "System ROM key files"
+    IDS_SELECTINFO          "Select information for your configuration..."
+    IDS_NONE                "none"
+    IDS_VOLUME              "Volume"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_SELECTFILESYSROOT   "Please select the root directory of the file system..."
+    IDS_DEFAULTMIDIOUT      "Default MIDI-Out Device"
+    IDS_CONTRIBUTORS1       "Bernd Schmidt - The Grand-Master\nSam Jordan - Custom-chip, floppy-DMA, etc.\nMathias Ortmann - Original WinUAE Main Guy, BSD Socket support\nBrian King - Picasso96 Support, Integrated GUI for WinUAE, previous WinUAE Main Guy\nToni Wilen - Core updates, WinUAE Main Guy\nGustavo Goedert/Peter Remmers/Michael Sontheimer/Tomi Hakala/Tim Gunn/Nemo Pohle - DOS Port Stuff\nSamuel Devulder/Olaf Barthel/Sam Jordan - Amiga Ports\nKrister Bergman - XFree86 and OS/2 Port\nA. Blanchard/Ernesto Corvi - MacOS Port\nChristian Bauer - BeOS Port\nIan Stephenson - NextStep Port\nPeter Teichmann - Acorn/RiscOS Port\nStefan Reinauer - ZorroII/III AutoConfig, Serial Support\nChristian Schmitt/Chris Hames - Serial Support\nHerman ten Brugge - 68020/68881 Emulation Code\nTauno Taipaleenmaki - Various UAE-Control/UAE-Library Support\nBrett Eden/Tim Gunn/Paolo Besser/Nemo Pohle - Various Docs and Web-Sites\nGeorg Veichtlbauer - Help File coordinator, German GUI\nFulvio Leonardi - Italian translator for WinUAE\n"
+    IDS_CONTRIBUTORS2       "Bill Panagouleas - Hardware support\nSpecial thanks to Alexander Kneer and Tobias Abt (The Picasso96 Team)\nSteven Weiser  - Postscript printing emulation idea and testing.\nPéter Tóth /Balázs Rátkai/Iván Herczeg/András Arató - Hungarian translation.\nKarsten Bock, Gavin Fance, Dirk Trowe, Christoph Meier and Christian Schindler - Freezer cartridge hardware support."
+    IDS_INVALIDPRTPORT      "The printer you have in this configuration is not valid on this machine.\n"
+    IDS_RESTOREUSS          "Restore a WinUAE snapshot file"
+    IDS_USS                 "WinUAE snapshot files"
+    IDS_WRONGOSVERSION      "WinUAE is no longer supported on Windows NT.  Please upgrade to either Windows 2000 or Windows XP or a later version."
+    IDS_SELECTFLASH         "Select a flash or battery-backed RAM file..."
+    IDS_FLASH               "WinUAE flash or battery-backed RAM file"
+    IDS_INPUTHOSTWIDGET     "Input source"
+    IDS_INPUTAMIGAEVENT     "Input target"
+    IDS_INPUTAUTOFIRE       "Autofire"
+    IDS_SAVEUSS             "Save a WinUAE snapshot file"
+    IDS_MIDIOVERFLOW        "Sysexbuffer overflow. Should not happen. Please report this to\nberndroesch1@compuserve.de"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_PATH                "Path"
+    IDS_RW                  "R/W"
+    IDS_SECTORS             "Sectors"
+    IDS_SURFACES            "Bill Panagouleas - Hardware support\nSpecial thanks to Alexander Kneer and Tobias Abt (The Picasso96 Team)\nSteven Weiser  - Postscript printing emulation idea and testing.\nHungarian translation - Péter Tóth , Balázs Rátkai , Iván Herczeg , András Arató"
+    IDS_RESERVED            "Reserved"
+    IDS_BLOCKSIZE           "Block size"
+    IDS_NAME                "Name"
+    IDS_DESCRIPTION         "Description"
+    IDS_COULDNOTLOADCONFIG  "Could not load the selected configuration!\n"
+    IDS_NOHELP              "Online help is disabled because the HTML Help functionality is not installed on this system. HTML Help is available from http://www.microsoft.com/downloads/.\n"
+    IDS_MUSTSELECTCONFIG    "You must select a configuration or enter a name before selecting Load...\n"
+    IDS_INVALIDCOMPORT      "The serial port you have in this configuration is not valid on this machine.\n"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_HFDSIZE             "Size"
+    IDS_DEVICE              "Device"
+    IDS_BOOTPRI             "BootPri"
+    IDS_FLOPPY_COMPATIBLE   " (compatible)"
+    IDS_FLOPPY_TURBO        "Turbo"
+    IDS_YES                 "yes"
+    IDS_NO                  "no"
+    IDS_PRI_ABOVENORMAL     "Above Normal"
+    IDS_PRI_NORMAL          "Normal"
+    IDS_PRI_BELOWNORMAL     "Below Normal"
+    IDS_PRI_LOW             "Low"
+    IDS_OLDRTGLIBRARY       "The installed LIBS:Picasso96/rtg.library (%d.%d) should be updated.\nA newer version is included in the ""Amiga Programs"" directory\n of the WinUAE distribution archive.\n\nNewer library version fixes graphics problems and increases performance."
+    IDS_DEFAULT_AF2005      "Amiga Forever 2005+"
+    IDS_DEFAULT_AF          "Amiga Forever"
+    IDS_DEFAULT_WINUAE      "WinUAE default (old)"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_SOUND_STEREO2       "Cloned Stereo (4 Channels)"
+    IDS_INPUT_CUSTOMEVENT   "<Custom event>"
+    IDS_DEFAULT_NEWWINUAE   "WinUAE default (new)"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_UNSUPPORTEDPIXELFORMAT 
+                            "Error: unsupported pixel format. Please use a different screen mode.\n"
+    IDS_MUSTENTERNAME       "You must select a configuration or enter a name before selecting Save...\n"
+    IDS_MUSTSELECTCONFIGFORDELETE 
+                            "You must select a configuration or enter a name before selecting Delete...\n"
+    IDS_DELETECONFIGCONFIRMATION 
+                            "Are you sure you want to Delete this configuration?\n"
+    IDS_DELETECONFIGTITLE   "Confirm Delete"
+    IDS_MUSTSELECTPATH      "You must select a path!"
+    IDS_SETTINGSERROR       "Settings error"
+    IDS_MUSTSELECTNAME      "You must select a name for the volume!"
+    IDS_MUSTSELECTFILE      "You must select a file!"
+    IDS_FAILEDHARDFILECREATION "Failed to create hard disk image file..."
+    IDS_CREATIONERROR       "Creation error"
+    IDS_ERRORTITLE          "WinUAE message"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_INP                 "WinUAE Input Recording"
+    IDS_RESTOREINP          "Playback a WinUAE input recording"
+    IDS_SAVEINP             "Record a WinUAE input recording"
+    IDS_SCREEN_WINDOWED     "Windowed"
+    IDS_SCREEN_FULLSCREEN   "Fullscreen"
+    IDS_SCREEN_FULLWINDOW   "Full-window"
+    IDS_SCREEN_VSYNC        "VSync"
+    IDS_SOUND_MONO          "Mono"
+    IDS_SOUND_MIXED         "Mixed"
+    IDS_SOUND_STEREO        "Stereo"
+    IDS_SOUND_INTERPOL_DISABLED "Disabled"
+    IDS_SOUND_FILTER_OFF    "Always off"
+    IDS_SOUND_FILTER_EMULATED "Emulated (A500)"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_SOUND_FILTER_EMULATED_E "Emulated (A1200)"
+    IDS_INPUT_COMPATIBILITY "Compatibility mode"
+    IDS_INPUT_CUSTOM        "Configuration #%d"
+    IDS_INPUT_COPY_DEFAULT  "Default"
+    IDS_INPUT_COPY_CUSTOM   "Config #%d"
+    IDS_3D_NO_FILTER        "Point (%d-bit)"
+    IDS_3D_BILINEAR         "Bilinear (%d-bit)"
+    IDS_VSYNC_DEFAULT       "Default"
+    IDS_DRIVESOUND_NONE     "No sound"
+    IDS_DRIVESOUND_DEFAULT_A500 "A500 (WinUAE built-in)"
+    IDS_AVIOUTPUT_NOCODEC   "no codec selected"
+    IDS_DISK_IMAGENAME      "Disk image"
+    IDS_DISK_DRIVENAME      "Drive"
+    IDS_AGA8BIT             "AGA emulation requires a 16-bit or higher display depth.\nSwitching from 8-bit to 16-bit."
+    IDS_UNSUPPORTEDSCREENMODE 
+                            "The selected screen mode can't be displayed in a window, because %s\nSwitching to full-screen display."
+    IDS_UNSUPPORTEDSCREENMODE_1 
+                            "the desktop is running in an unknown color mode."
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_UNSUPPORTEDSCREENMODE_2 
+                            "the desktop is running in 8-bit color depth, which WinUAE can't use in windowed mode."
+    IDS_UNSUPPORTEDSCREENMODE_3 
+                            "the desktop is too small for the specified window size."
+    IDS_UNSUPPORTEDSCREENMODE_4 
+                            "you selected an RTG (Picasso96) display with unsupported color depth."
+    IDS_FLOPPYTYPE35DD      "3.5"" DD"
+    IDS_FLOPPYTYPE35HD      "3.5"" HD"
+    IDS_FLOPPYTYPE525SD     "5.25"" SD"
+    IDS_FLOPPYTYPEDISABLED  "Disabled"
+    IDS_STMENUNOFLOPPY      "No floppy disk inserted"
+    IDS_TREEVIEW_HARDWARE   "Hardware"
+    IDS_TREEVIEW_HOST       "Host"
+    IDS_TREEVIEW_MISC       "Miscellaneous"
+    IDS_TREEVIEW_SETTINGS   "Settings"
+    IDS_WINUAETITLE_MMB     "[Mouse active - press ALT+TAB or middle mouse button to cancel]"
+    IDS_WINUAETITLE_NORMAL  "[Mouse active - press ALT+TAB to cancel]"
+    IDS_STARTEMULATION      "Start"
+    IDS_TREEVIEW_ABOUT      "About"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_NOHARDDRIVES        "No hard disks detected that were either empty or RDB-partitioned."
+    IDS_DEFAULT_HOST        "Default Configuration"
+    IDS_SOUND_4CHANNEL      "4 Channels"
+    IDS_HF_FS_CUSTOM        "Custom"
+    IDS_SELECTFS            "Select file system handler (FastFileSystem, SmartFilesystem, etc.)"
+    IDS_KEYJOY              "Keyboard Layout A (Numeric keypad, 0 and 5 = Fire)\nKeyboard Layout B (Cursor keys, Right CTRL and ALT = Fire)\nKeyboard Layout C (W=Up S=Down A=Left D=Right, Left ALT = Fire)\nX-Arcade (Left)\nX-Arcade (Right)"
+    IDS_STATEFILE_UNCOMPRESSED "Uncompressed"
+    IDS_STATEFILE_RAMDUMP   "RAM dump"
+    IDS_STATEFILE_WAVE      "Wave audio dump"
+    IDS_SOUND_SWAP_PAULA    "Paula only"
+    IDS_SOUND_SWAP_AHI      "AHI only"
+    IDS_SOUND_SWAP_BOTH     "Both"
+    IDS_SOUND_FILTER_ON_AGA "Always on (A500)"
+    IDS_SOUND_FILTER_ON_A500 "Always on (A1200)"
+    IDS_DRIVESOUND_PC_FLOPPY "PC floppy drive %c"
+    IDS_FLOPPYTYPE35DDESCOM "3.5"" ESCOM"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_NUMSG_NEEDEXT2      "The software uses a non-standard floppy disk format. You may need to use a custom floppy disk image file instead of a standard one. This message will not appear again."
+    IDS_NUMSG_NOROMKEY      "Could not find system ROM key file."
+    IDS_NUMSG_KSROMCRCERROR "System ROM checksum incorrect. The system ROM image file may be corrupt."
+    IDS_NUMSG_KSROMREADERROR "Error while reading system ROM."
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_NUMSG_NOEXTROM      "No extended ROM found."
+    IDS_NUMSG_MODRIP_NOTFOUND "No music modules or packed data found."
+    IDS_NUMSG_MODRIP_FINISHED "Scan finished."
+    IDS_NUMSG_MODRIP_SAVE   "Module/packed data found\n%s\nStart address %08.8X, Size %d bytes\nWould you like to save it?"
+    IDS_NUMSG_KS68020       "The selected system ROM requires a 68020 with 32-bit addressing or 68030 or higher CPU."
+    IDS_NUMSG_ROMNEED       "One of the following system ROMs is required:\n\n%s\n\nCheck the System ROM path in the Paths panel and click Rescan ROMs."
+    IDS_NUMSG_STATEHD       "WARNING: Current configuration is not fully compatible with state saves.\nThis message will not appear again."
+    IDS_NUMSG_NOCAPS        "Selected disk image needs the SPS plugin\nwhich is available from\nhttp//www.softpres.org/"
+    IDS_NUMSG_OLDCAPS       "You need an updated SPS plugin\nwhich is available from\nhttp//www.softpres.org/"
+    IDS_IMGCHK_BOOTBLOCKCRCERROR 
+                            "The selected floppy disk image is not bootable (boot block checksum error)"
+    IDS_IMGCHK_BOOTBLOCKNO  "The selected floppy disk image is not bootable (no boot block)"
+    IDS_IMGCHK_DAMAGED      "The selected floppy disk image is damaged or unformatted"
+    IDS_IMGCHK_KS2          "The selected floppy disk image requires a 2.04 or later system ROM.\nThe configuration has been updated."
+    IDS_IMGCHK_KS3          "The selected floppy disk image requires a 3.0 or later system ROM.\nThe configuration has been updated."
+    IDS_ROMSCANEND          "Scan of ROMs finished"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_ROM_AVAILABLE       "available"
+    IDS_ROM_UNAVAILABLE     "unavailable"
+    IDS_HARDDRIVESAFETYWARNING1 
+                            "Warning: The drive safety check is active. Selected drive is not empty and non-RDB partitioned."
+    IDS_NUMSG_KS68EC020     "The selected system ROM requires a 68020 with 24-bit addressing or higher CPU."
+    IDS_ROMSCANNOROMS       "No supported system ROMs detected."
+    IDS_NUMSG_KICKREP       "You need to have a floppy disk (image file) in DF0: to use the system ROM replacement."
+    IDS_NUMSG_KICKREPNO     "The floppy disk (image file) in DF0: is not compatible with the system ROM replacement functionality."
+    IDS_NUMSG_NOROM         "Could not load system ROM, trying system ROM replacement."
+    IDS_HDCLONE_OK          "Hard drive image file created succesfully."
+    IDS_HDCLONE_FAIL        "Hard drive image file creation failed.\nError code %d:%d."
+    IDS_NUMSG_KS68030       "The selected system ROM requires a 68030 CPU."
+    IDS_NUMSG_EXPROMNEED    "One of the following expansion boot ROMs is required:\n\n%s\n\nCheck the System ROM path in the Paths panel and click Rescan ROMs."
+    IDS_HARDDRIVESAFETYWARNING2 
+                            "Warning: The drive safety check has been disabled, and non-empty and non-RDB partitioned hard disk(s) were detected."
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_QS_MODELS           "A500\nA500+\nA600\nA1000\nA1200\nA3000\nA4000\nCD32\nCDTV\nArcadia Multi Select system\nExpanded WinUAE example configuration"
+    IDS_QS_MODEL_A500       "1.3 ROM, OCS, 512 KB Chip + 512 KB Slow RAM (most common)\nThis configuration is capable of running most games and demos produced for first-generation hardware. Only few exceptions need a different configuration (e.g. the oldest games tend to be incompatible with this configuration).\n1.3 ROM, ECS Agnus, 512 KB Chip RAM + 512 KB Slow RAM\nLater hardware revision of the A500. Nearly 100% compatible with the previous configuration.\n1.3 ROM, ECS Agnus, 1 MB Chip RAM\nFew newer games and demos require this configuration.\n1.3 ROM, OCS Agnus, 512 KB Chip RAM\nVery old (e.g. pre-1988) games and demos may require this configuration.\n1.2 ROM, OCS Agnus, 512 KB Chip RAM\nAs available for the A1000, and installed on the first A500 and A2000 series. Some very old programs only work correctly with this configuration. Note: This system ROM version can only boot from floppy disk (no hard disk boot support).\n1.2 ROM, OCS Agnus, 512 KB Chip RAM + 512 KB Slow RAM\nThis configuration adds expansion memory to the first A500 produced. Try this if your game does not work with newer configurations, but works with the previous one. It could add some features to the game, including faster loading times. Note: This system ROM version can only boot from floppy disk (no hard disk boot support)."
+    IDS_QS_MODEL_A500P      "Basic non-expanded configuration\nThe A500+ adds an ECS Agnus chip, 1 MB of Chip RAM and a 2.0 ROM to the A500. Many A500 games and demos don't work properly on an A500+.\n2 MB Chip RAM expanded configuration\n\n4 MB Fast RAM expanded configuration\n"
+    IDS_QS_MODEL_A600       "Basic non-expanded configuration\nThe A600 is smaller than the A500+ and has an updated 2.0 ROM.\n2 MB Chip RAM expanded configuration\n\n4 MB Fast RAM expanded configuration\n"
+    IDS_QS_MODEL_A1000      "512 KB Chip RAM\nThe A1000 was the first model produced, with a configuration equivalent to that of an A500 with OCS chipset. You normally don't need to use this configuration, unless you are nostalgic and would like to hear the short A1000 boot tune\n""ICS"" Denise without EHB support\nVery first A1000 models had Denise without EHB capability.\n256 KB Chip RAM\n Unexpanded A1000. All later A1000 models were sold with a 256 KB RAM expansion built-in."
+    IDS_QS_MODEL_A1200      "Basic non-expanded configuration\nUse this configuration to run most AGA demos and games\n4 MB Fast RAM expanded configuration\nSome newer AGA games and demos need an expanded A1200 to run."
+    IDS_QS_MODEL_CD32       "CD32\nThe CD32 was one the first 32-bit consoles on the market. It is basically an A1200 with a built-in CD-ROM drive. Insert your CD32 or CDTV CD-ROM into a free CD-ROM drive before starting the emulation."
+    IDS_QS_MODEL_CDTV       "CDTV\nThe CDTV was the first model with a built-in CD-ROM drive. Looking like a black CD player, it featured a configuration equivalent to that of an A500 with 1 MB RAM and an ECS chipset.\nFloppy drive and 64KB SRAM card expanded CDTV\n"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_QS_MODEL_UAE        "High-end expanded configuration"
+    IDS_QS_MODEL_ARCADIA    "Arcadia\nArcadia Multi Select system is arcade platform developed by Arcadia and  Mastertronic. It is based on an A500 mainboard with ROM cage attached to expansion port. Arcadia ROM files go to ""Cartridge ROM File"" in ROM-panel."
+    IDS_QS_MODEL_A3000      "1.4 ROM, 2MB Chip + 8MB Fast\n\n2.04 ROM, 2MB Chip + 8MB Fast\n\n3.1 ROM, 2MB Chip + 8MB Fast\n"
+    IDS_QS_MODEL_A4000      "68030, 3.1 ROM, 2MB Chip + 8MB Fast\n\n68040, 3.1 ROM, 2MB Chip + 8MB Fast\n"
+    IDS_QS_MODEL_A4000T     "A4000T (test)\nA4000T"
+END
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Finnish resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FIN)
+#ifdef _WIN32
+LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "resource.\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "\r\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#include ""afxres.h""\r\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+#endif    // Finnish resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
index 934f14b17c787437ca2909f5bf6d48756c959fd8..17434c9338bed15b43bb70854bcaa1aa51178b81 100755 (executable)
@@ -36,11 +36,13 @@ int rp_rpescapeholdtime = 600;
 int rp_screenmode = 0;
 int rp_inputmode = 0;
 int log_rp = 1;
+static int max_horiz_dbl = RES_HIRES;
+static int max_vert_dbl = 1;
 
 static int default_width, default_height;
 static int hwndset;
 static int minimized;
-static DWORD hd_mask, cd_mask;
+static DWORD hd_mask, cd_mask, floppy_mask;
 static int mousecapture, mousemagic;
 static int rp_filter, rp_filter_default;
 
@@ -149,7 +151,12 @@ static int port_insert2 (int num, const char *name)
        }
        sprintf (tmp1, "Joystick%d", i);
        if (!strcmp (name, tmp1)) {
-           sprintf (tmp2, "joy%d", i - 1);
+           if (i - 1 == JSEM_XARCADE1LAYOUT)
+               sprintf (tmp2, "kbd%d", JSEM_XARCADE1LAYOUT);
+           else if (i - 1 == JSEM_XARCADE2LAYOUT)
+               sprintf (tmp2, "kbd%d", JSEM_XARCADE2LAYOUT);
+           else
+               sprintf (tmp2, "joy%d", i - 1);
            type = 0;
            break;
        }
@@ -197,6 +204,7 @@ static BOOL RPSendMessagex (UINT uMessage, WPARAM wParam, LPARAM lParam,
     BOOL v = FALSE;
     static int cnt;
     int ncnt;
+    int dolog = log_rp;
 
     if (!pInfo) {
        write_log ("RPSEND: pInfo == NULL!\n");
@@ -206,14 +214,16 @@ static BOOL RPSendMessagex (UINT uMessage, WPARAM wParam, LPARAM lParam,
        write_log ("RPSEND: pInfo->hHostMessageWindow == NULL!\n");
         return FALSE;
     }
+    if (uMessage == RPIPCGM_DEVICESEEK)
+       dolog = 0;
     recursive++;
     cnt++;
     ncnt = cnt;
-    if (log_rp)
+    if (dolog)
        write_log ("RPSEND_%d->\n", ncnt);
     v = RPSendMessage (uMessage, wParam, lParam, pData, dwDataSize, pInfo, plResult);
     recursive--;
-    if (log_rp) {
+    if (dolog) {
        write_log ("RPSEND_%d(%s [%d], %08x, %08x, %08x, %d)\n", ncnt,
            getmsg (uMessage), uMessage - WM_APP, wParam, lParam, pData, dwDataSize);
        if (v == FALSE)
@@ -222,7 +232,7 @@ static BOOL RPSendMessagex (UINT uMessage, WPARAM wParam, LPARAM lParam,
     return v;
 }
 
-static int winok(void)
+static int winok (void)
 {
     if (!initialized)
        return 0;
@@ -231,44 +241,94 @@ static int winok(void)
     return 1;
 }
 
+
+static void fixup_size (struct uae_prefs *prefs)
+{
+    if (prefs->gfx_xcenter_size > 0) {
+       int hres = prefs->gfx_resolution;
+       if (prefs->gfx_filter) {
+           if (prefs->gfx_filter_horiz_zoom_mult)
+               hres += (1000 / prefs->gfx_filter_horiz_zoom_mult) - 1;
+           hres += uaefilters[prefs->gfx_filter].intmul - 1;
+       }
+       if (hres > RES_MAX)
+           hres = RES_MAX;
+        prefs->gfx_size_win.width = prefs->gfx_xcenter_size >> (RES_MAX - hres);
+    }
+    if (prefs->gfx_ycenter_size > 0) {
+       int vres = prefs->gfx_linedbl ? 1 : 0;
+       if (prefs->gfx_filter) {
+           if (prefs->gfx_filter_vert_zoom_mult)
+               vres += (1000 / prefs->gfx_filter_vert_zoom_mult) - 1;
+           vres += uaefilters[prefs->gfx_filter].intmul - 1;
+       }
+       if (vres > RES_MAX)
+           vres = RES_MAX;
+       prefs->gfx_size_win.height = (prefs->gfx_ycenter_size * 2) >> (RES_MAX - vres);
+    }
+}
+
 #define LORES_WIDTH 360
 #define LORES_HEIGHT 284
 static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
 {
-    int res = p->gfx_resolution;
-    int m = RP_SCREENMODE_1X;
+    int hres;
+    int m;
     int full = 0;
-    int dbl = 0;
+    int vres = 0;
+    int totalhdbl, totalvdbl;
+
+    hres = p->gfx_resolution;
+    if (p->gfx_filter && p->gfx_filter_horiz_zoom_mult)
+       hres += (1000 / p->gfx_filter_horiz_zoom_mult) - 1;
+    if (hres > RES_MAX)
+       hres = RES_MAX;
+    vres = hres;
+    m = RP_SCREENMODE_1X;
 
     if (WIN32GFX_IsPicassoScreen ()) {
+
        full = p->gfx_pfullscreen;
        sm->lClipTop = 0;
        sm->lClipLeft = 0;
        sm->lClipHeight = picasso96_state.Height;
        sm->lClipWidth = picasso96_state.Width;
+
     } else {
+
        full = p->gfx_afullscreen;
-       dbl = res >= 1 ? 1 : 0;
-       if (res == RES_HIRES)
+
+       if (hres == RES_HIRES)
            m = RP_SCREENMODE_2X;
-       if (res == RES_SUPERHIRES) {
+       if (hres == RES_SUPERHIRES)
            m = RP_SCREENMODE_4X;
-           dbl = 2;
-       }
+
+       totalhdbl = hres;
+        if (hres > max_horiz_dbl)
+           hres = max_horiz_dbl;
+       totalvdbl = vres;
+       if (vres > max_vert_dbl)
+           vres = max_vert_dbl;
+
        if (log_rp)
-           write_log ("GET_RPSM: res=%d dbl=%d full=%d xcpos=%d ycpos=%d w=%d h=%d\n",
-               res, dbl, full,
+           write_log ("GET_RPSM: hres=%d (%d) vres=%d (%d) full=%d xcpos=%d ycpos=%d w=%d h=%d\n",
+               totalhdbl, hres, totalvdbl, vres, full,
                p->gfx_xcenter_pos,  p->gfx_ycenter_pos,
                p->gfx_size_win.width, p->gfx_size_win.height);
        sm->lClipLeft = p->gfx_xcenter_pos <= 0 ? -1 : p->gfx_xcenter_pos;
        sm->lClipTop = p->gfx_ycenter_pos <= 0 ? -1 : p->gfx_ycenter_pos;
        if (full) {
            sm->lClipWidth = LORES_WIDTH << RES_MAX;
-           sm->lClipHeight = LORES_HEIGHT << dbl;
+           sm->lClipHeight = LORES_HEIGHT << 1;
        } else {
-           sm->lClipWidth = p->gfx_size_win.width << (RES_MAX - res);
-           sm->lClipHeight = (p->gfx_size_win.height * 2) >> (2 - dbl);
+           sm->lClipWidth = p->gfx_size_win.width << (RES_MAX - totalhdbl);
+           if (totalvdbl == 2)
+               sm->lClipHeight = p->gfx_size_win.height >> 1;
+           else
+               sm->lClipHeight = p->gfx_size_win.height << (1 - totalvdbl);
        }
+       if (full && p->gfx_filter && p->gfx_filter_horiz_zoom_mult == 0)
+           m = RP_SCREENMODE_XX;
     }
     if (full) {
        m &= ~0x0000ff00;
@@ -279,17 +339,18 @@ static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
     sm->dwScreenMode = m;
 
     if (log_rp)
-       write_log ("GET_RPSM: %08X %dx%d %dx%d res=%d disp=%d fs=%d\n",
+       write_log ("GET_RPSM: %08X %dx%d %dx%d hres=%d (%d) vres=%d (%d) disp=%d fs=%d\n",
            sm->dwScreenMode, sm->lClipLeft, sm->lClipTop, sm->lClipWidth, sm->lClipHeight,
-           res, p->gfx_display, full);
+           totalhdbl, hres, totalvdbl, vres, p->gfx_display, full);
 }
 
 static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
 {
-    int res = RP_SCREENMODE_MODE (sm->dwScreenMode);
+    int smm = RP_SCREENMODE_MODE (sm->dwScreenMode);
     int display = RP_SCREENMODE_DISPLAY (sm->dwScreenMode);
     int fs = 0;
-    int dbl = 1;
+    int hdbl = 1, vdbl = 1;
+    int hres, vres;
     struct MultiDisplay *disp;
 
     minimized = 0;
@@ -299,33 +360,57 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
            fs = 2;
        else
            fs = 1;
-       if (res > RP_SCREENMODE_2X)
-           res = RP_SCREENMODE_2X;
     }
     disp = getdisplay (p);
 
     if (log_rp)
-       write_log ("SET_RPSM: %08X %dx%d %dx%d res=%d disp=%d fs=%d\n",
+       write_log ("SET_RPSM: %08X %dx%d %dx%d hres=%d vres=%d disp=%d fs=%d\n",
            sm->dwScreenMode, sm->lClipLeft, sm->lClipTop, sm->lClipWidth, sm->lClipHeight,
-           res, display, fs);
+           hdbl, vdbl, display, fs);
 
     if (!WIN32GFX_IsPicassoScreen ()) {
-       p->gfx_resolution = res == RP_SCREENMODE_4X ? RES_SUPERHIRES : res;
-       if (res == 0) {
-           dbl = dbl = p->gfx_linedbl = 0;
+
+       hdbl = smm;
+       if (smm == RP_SCREENMODE_3X)
+           hdbl = RES_HIRES;
+       if (smm == RP_SCREENMODE_4X)
+           hdbl = RES_SUPERHIRES;
+       if (smm > RP_SCREENMODE_4X || smm == RP_SCREENMODE_XX) {
+           hdbl = max_horiz_dbl;
+           vdbl = max_vert_dbl;
+       }
+
+       if (hdbl == RES_LORES) {
+           vdbl = 0;
        } else {
-           dbl = p->gfx_linedbl = 1;
-           if (res == RP_SCREENMODE_4X)
-               dbl = 2;
+           vdbl = 1;
+           if (hdbl == RES_SUPERHIRES)
+               vdbl = 2;
        }
+
+       hres = hdbl;
+       if (hres > max_horiz_dbl)
+           hres = max_horiz_dbl;
+       p->gfx_resolution = hres;
+       vres = vdbl;
+       if (vres > max_vert_dbl)
+           vres = max_vert_dbl;
+       p->gfx_linedbl = vres ? 1 : 0;
+
        if (sm->lClipWidth <= 0)
-           p->gfx_size_win.width = LORES_WIDTH << p->gfx_resolution;
-       else
-           p->gfx_size_win.width = sm->lClipWidth >> (RES_MAX - p->gfx_resolution);
-       if (sm->lClipHeight <= 0)
-           p->gfx_size_win.height = LORES_HEIGHT << dbl;
+           p->gfx_size_win.width = LORES_WIDTH << hdbl;
        else
-           p->gfx_size_win.height = (sm->lClipHeight * 2) >> (2 - dbl);
+           p->gfx_size_win.width = sm->lClipWidth >> (RES_MAX - hdbl);
+
+       if (sm->lClipHeight <= 0) {
+           p->gfx_size_win.height = LORES_HEIGHT << vdbl;
+       } else {
+           if (vdbl == 2)
+               p->gfx_size_win.height = sm->lClipHeight * 2;
+           else
+               p->gfx_size_win.height = sm->lClipHeight >> (1 - vdbl);
+       }
+
        if (fs == 1) {
            p->gfx_size_fs.width = p->gfx_size_win.width;
            p->gfx_size_fs.height = p->gfx_size_win.height;
@@ -333,6 +418,7 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
            p->gfx_size_fs.width = disp->rect.right - disp->rect.left;
            p->gfx_size_fs.height = disp->rect.bottom - disp->rect.top;
        }
+
        p->gfx_filter = rp_filter_default;
        p->gfx_filter_horiz_zoom_mult = 1000;
        p->gfx_filter_vert_zoom_mult = 1000;
@@ -341,17 +427,19 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
                p->gfx_size_win.width, p->gfx_size_win.height,
                p->gfx_size_fs.width, p->gfx_size_fs.height);
        if (fs) {
-           if (res == RP_SCREENMODE_XX) {
+           if (smm == RP_SCREENMODE_XX) {
+               p->gfx_filter = rp_filter;
                p->gfx_filter_horiz_zoom_mult = 0;
                p->gfx_filter_vert_zoom_mult = 0;
-               p->gfx_filter = rp_filter;
            } else {
                int mult;
                int prevmult = 1;
+               int xmult = uaefilters[p->gfx_filter].intmul;
+               int ymult = uaefilters[p->gfx_filter].intmul ;
                for (mult = 2; mult <= 4; mult+=2) {
                    int w = p->gfx_size_win.width;
                    int h = p->gfx_size_win.height;
-                   if (p->gfx_size_fs.width < w * mult || p->gfx_size_fs.height < h * mult) {
+                   if (p->gfx_size_fs.width * xmult < w * mult || p->gfx_size_fs.height * ymult < h * mult) {
                        mult = prevmult;
                        break;
                    }
@@ -364,23 +452,21 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
                }
            }
        } else {
-           if (res == RP_SCREENMODE_4X) {
+           if (hdbl != hres || vdbl != vres) {
                p->gfx_filter = rp_filter;
-               p->gfx_filter_horiz_zoom_mult = 1000;
-               p->gfx_filter_vert_zoom_mult = 500;
+               p->gfx_filter_horiz_zoom_mult = 1000 >> (hdbl - hres);
+               p->gfx_filter_vert_zoom_mult = 1000 >> (vdbl - vres);
            }
        }
 
     }
-#if 0
-    p->gfx_filter = UAE_FILTER_NULL;
-    p->gfx_filter_horiz_zoom_mult = 1000;
-    p->gfx_filter_vert_zoom_mult = 1000;
-#endif
     p->gfx_pfullscreen = fs;
     p->gfx_afullscreen = fs;
     p->gfx_xcenter_pos = sm->lClipLeft;
     p->gfx_ycenter_pos = sm->lClipTop;
+    p->gfx_xcenter_size = sm->lClipWidth;
+    p->gfx_ycenter_size = sm->lClipHeight;
+
     updatewinfsmode (p);
     hwndset = 0;
 }
@@ -550,19 +636,27 @@ static void sendfeatures (void)
 
 void rp_fixup_options (struct uae_prefs *p)
 {
-    int i, v;
+    int i;
     struct RPScreenMode sm;
 
     if (!initialized)
        return;
+
     write_log ("rp_fixup_options(escapekey=%d,escapeholdtime=%d,screenmode=%d,inputmode=%d)\n",
        rp_rpescapekey, rp_rpescapeholdtime, rp_screenmode, rp_inputmode);
+    write_log ("w=%dx%d fs=%dx%d\n",
+       p->gfx_size_win.width, p->gfx_size_win.height,
+       p->gfx_size_fs.width, p->gfx_size_fs.height);
+
+    max_horiz_dbl = currprefs.gfx_max_horizontal;
+    max_vert_dbl = currprefs.gfx_max_vertical;
 
     changed_prefs.win32_borderless = currprefs.win32_borderless = 1;
     rp_filter_default = rp_filter = currprefs.gfx_filter;
     if (rp_filter == 0)
        rp_filter = UAE_FILTER_NULL;
 
+    fixup_size (p);
     get_screenmode (&sm, p);
     sm.dwScreenMode = rp_screenmode;
     set_screenmode (&sm, &currprefs);
@@ -571,27 +665,35 @@ void rp_fixup_options (struct uae_prefs *p)
     sendfeatures ();
 
     /* floppy drives */
-    v = 0;
+    floppy_mask = 0;
     for (i = 0; i < 4; i++) {
        if (p->dfxtype[i] >= 0)
-           v |= 1 << i;
+           floppy_mask |= 1 << i;
     }
-    RPSendMessagex (RPIPCGM_DEVICES, RP_DEVICE_FLOPPY, v, NULL, 0, &guestinfo, NULL);
+    RPSendMessagex (RPIPCGM_DEVICES, RP_DEVICE_FLOPPY, floppy_mask, NULL, 0, &guestinfo, NULL);
 
     RPSendMessagex (RPIPCGM_DEVICES, RP_DEVICE_INPUTPORT, 3, NULL, 0, &guestinfo, NULL);
+    rp_input_change (0);
+    rp_input_change (1);
 
+    hd_mask = 0;
     cd_mask = 0;
     for (i = 0; i < currprefs.mountitems; i++) {
         struct uaedev_config_info *uci = &currprefs.mountconfig[i];
+       int num = -1;
        if (uci->controller == HD_CONTROLLER_UAE) {
-           hd_mask |= 1 << i;
+           num = i;
         } else if (uci->controller <= HD_CONTROLLER_IDE3 ) {
-           hd_mask |= 1 << (uci->controller -  HD_CONTROLLER_IDE0);
+           num = uci->controller -  HD_CONTROLLER_IDE0;
        } else if (uci->controller <= HD_CONTROLLER_SCSI6) {
-           hd_mask |= 1 << (uci->controller -  HD_CONTROLLER_SCSI0);
+           num = uci->controller -  HD_CONTROLLER_SCSI0;
+       }
+       if (num >= 0) {
+           hd_mask |= 1 << num;
+           RPSendMessagex (RPIPCGM_DEVICES, RP_DEVICE_HD, hd_mask, NULL, 0, &guestinfo, NULL);
+           rp_harddrive_image_change (num, uci->rootdir);
        }
     }
-    RPSendMessagex (RPIPCGM_DEVICES, RP_DEVICE_HD, hd_mask, NULL, 0, &guestinfo, NULL);
 
     rp_update_volume (&currprefs);
     rp_turbo (turbo_emulation);
@@ -617,17 +719,66 @@ static void rp_device_change (int dev, int num, const char *name)
     dc->btDeviceCategory = dev;
     dc->btDeviceNumber = num;
     wcscpy (dc->szContent, au (np));
-    RPSendMessagex(RPIPCGM_DEVICECONTENT, 0, 0, dc, dc_size, &guestinfo, NULL);
+    RPSendMessagex (RPIPCGM_DEVICECONTENT, 0, 0, dc, dc_size, &guestinfo, NULL);
     xfree (dc);
 }
 
-void rp_disk_change (int num, const char *name)
+void rp_input_change (int num)
+{
+    int j = jsem_isjoy (num, &currprefs);
+    int m = jsem_ismouse (num, &currprefs);
+    int k = jsem_iskbdjoy (num, &currprefs);
+    char name[MAX_DPATH];
+    char *name2 = NULL, *name3 = NULL;
+
+    if (JSEM_ISXARCADE1 (num, &currprefs)) {
+       j = 2;
+       m = k = -1;
+    } else if (JSEM_ISXARCADE2 (num, &currprefs)) {
+       j = 3;
+       m = k = -1;
+    } else if (j >= 1) {
+       j = 1;
+    }
+    if (j >= 0) {
+       name2 = inputdevice_get_device_name (IDTYPE_JOYSTICK, j);
+       name3 = inputdevice_get_device_unique_name (IDTYPE_JOYSTICK, j);
+       sprintf (name, "Joystick%d", j + 1);
+    } else if (m >= 0) {
+       name2 = inputdevice_get_device_name (IDTYPE_MOUSE, m);
+       name3 = inputdevice_get_device_unique_name (IDTYPE_MOUSE, m);
+       sprintf (name, "Mouse%d", m + 1);
+    } else if (k >= 0) {
+       sprintf (name, "KeyboardLayout%d", k + 1);
+    }
+    if (name3) {
+        strcat (name, "\\");
+        strcat (name, name3);
+       if (name2) {
+           strcat (name, "\\");
+           strcat (name, name2);
+       }
+    }
+    rp_device_change (RP_DEVICE_INPUTPORT, num, name);
+}
+void rp_disk_image_change (int num, const char *name)
 {
     rp_device_change (RP_DEVICE_FLOPPY, num, name);
 }
-void rp_input_change (int num, const char *name)
+void rp_harddrive_image_change (int num, const char *name)
 {
-    rp_device_change (RP_DEVICE_INPUTPORT, num, name);
+    rp_device_change (RP_DEVICE_HD, num, name);
+}
+
+void rp_floppydrive_change (int num, int removed)
+{
+    if (!cando ())
+       return;
+    if (removed)
+       floppy_mask &= ~(1 << num);
+    else
+       floppy_mask |= 1 << num;
+    RPSendMessagex (RPIPCGM_DEVICES, RP_DEVICE_FLOPPY, floppy_mask, NULL, 0, &guestinfo, NULL);
 }
 
 void rp_hd_change (int num, int removed)
@@ -747,7 +898,9 @@ void rp_turbo (int active)
 {
     if (!cando ())
        return;
-    RPSendMessagex (RPIPCGM_TURBO, RP_TURBO_CPU, active, NULL, 0, &guestinfo, NULL);
+    if (recursive_device)
+       return;
+    RPSendMessagex (RPIPCGM_TURBO, RP_TURBO_CPU, active ? RP_TURBO_CPU : 0, NULL, 0, &guestinfo, NULL);
 }
 
 void rp_set_hwnd (HWND hWnd)
index 94e3a93d86262f3d863538ab779ce1b822d2c265..fbb66e6751d3579aeae52af9b3d102565b857c00 100755 (executable)
@@ -5,6 +5,7 @@ extern void rp_fixup_options (struct uae_prefs*);
 extern void rp_update_volume (struct uae_prefs*);
 extern void rp_update_leds (int, int);
 extern void rp_floppy_track (int floppy, int track);
+extern void rp_floppydrive_change (int num, int removed);
 extern void rp_hd_activity (int, int);
 extern void rp_hd_change (int, int);
 extern void rp_cd_activity (int, int);
@@ -27,5 +28,6 @@ extern int rp_rpescapeholdtime;
 extern int rp_screenmode;
 extern int rp_inputmode;
 
-extern void rp_disk_change (int num, const char *name);
-extern void rp_input_change (int num, const char *name);
\ No newline at end of file
+extern void rp_input_change (int num);
+extern void rp_disk_image_change (int num, const char *name);
+extern void rp_harddrive_image_change (int num, const char *name);
index 8c497a9c52f4f6654dc1b480fea0fa7084121cb4..06852dc1463644ddd54dca1ad4530c7c4c49eb9b 100755 (executable)
@@ -93,35 +93,35 @@ int screenshot_prepare(void)
     unsigned int width, height;
     HGDIOBJ hgdiobj;
 
-    screenshot_free();
+    screenshot_free ();
 
-    width = WIN32GFX_GetWidth();
-    height = WIN32GFX_GetHeight();
+    width = WIN32GFX_GetWidth ();
+    height = WIN32GFX_GetHeight ();
 
     surface_dc = gethdc ();
     if (surface_dc == NULL)
        goto oops;
 
     // need a HBITMAP to convert it to a DIB
-    if((offscreen_bitmap = CreateCompatibleBitmap(surface_dc, width, height)) == NULL)
+    if ((offscreen_bitmap = CreateCompatibleBitmap (surface_dc, width, height)) == NULL)
        goto oops; // error
 
     // The bitmap is empty, so let's copy the contents of the surface to it.
     // For that we need to select it into a device context.
-    if((offscreen_dc = CreateCompatibleDC(surface_dc)) == NULL)
+    if ((offscreen_dc = CreateCompatibleDC (surface_dc)) == NULL)
        goto oops; // error
 
     // select offscreen_bitmap into offscreen_dc
-    hgdiobj = SelectObject(offscreen_dc, offscreen_bitmap);
+    hgdiobj = SelectObject (offscreen_dc, offscreen_bitmap);
 
     // now we can copy the contents of the surface to the offscreen bitmap
-    BitBlt(offscreen_dc, 0, 0, width, height, surface_dc, 0, 0, SRCCOPY);
+    BitBlt (offscreen_dc, 0, 0, width, height, surface_dc, 0, 0, SRCCOPY);
 
     // de-select offscreen_bitmap
-    SelectObject(offscreen_dc, hgdiobj);
+    SelectObject (offscreen_dc, hgdiobj);
 
-    ZeroMemory(&bi, sizeof(bi));
-    bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+    ZeroMemory (&bi, sizeof(bi));
+    bi.bmiHeader.biSize = sizeof (BITMAPINFOHEADER);
     bi.bmiHeader.biWidth = width;
     bi.bmiHeader.biHeight = height;
     bi.bmiHeader.biPlanes = 1;
@@ -134,11 +134,11 @@ int screenshot_prepare(void)
     bi.bmiHeader.biClrImportant = 0;
 
     // Reserve memory for bitmap bits
-    if(!(lpvBits = malloc(bi.bmiHeader.biSizeImage)))
+    if (!(lpvBits = malloc (bi.bmiHeader.biSizeImage)))
        goto oops; // out of memory
 
     // Have GetDIBits convert offscreen_bitmap to a DIB (device-independent bitmap):
-    if(!GetDIBits(offscreen_dc, offscreen_bitmap, 0, bi.bmiHeader.biHeight, lpvBits, &bi, DIB_RGB_COLORS))
+    if (!GetDIBits (offscreen_dc, offscreen_bitmap, 0, bi.bmiHeader.biHeight, lpvBits, &bi, DIB_RGB_COLORS))
        goto oops; // GetDIBits FAILED
 
     releasehdc (surface_dc);
@@ -170,22 +170,22 @@ static int savepng(FILE *fp)
     int w = bi.bmiHeader.biWidth;
     int i;
 
-    png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, pngtest_blah, pngtest_blah, pngtest_blah);
+    png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING, pngtest_blah, pngtest_blah, pngtest_blah);
     if (!png_ptr)
        return 0;
-    info_ptr = png_create_info_struct(png_ptr);
+    info_ptr = png_create_info_struct (png_ptr);
     if (!info_ptr) {
-       png_destroy_write_struct(&png_ptr, NULL);
+       png_destroy_write_struct (&png_ptr, NULL);
        return 0;
     }
-    if (setjmp(png_jmpbuf(png_ptr))) {
-       png_destroy_write_struct(&png_ptr, &info_ptr);
+    if (setjmp(png_jmpbuf (png_ptr))) {
+       png_destroy_write_struct (&png_ptr, &info_ptr);
        return 0;
     }
 
-    png_init_io(png_ptr, fp);
-    png_set_filter(png_ptr, 0, PNG_FILTER_NONE);
-    png_set_IHDR(png_ptr, info_ptr,
+    png_init_io (png_ptr, fp);
+    png_set_filter (png_ptr, 0, PNG_FILTER_NONE);
+    png_set_IHDR (png_ptr, info_ptr,
        w, h, 8, PNG_COLOR_TYPE_RGB,
        PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
     row_pointers = xmalloc (h * sizeof(png_bytep*));
@@ -193,9 +193,9 @@ static int savepng(FILE *fp)
        int j = h - i - 1;
        row_pointers[i] = (uae_u8*)lpvBits + j * 3 * ((w + 3) & ~3);
     }
-    png_set_rows(png_ptr, info_ptr, row_pointers);
-    png_write_png(png_ptr,info_ptr, PNG_TRANSFORM_BGR, NULL);
-    png_destroy_write_struct(&png_ptr, &info_ptr);
+    png_set_rows (png_ptr, info_ptr, row_pointers);
+    png_write_png (png_ptr,info_ptr, PNG_TRANSFORM_BGR, NULL);
+    png_destroy_write_struct (&png_ptr, &info_ptr);
     return 1;
 }
 #endif
@@ -209,11 +209,11 @@ static int savebmp(FILE *fp)
     bfh.bfReserved1 = 0;
     bfh.bfReserved2 = 0;
     bfh.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER);
-    if(fwrite(&bfh, 1, sizeof(BITMAPFILEHEADER), fp) < sizeof(BITMAPFILEHEADER))
+    if (fwrite (&bfh, 1, sizeof(BITMAPFILEHEADER), fp) < sizeof(BITMAPFILEHEADER))
        return 0; // failed to write bitmap file header
-    if(fwrite(&bi, 1, sizeof(BITMAPINFOHEADER), fp) < sizeof(BITMAPINFOHEADER))
+    if (fwrite (&bi, 1, sizeof(BITMAPINFOHEADER), fp) < sizeof(BITMAPINFOHEADER))
        return 0; // failed to write bitmap infomation header
-    if(fwrite(lpvBits, 1, bi.bmiHeader.biSizeImage, fp) < bi.bmiHeader.biSizeImage)
+    if (fwrite (lpvBits, 1, bi.bmiHeader.biSizeImage, fp) < bi.bmiHeader.biSizeImage)
        return 0; // failed to write the bitmap
     return 1;
 }
@@ -274,11 +274,11 @@ int screenshotf (const char *spath, int mode, int doprepare)
 
        while(++number < 1000) // limit 999 iterations / screenshots
        {
-           sprintf(filename, "%s%s%s%03d.%s", path, name, underline, number, screenshotmode ? "png" : "bmp");
-           if((fp = fopen(filename, "rb")) == NULL) // does file not exist?
+           sprintf (filename, "%s%s%s%03d.%s", path, name, underline, number, screenshotmode ? "png" : "bmp");
+           if ((fp = fopen (filename, "rb")) == NULL) // does file not exist?
            {
                int ok = 0;
-               if((fp = fopen(filename, "wb")) == NULL)
+               if ((fp = fopen (filename, "wb")) == NULL)
                    goto oops; // error
 #if PNG_SCREENSHOTS > 0
                if (screenshotmode)
@@ -301,7 +301,7 @@ int screenshotf (const char *spath, int mode, int doprepare)
 
 oops:
     if(fp)
-       fclose(fp);
+       fclose (fp);
 
     if (doprepare)
        screenshot_free();
index 44d06ba10b2b7f94ce810872f9ff7182eba84bf9..3b5b9809c6e44c77b709d1d645fe2a7bb573ffcd 100755 (executable)
@@ -39,8 +39,8 @@
 #define ADJUST_SIZE 30
 #define EXP 2.1
 
-#define ADJUST_VSSIZE 10
-#define EXPVS 1.3
+#define ADJUST_VSSIZE 15
+#define EXPVS 1.7
 
 int sound_debug = 0;
 int sound_mode_skip = 0;
@@ -115,7 +115,7 @@ static void cleardsbuffer (void)
        IDirectSoundBuffer_Restore (lpDSBsecondary);
        hr = IDirectSoundBuffer_Lock (lpDSBsecondary, 0, dsoundbuf, &buffer, &size, NULL, NULL, 0);
     }
-    if (FAILED(hr)) {
+    if (FAILED (hr)) {
        write_log ("SOUND: failed to Lock sound buffer (clear): %s\n", DXError (hr));
        return;
     }
@@ -129,11 +129,11 @@ static void pause_audio_ds (void)
 
     waiting_for_buffer = 0;
     hr = IDirectSoundBuffer_Stop (lpDSBsecondary);
-    if (FAILED(hr))
+    if (FAILED (hr))
        write_log ("SOUND: DirectSoundBuffer_Stop failed, %s\n", DXError(hr));
     hr = IDirectSoundBuffer_SetCurrentPosition (lpDSBsecondary, 0);
-    if (FAILED(hr))
-       write_log ("SOUND: DirectSoundBuffer_SetCurretPosition failed, %s\n", DXError(hr));
+    if (FAILED (hr))
+       write_log ("SOUND: DirectSoundBuffer_SetCurretPosition failed, %s\n", DXError (hr));
     cleardsbuffer ();
 }
 
@@ -200,7 +200,7 @@ void set_volume (int volume, int mute)
     if (volume < 100 && !mute)
        vol = (LONG)((DSBVOLUME_MIN / 2) + (-DSBVOLUME_MIN / 2) * log (1 + (2.718281828 - 1) * (1 - volume / 100.0)));
     hr = IDirectSoundBuffer_SetVolume (lpDSBsecondary, vol);
-    if (FAILED(hr))
+    if (FAILED (hr))
        write_log ("SOUND: SetVolume(%d) failed: %s\n", vol, DXError (hr));
     setvolume_ahi (vol);
 }
@@ -239,7 +239,7 @@ static void fillsupportedmodes (int freq)
     supportedmodes[0].ksmode = 0;
     supportedmodes[1].ch = 2;
     supportedmodes[1].ksmode = 0;
-    if (FAILED(IDirectSound8_GetSpeakerConfig(lpDS, &speakerconfig)))
+    if (FAILED (IDirectSound8_GetSpeakerConfig (lpDS, &speakerconfig)))
        speakerconfig = DSSPEAKER_STEREO;
 
     memset (&wavfmt, 0, sizeof (WAVEFORMATEXTENSIBLE));
@@ -277,9 +277,9 @@ static void fillsupportedmodes (int freq)
            sound_buffer.dwFlags = DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_GLOBALFOCUS;
            sound_buffer.dwFlags |= DSBCAPS_CTRLVOLUME;
            sound_buffer.guid3DAlgorithm = GUID_NULL;
-           hr = IDirectSound_CreateSoundBuffer(lpDS, &sound_buffer, &pdsb, NULL);
-           if (SUCCEEDED(hr)) {
-               IDirectSound_Release(pdsb);
+           hr = IDirectSound_CreateSoundBuffer (lpDS, &sound_buffer, &pdsb, NULL);
+           if (SUCCEEDED (hr)) {
+               IDirectSound_Release (pdsb);
                supportedmodes[mode].ksmode = rn[round];
                supportedmodes[mode].ch = ch;
                mode++;
@@ -326,13 +326,13 @@ static int open_audio_ds (int size)
     recalc_offsets();
 
     hr = DirectSoundCreate8 (&sound_device_guid[currprefs.win32_soundcard], &lpDS, NULL);
-    if (FAILED(hr))  {
+    if (FAILED (hr))  {
        write_log ("SOUND: DirectSoundCreate8() failure: %s\n", DXError (hr));
        return 0;
     }
 
     hr = IDirectSound_SetCooperativeLevel (lpDS, hMainWnd, DSSCL_PRIORITY);
-    if (FAILED(hr)) {
+    if (FAILED (hr)) {
        write_log ("SOUND: Can't set cooperativelevel: %s\n", DXError (hr));
        goto error;
     }
@@ -399,14 +399,14 @@ static int open_audio_ds (int size)
        sound_buffer.dwFlags |= DSBCAPS_CTRLVOLUME | (ch >= 4 ? DSBCAPS_LOCHARDWARE : DSBCAPS_LOCSOFTWARE);
        sound_buffer.guid3DAlgorithm = GUID_NULL;
 
-       hr = IDirectSound_CreateSoundBuffer(lpDS, &sound_buffer, &pdsb, NULL);
-       if (SUCCEEDED(hr))
+       hr = IDirectSound_CreateSoundBuffer (lpDS, &sound_buffer, &pdsb, NULL);
+       if (SUCCEEDED (hr))
            break;
        if (sound_buffer.dwFlags & DSBCAPS_LOCHARDWARE) {
            HRESULT hr2 = hr;
            sound_buffer.dwFlags &= ~DSBCAPS_LOCHARDWARE;
            sound_buffer.dwFlags |=  DSBCAPS_LOCSOFTWARE;
-           hr = IDirectSound_CreateSoundBuffer(lpDS, &sound_buffer, &pdsb, NULL);
+           hr = IDirectSound_CreateSoundBuffer (lpDS, &sound_buffer, &pdsb, NULL);
            if (SUCCEEDED(hr)) {
                write_log ("SOUND: Couldn't use hardware buffer (switched to software): %s\n", DXError (hr2));
                break;
@@ -417,12 +417,12 @@ static int open_audio_ds (int size)
 
     if (pdsb == NULL)
        goto error;
-    hr = IDirectSound_QueryInterface(pdsb, &IID_IDirectSoundBuffer8, (LPVOID*)&lpDSBsecondary);
-    if (FAILED(hr))  {
+    hr = IDirectSound_QueryInterface (pdsb, &IID_IDirectSoundBuffer8, (LPVOID*)&lpDSBsecondary);
+    if (FAILED (hr))  {
        write_log ("SOUND: Secondary QueryInterface() failure: %s\n", DXError (hr));
        goto error;
     }
-    IDirectSound_Release(pdsb);
+    IDirectSound_Release (pdsb);
 
     set_volume (currprefs.sound_volume, mute);
     cleardsbuffer ();
@@ -430,7 +430,7 @@ static int open_audio_ds (int size)
     if (get_audio_amigachannels() == 4)
        sample_handler = sample16ss_handler;
     else
-       sample_handler = get_audio_ismono() ? sample16_handler : sample16s_handler;
+       sample_handler = get_audio_ismono () ? sample16_handler : sample16s_handler;
 
     obtainedfreq = currprefs.sound_freq;
 
@@ -509,7 +509,7 @@ void pause_sound (void)
     if (!have_sound)
        return;
     pause_audio_ds ();
-    cleardsbuffer();
+    cleardsbuffer ();
 }
 
 void resume_sound (void)
@@ -545,7 +545,7 @@ void sound_setadjust (double v)
     double mult;
 
     mult = (1000.0 + v);
-    if ((currprefs.gfx_avsync && currprefs.gfx_afullscreen) || (avioutput_audio && !compiled_code)) {
+    if (isvsync () || (avioutput_audio && !compiled_code)) {
        vsynctime = vsynctime_orig;
        scaled_sample_evtime = (long)(((double)scaled_sample_evtime_orig) * mult / 1000.0);
     } else if (compiled_code || currprefs.m68k_speed != 0) {
@@ -571,8 +571,8 @@ void restart_sound_buffer (void)
     if (waiting_for_buffer != -1)
        return;
     hr = IDirectSoundBuffer_GetCurrentPosition (lpDSBsecondary, &playpos, &safed);
-    if (FAILED(hr)) {
-       write_log ("SOUND: DirectSoundBuffer_GetCurrentPosition failed, %s\n", DXError(hr));
+    if (FAILED (hr)) {
+       write_log ("SOUND: DirectSoundBuffer_GetCurrentPosition failed, %s\n", DXError (hr));
        return;
     }
     writepos = playpos + snd_writeoffset;
@@ -608,14 +608,14 @@ static void finish_sound_buffer_ds (void)
 
     if (waiting_for_buffer == 1) {
        hr = IDirectSoundBuffer_Play (lpDSBsecondary, 0, 0, DSBPLAY_LOOPING);
-       if (FAILED(hr)) {
+       if (FAILED (hr)) {
            write_log ("SOUND: Play failed: %s\n", DXError (hr));
            restore (DSERR_BUFFERLOST);
            waiting_for_buffer = 0;
            return;
        }
        hr = IDirectSoundBuffer_SetCurrentPosition (lpDSBsecondary, 0);
-       if (FAILED(hr)) {
+       if (FAILED (hr)) {
            write_log ("SOUND: 1st SetCurrentPosition failed: %s\n", DXError (hr));
            restore (DSERR_BUFFERLOST);
            waiting_for_buffer = 0;
@@ -627,7 +627,7 @@ static void finish_sound_buffer_ds (void)
            hr = IDirectSoundBuffer_GetCurrentPosition (lpDSBsecondary, &playpos, &safedist);
            if (playpos > 0)
                break;
-           sleep_millis(1);
+           sleep_millis (1);
            counter--;
            if (counter < 0) {
                write_log ("SOUND: stuck?!?!\n");
@@ -635,11 +635,11 @@ static void finish_sound_buffer_ds (void)
            }
        }
        write_log ("SOUND: %d = (%d - %d)\n", safedist - playpos, safedist, playpos);
-       recalc_offsets();
+       recalc_offsets ();
        safedist -= playpos;
        if (safedist < 64)
            safedist = 64;
-       cf(safedist);
+       cf (safedist);
 #if 0
        snd_totalmaxoffset_uf += safedist;
        cf (snd_totalmaxoffset_uf);
@@ -651,7 +651,7 @@ static void finish_sound_buffer_ds (void)
        cf (snd_writeoffset);
 #endif
        waiting_for_buffer = -1;
-       restart_sound_buffer();
+       restart_sound_buffer ();
        write_log ("SOUND: bs=%d w=%d max=%d tof=%d tuf=%d\n",
            sndbufsize, snd_writeoffset,
            snd_maxoffset, snd_totalmaxoffset_of, snd_totalmaxoffset_uf);
@@ -661,8 +661,8 @@ static void finish_sound_buffer_ds (void)
 
     counter = 5000;
     hr = IDirectSoundBuffer_GetStatus (lpDSBsecondary, &status);
-    if (FAILED(hr)) {
-       write_log ("SOUND: GetStatus() failed: %s\n", DXError(hr));
+    if (FAILED (hr)) {
+       write_log ("SOUND: GetStatus() failed: %s\n", DXError (hr));
        restore (DSERR_BUFFERLOST);
        return;
     }
@@ -678,7 +678,7 @@ static void finish_sound_buffer_ds (void)
     }
     for (;;) {
        hr = IDirectSoundBuffer_GetCurrentPosition (lpDSBsecondary, &playpos, &safepos);
-       if (FAILED(hr)) {
+       if (FAILED (hr)) {
            restore (hr);
            write_log ("SOUND: GetCurrentPosition failed: %s\n", DXError (hr));
            return;
@@ -703,7 +703,7 @@ static void finish_sound_buffer_ds (void)
            if (diff > snd_totalmaxoffset_uf)
                writepos += dsoundbuf - diff;
            writepos += sndbufsize;
-           cf(writepos);
+           cf (writepos);
            diff = safedist;
            break;
        }
@@ -711,7 +711,7 @@ static void finish_sound_buffer_ds (void)
        if (diff > snd_totalmaxoffset_of) {
            gui_data.sndbuf_status = 2;
            statuscnt = SND_STATUSCNT;
-           restart_sound_buffer();
+           restart_sound_buffer ();
            diff = snd_writeoffset;
            write_log ("SOUND: underflow (%d %d)\n", diff, snd_totalmaxoffset_of);
            break;
@@ -720,7 +720,7 @@ static void finish_sound_buffer_ds (void)
        if (diff > snd_maxoffset) {
            gui_data.sndbuf_status = 1;
            statuscnt = SND_STATUSCNT;
-           sleep_millis(1);
+           sleep_millis (1);
            counter--;
            if (counter < 0) {
                write_log ("SOUND: sound system got stuck!?\n");
@@ -735,7 +735,7 @@ static void finish_sound_buffer_ds (void)
     hr = IDirectSoundBuffer_Lock (lpDSBsecondary, writepos, sndbufsize, &b1, &s1, &b2, &s2, 0);
     if (restore (hr))
        return;
-    if (FAILED(hr)) {
+    if (FAILED (hr)) {
        write_log ("SOUND: lock failed: %s (%d %d)\n", DXError (hr), writepos, sndbufsize);
        return;
     }
@@ -747,9 +747,9 @@ static void finish_sound_buffer_ds (void)
     vdiff = diff - snd_writeoffset;
     m = 100.0 * vdiff / max_sndbufsize;
 
-    if (isvsync()) {
+    if (isvsync ()) {
 
-       skipmode = pow (m < 0 ? -m : m, EXP) / 10;
+       skipmode = pow (m < 0 ? -m : m, EXP) / 8;
        if (m < 0)
            skipmode = -skipmode;
        if (skipmode < -ADJUST_VSSIZE)
@@ -780,7 +780,7 @@ static void finish_sound_buffer_ds (void)
     }
 
     writepos += sndbufsize;
-    cf(writepos);
+    cf (writepos);
 }
 
 static void channelswap (uae_s16 *sndbuffer, int len)
@@ -810,10 +810,10 @@ void finish_sound_buffer (void)
     if (turbo_emulation)
        return;
     if (currprefs.sound_stereo_swap_paula) {
-       if (get_audio_nativechannels() == 2 || get_audio_nativechannels() == 4)
-           channelswap((uae_s16*)sndbuffer, sndbufsize / 2);
+       if (get_audio_nativechannels () == 2 || get_audio_nativechannels () == 4)
+           channelswap ((uae_s16*)sndbuffer, sndbufsize / 2);
        else if (get_audio_nativechannels() == 6)
-           channelswap6((uae_s16*)sndbuffer, sndbufsize / 2);
+           channelswap6 ((uae_s16*)sndbuffer, sndbufsize / 2);
     }
 #ifdef DRIVESOUND
     driveclick_mix ((uae_s16*)sndbuffer, sndbufsize / 2);
@@ -869,7 +869,7 @@ const static GUID XIID_IMMDeviceEnumerator = {0xA95664D2,0x9614,0x4F35,
 const static GUID XIID_IAudioEndpointVolume = {0x5CDF2C82, 0x841E,0x4546,
     {0x97,0x22,0x0C,0xF7,0x40,0x78,0x22,0x9A}};
 
-static int setget_master_volume_vista(int setvolume, int *volume, int *mute)
+static int setget_master_volume_vista (int setvolume, int *volume, int *mute)
 {
     IMMDeviceEnumerator *deviceEnumerator = NULL;
     IMMDevice *defaultDevice = NULL;
@@ -877,37 +877,37 @@ static int setget_master_volume_vista(int setvolume, int *volume, int *mute)
     HRESULT hr;
     int ok = 0;
 
-    hr = CoInitialize(NULL);
-    if (FAILED(hr))
+    hr = CoInitialize (NULL);
+    if (FAILED (hr))
        return 0;
-    hr = CoCreateInstance(&XIID_MMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER, &XIID_IMMDeviceEnumerator, (LPVOID *)&deviceEnumerator);
-    if (FAILED(hr))
+    hr = CoCreateInstance (&XIID_MMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER, &XIID_IMMDeviceEnumerator, (LPVOID *)&deviceEnumerator);
+    if (FAILED (hr))
        return 0;
-    hr = deviceEnumerator->lpVtbl->GetDefaultAudioEndpoint(deviceEnumerator, eRender, eConsole, &defaultDevice);
-    if (SUCCEEDED(hr)) {
-       hr = defaultDevice->lpVtbl->Activate(defaultDevice, &XIID_IAudioEndpointVolume, CLSCTX_INPROC_SERVER, NULL, (LPVOID *)&endpointVolume);
-       if (SUCCEEDED(hr)) {
+    hr = deviceEnumerator->lpVtbl->GetDefaultAudioEndpoint (deviceEnumerator, eRender, eConsole, &defaultDevice);
+    if (SUCCEEDED (hr)) {
+       hr = defaultDevice->lpVtbl->Activate (defaultDevice, &XIID_IAudioEndpointVolume, CLSCTX_INPROC_SERVER, NULL, (LPVOID *)&endpointVolume);
+       if (SUCCEEDED (hr)) {
            if (setvolume) {
-               if (SUCCEEDED(endpointVolume->lpVtbl->SetMasterVolumeLevelScalar(endpointVolume, (float)(*volume) / (float)65535.0, NULL)))
+               if (SUCCEEDED (endpointVolume->lpVtbl->SetMasterVolumeLevelScalar (endpointVolume, (float)(*volume) / (float)65535.0, NULL)))
                    ok++;
-               if (SUCCEEDED(endpointVolume->lpVtbl->SetMute(endpointVolume, *mute, NULL)))
+               if (SUCCEEDED (endpointVolume->lpVtbl->SetMute (endpointVolume, *mute, NULL)))
                    ok++;
            } else {
                float vol;
-               if (SUCCEEDED(endpointVolume->lpVtbl->GetMasterVolumeLevelScalar(endpointVolume, &vol))) {
+               if (SUCCEEDED (endpointVolume->lpVtbl->GetMasterVolumeLevelScalar (endpointVolume, &vol))) {
                    ok++;
                    *volume = vol * 65535.0;
                }
-               if (SUCCEEDED(endpointVolume->lpVtbl->GetMute(endpointVolume, mute))) {
+               if (SUCCEEDED (endpointVolume->lpVtbl->GetMute (endpointVolume, mute))) {
                    ok++;
                }
            }
-           endpointVolume->lpVtbl->Release(endpointVolume);
+           endpointVolume->lpVtbl->Release (endpointVolume);
        }
-       defaultDevice->lpVtbl->Release(defaultDevice);
+       defaultDevice->lpVtbl->Release (defaultDevice);
     }
-    deviceEnumerator->lpVtbl->Release(deviceEnumerator);
-    CoUninitialize();
+    deviceEnumerator->lpVtbl->Release (deviceEnumerator);
+    CoUninitialize ();
     return ok == 2;
 }
 
@@ -916,13 +916,13 @@ static void mcierr(char *str, DWORD err)
     char es[1000];
     if (err == MMSYSERR_NOERROR)
        return;
-    if (mciGetErrorString(err, es, sizeof es))
+    if (mciGetErrorString (err, es, sizeof es))
        write_log ("MCIErr: %s: %d = '%s'\n", str, err, es);
     else
        write_log ("%s, errcode=%d\n", str, err);
 }
 /* from http://www.codeproject.com/audio/mixerSetControlDetails.asp */
-static int setget_master_volume_xp(int setvolume, int *volume, int *mute)
+static int setget_master_volume_xp (int setvolume, int *volume, int *mute)
 {
     MMRESULT result;
     HMIXER hMixer;
@@ -934,74 +934,74 @@ static int setget_master_volume_xp(int setvolume, int *volume, int *mute)
     MIXERCONTROLDETAILS_BOOLEAN mcb = {0};
     int ok = 0;
 
-    result = mixerOpen(&hMixer, 0, 0, 0, MIXER_OBJECTF_MIXER);
+    result = mixerOpen (&hMixer, 0, 0, 0, MIXER_OBJECTF_MIXER);
     if (result == MMSYSERR_NOERROR) {
-       ml.cbStruct = sizeof(MIXERLINE);
+       ml.cbStruct = sizeof (MIXERLINE);
        ml.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_SPEAKERS;
-       result = mixerGetLineInfo((HMIXEROBJ) hMixer, &ml, MIXER_GETLINEINFOF_COMPONENTTYPE);
+       result = mixerGetLineInfo ((HMIXEROBJ) hMixer, &ml, MIXER_GETLINEINFOF_COMPONENTTYPE);
        if (result == MIXERR_INVALLINE) {
            ml.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_DIGITAL;
-           result = mixerGetLineInfo((HMIXEROBJ) hMixer, &ml, MIXER_GETLINEINFOF_COMPONENTTYPE);
+           result = mixerGetLineInfo ((HMIXEROBJ) hMixer, &ml, MIXER_GETLINEINFOF_COMPONENTTYPE);
        }
        if (result == MMSYSERR_NOERROR) {
-           mlc.cbStruct = sizeof(MIXERLINECONTROLS);
+           mlc.cbStruct = sizeof (MIXERLINECONTROLS);
            mlc.dwLineID = ml.dwLineID;
            mlc.dwControlType = MIXERCONTROL_CONTROLTYPE_VOLUME;
            mlc.cControls = 1;
            mlc.pamxctrl = &mc;
            mlc.cbmxctrl = sizeof(MIXERCONTROL);
-           result = mixerGetLineControls((HMIXEROBJ) hMixer, &mlc, MIXER_GETLINECONTROLSF_ONEBYTYPE);
+           result = mixerGetLineControls ((HMIXEROBJ) hMixer, &mlc, MIXER_GETLINECONTROLSF_ONEBYTYPE);
            if (result == MMSYSERR_NOERROR) {
-               mcd.cbStruct = sizeof(MIXERCONTROLDETAILS);
+               mcd.cbStruct = sizeof (MIXERCONTROLDETAILS);
                mcd.hwndOwner = 0;
                mcd.dwControlID = mc.dwControlID;
                mcd.paDetails = &mcdu;
-               mcd.cbDetails = sizeof(MIXERCONTROLDETAILS_UNSIGNED);
+               mcd.cbDetails = sizeof (MIXERCONTROLDETAILS_UNSIGNED);
                mcd.cChannels = 1;
                mcdu.dwValue = 0;
                if (setvolume) {
                    mcdu.dwValue = *volume;
-                   result = mixerSetControlDetails((HMIXEROBJ) hMixer, &mcd, MIXER_SETCONTROLDETAILSF_VALUE);
+                   result = mixerSetControlDetails ((HMIXEROBJ) hMixer, &mcd, MIXER_SETCONTROLDETAILSF_VALUE);
                } else {
-                   result = mixerGetControlDetails((HMIXEROBJ) hMixer, &mcd, MIXER_GETCONTROLDETAILSF_VALUE);
+                   result = mixerGetControlDetails ((HMIXEROBJ) hMixer, &mcd, MIXER_GETCONTROLDETAILSF_VALUE);
                    *volume = mcdu.dwValue;
                }
                mlc.dwControlType = MIXERCONTROL_CONTROLTYPE_MUTE;
-               result = mixerGetLineControls((HMIXEROBJ) hMixer, &mlc, MIXER_GETLINECONTROLSF_ONEBYTYPE);
+               result = mixerGetLineControls ((HMIXEROBJ) hMixer, &mlc, MIXER_GETLINECONTROLSF_ONEBYTYPE);
                if (result == MMSYSERR_NOERROR) {
                    mcd.paDetails = &mcb;
                    mcd.dwControlID = mc.dwControlID;
                    mcb.fValue = 0;
-                   mcd.cbDetails = sizeof(MIXERCONTROLDETAILS_BOOLEAN);
+                   mcd.cbDetails = sizeof (MIXERCONTROLDETAILS_BOOLEAN);
                    if (setvolume) {
-                       mcb.fValue    = *mute;
-                       result = mixerSetControlDetails((HMIXEROBJ) hMixer, &mcd, MIXER_SETCONTROLDETAILSF_VALUE);
+                       mcb.fValue = *mute;
+                       result = mixerSetControlDetails ((HMIXEROBJ) hMixer, &mcd, MIXER_SETCONTROLDETAILSF_VALUE);
                    } else {
-                       result = mixerGetControlDetails((HMIXEROBJ) hMixer, &mcd, MIXER_GETCONTROLDETAILSF_VALUE);
+                       result = mixerGetControlDetails ((HMIXEROBJ) hMixer, &mcd, MIXER_GETCONTROLDETAILSF_VALUE);
                        *mute = mcb.fValue;
                    }
                    if (result == MMSYSERR_NOERROR)
                        ok = 1;
                } else
-                   mcierr("mixerGetLineControls Mute", result);
+                   mcierr ("mixerGetLineControls Mute", result);
            } else
-               mcierr("mixerGetLineControls Volume", result);
+               mcierr ("mixerGetLineControls Volume", result);
        } else
-           mcierr("mixerGetLineInfo", result);
-       mixerClose(hMixer);
+           mcierr ("mixerGetLineInfo", result);
+       mixerClose (hMixer);
     } else
-       mcierr("mixerOpen", result);
+       mcierr ("mixerOpen", result);
     return ok;
 }
 
-static int set_master_volume(int volume, int mute)
+static int set_master_volume (int volume, int mute)
 {
     if (os_vista)
        return setget_master_volume_vista (1, &volume, &mute);
     else
        return setget_master_volume_xp (1, &volume, &mute);
 }
-static int get_master_volume(int *volume, int *mute)
+static int get_master_volume (int *volume, int *mute)
 {
     *volume = 0;
     *mute = 0;
index 595535d6f213e4b2f9f851e5b99f24d66c317ad3..beaaefba9233ce0dea13ad556740ef534fdbf5f4 100755 (executable)
@@ -319,9 +319,15 @@ void setpriority (struct threadpriorities *pri)
 
 void setmouseactive (int active)
 {
-
+    if (showcursor && active == 0) {
+       ClipCursor (NULL);
+       ReleaseCapture();
+       ShowCursor (TRUE);
+       showcursor = 0;
+    }
     if (mouseactive == active && active >= 0)
        return;
+
     if (active < 0)
        active = 1;
     mouseactive = active;
@@ -329,7 +335,7 @@ void setmouseactive (int active)
     mouseposx = mouseposy = 0;
     write_log ("setmouseactive(%d)\n", active);
     if (showcursor) {
-       ClipCursor(NULL);
+       ClipCursor (NULL);
        ReleaseCapture();
        ShowCursor (TRUE);
        showcursor = 0;
@@ -350,15 +356,18 @@ void setmouseactive (int active)
        HWND fw = GetForegroundWindow ();
        HWND w1 = hAmigaWnd;
        HWND w2 = hMainWnd;
+       HWND w3 = NULL;
 #ifdef RETROPLATFORM
        if (rp_isactive ())
-           w2 = rp_getparent ();
+           w3 = rp_getparent ();
 #endif
        if (!(fw == w1 || fw == w2)) {
            if (SetForegroundWindow (w2) == FALSE) {
                if (SetForegroundWindow (w1) == FALSE) {
-                   donotfocus = 1;
-                   write_log ("wanted focus but SetforegroundWindow() failed\n");
+                   if (w3 == NULL || SetForegroundWindow (w3) == FALSE) {
+                       donotfocus = 1;
+                       write_log ("wanted focus but SetforegroundWindow() failed\n");
+                   }
                }
            }
        }
@@ -417,7 +426,7 @@ static void winuae_active (HWND hWnd, int minimized)
     if (emulation_paused > 0)
        emulation_paused = -1;
     if (sound_closed) {
-       resumepaused();
+       resumepaused ();
        sound_closed = 0;
     }
     if (WIN32GFX_IsPicassoScreen ())
@@ -460,13 +469,13 @@ static void winuae_inactive (HWND hWnd, int minimized)
            }
            if (currprefs.win32_iconified_pause) {
                if (!sound_closed)
-                   setpaused();
+                   setpaused ();
                emulation_paused = 1;
                sound_closed = 1;
            }
        } else {
            if (currprefs.win32_inactive_nosound) {
-               setpaused();
+               setpaused ();
                sound_closed = 1;
            }
        }
@@ -2633,9 +2642,9 @@ static void getstartpaths(void)
     if (start_data == 0) {
        start_data = 1;
        if (path_type == 0 && xstart_path_uae[0]) {
-           strcpy(start_path_data, xstart_path_uae);
+           strcpy (start_path_data, xstart_path_uae);
        } else if (path_type == PATH_TYPE_OLDAF && af_path_old && xstart_path_old[0]) {
-           strcpy(start_path_data, xstart_path_old);
+           strcpy (start_path_data, xstart_path_old);
        } else if (path_type == PATH_TYPE_NEWWINUAE && xstart_path_new1[0]) {
            strcpy (start_path_data, xstart_path_new1);
            create_afnewdir(0);
@@ -2646,38 +2655,41 @@ static void getstartpaths(void)
            strcpy (start_path_data, xstart_path_new2);
        } else if (path_type < 0) {
            path_type = 0;
-           strcpy(start_path_data, xstart_path_uae);
+           strcpy (start_path_data, xstart_path_uae);
            if (af_path_old) {
                path_type = PATH_TYPE_OLDAF;
-               strcpy(start_path_data, xstart_path_old);
+               strcpy (start_path_data, xstart_path_old);
            }
            if (af_path_2005 & 1) {
                path_type = PATH_TYPE_NEWAF;
-               create_afnewdir(1);
-               strcpy(start_path_data, xstart_path_new1);
+               create_afnewdir (1);
+               strcpy (start_path_data, xstart_path_new1);
            }
            if (af_path_2005 & 2) {
-               strcpy(tmp, xstart_path_new2);
-               strcat(tmp, "system\\rom");
+               strcpy (tmp, xstart_path_new2);
+               strcat (tmp, "system\\rom");
                if (isfilesindir(tmp))
                    path_type = PATH_TYPE_AMIGAFOREVERDATA;
                else
                    path_type = PATH_TYPE_NEWWINUAE;
-               strcpy(start_path_data, xstart_path_new2);
+               strcpy (start_path_data, xstart_path_new2);
            }
        }
     }
 
-    v = GetFileAttributes(start_path_data);
+    v = GetFileAttributes (start_path_data);
     if (v == INVALID_FILE_ATTRIBUTES || !(v & FILE_ATTRIBUTE_DIRECTORY) || start_data == 0 || start_data == -2) {
-       strcpy(start_path_data, start_path_exe);
+       strcpy (start_path_data, start_path_exe);
     }
-    fixtrailing(start_path_data);
+    fixtrailing (start_path_data);
+    GetFullPathName (start_path_data, sizeof tmp, tmp, NULL);
+    strcpy (start_path_data, tmp);
+    SetCurrentDirectory (start_path_data);
 }
 
 extern void test (void);
 extern int screenshotmode, postscript_print_debugging, sound_debug, log_uaeserial;
-extern int force_direct_catweasel, sound_mode_skip;
+extern int force_direct_catweasel, sound_mode_skip, maxmem;
 
 extern DWORD_PTR cpu_affinity, cpu_paffinity;
 static DWORD_PTR original_affinity = -1;
@@ -2820,6 +2832,11 @@ static int process_arg(char **xargv)
                start_data = -1;
                continue;
            }
+           if (!strcmp (arg, "-maxmem")) {
+               i++;
+               maxmem = getval (np);
+               continue;
+           }
            if (!strcmp (arg, "-soundmodeskip")) {
                i++;
                sound_mode_skip = getval (np);
@@ -2908,9 +2925,8 @@ static int PASCAL WinMain2 (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
     argc = process_arg(argv);
 
     reginitializeinit (inipath);
-    getstartpaths();
-    makeverstr(VersionStr);
-    SetCurrentDirectory (start_path_data);
+    getstartpaths ();
+    makeverstr (VersionStr);
 
     logging_init ();
     write_log ("params:\n");
index fe9ff2cd20066a0ebd4ce7cd72ab2f6867a6df14..4c192f4c6a7eef7a79cddf5d1106e3bfc7414bd3 100755 (executable)
@@ -15,9 +15,9 @@
 #define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
 #define GETBDD(x) ((x) % 100)
 
-#define WINUAEBETA 13
+#define WINUAEBETA 14
 #define WINUAEPUBLICBETA 1
-#define WINUAEDATE MAKEBD(2008, 4, 20)
+#define WINUAEDATE MAKEBD(2008, 5, 1)
 #define WINUAEEXTRA ""
 #define WINUAEREV ""
 
index 54bc8c20a0671c9033465705287f32d9f38fab14..09b84028b1982bbe5d5603b3c98db7ad9bc429b8 100755 (executable)
 
 struct uae_filter uaefilters[] =
 {
-    { UAE_FILTER_NULL, 0, "Null filter", "null", 0, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_32_32, 0, 0, 0 },
+    { UAE_FILTER_NULL, 0, 1, "Null filter", "null", 0, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_32_32, 0, 0, 0 },
 
-    { UAE_FILTER_DIRECT3D, 0, "Direct3D", "direct3d", 1, 0, 0, 0, 0 },
+    { UAE_FILTER_DIRECT3D, 0, 1, "Direct3D", "direct3d", 1, 0, 0, 0, 0 },
 
-    { UAE_FILTER_OPENGL, 0, "OpenGL", "opengl", 1, 0, 0, 0, 0 },
+    { UAE_FILTER_OPENGL, 0, 1, "OpenGL", "opengl", 1, 0, 0, 0, 0 },
 
-    { UAE_FILTER_SCALE2X, 0, "Scale2X", "scale2x", 0, 0, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_32_32, 0, 0 },
+    { UAE_FILTER_SCALE2X, 0, 2, "Scale2X", "scale2x", 0, 0, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_32_32, 0, 0 },
 
-    { UAE_FILTER_HQ, 0, "hq2x/3x/4x", "hqx", 0, 0, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32 },
+    { UAE_FILTER_HQ, 0, 2, "hq2x/3x/4x", "hqx", 0, 0, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32 },
 
-    { UAE_FILTER_SUPEREAGLE, 0, "SuperEagle", "supereagle", 0, 0, UAE_FILTER_MODE_16_16, 0, 0 },
+    { UAE_FILTER_SUPEREAGLE, 0, 2, "SuperEagle", "supereagle", 0, 0, UAE_FILTER_MODE_16_16, 0, 0 },
 
-    { UAE_FILTER_SUPER2XSAI, 0, "Super2xSaI", "super2xsai", 0, 0, UAE_FILTER_MODE_16_16, 0, 0 },
+    { UAE_FILTER_SUPER2XSAI, 0, 2, "Super2xSaI", "super2xsai", 0, 0, UAE_FILTER_MODE_16_16, 0, 0 },
 
-    { UAE_FILTER_2XSAI, 0, "2xSaI", "2xsai", 0, 0, UAE_FILTER_MODE_16_16, 0, 0 },
+    { UAE_FILTER_2XSAI, 0, 2, "2xSaI", "2xsai", 0, 0, UAE_FILTER_MODE_16_16, 0, 0 },
 
-    { UAE_FILTER_PAL, 1, "PAL", "pal", 0, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_32_32, 0, 0, 0 },
+    { UAE_FILTER_PAL, 1, 1, "PAL", "pal", 0, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_32_32, 0, 0, 0 },
 
     { 0 }
 };
index 32c3cc94b14eca316029f309632b36db597d312e..b49576a3e81c18f4ec56b16a3cc8f09eeb4d572e 100755 (executable)
@@ -492,12 +492,12 @@ void sortdisplays (void)
        DisplayModes[0].depth = -1;
        md1->disabled = 1;
        if (DirectDraw_Start (md1->primary ? NULL : &md1->guid)) {
-           if (SUCCEEDED(DirectDraw_GetDisplayMode())) {
+           if (SUCCEEDED (DirectDraw_GetDisplayMode ())) {
                int w = DirectDraw_CurrentWidth ();
                int h = DirectDraw_CurrentHeight ();
                int b = DirectDraw_GetCurrentDepth ();
                write_log ("Desktop: W=%d H=%d B=%d. CXVS=%d CYVS=%d\n", w, h, b,
-                   GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN));
+                   GetSystemMetrics (SM_CXVIRTUALSCREEN), GetSystemMetrics (SM_CYVIRTUALSCREEN));
                DirectDraw_EnumDisplayModes (DDEDM_REFRESHRATES , modesCallback);
                //dhack();
                sortmodes ();
@@ -814,7 +814,7 @@ static int open_windows (void)
        return ret;
     }
 
-    setpriority(&priorities[currprefs.win32_active_priority]);
+    setpriority (&priorities[currprefs.win32_active_priority]);
     if (!rp_isactive ())
        setmouseactive (-1);
     for (i = 0; i < NUM_LEDS; i++)
@@ -872,7 +872,7 @@ int check_prefs_changed_gfx (void)
 
     if (display_change_requested || c)
     {
-       cfgfile_configuration_change(1);
+       cfgfile_configuration_change (1);
        if (display_change_requested)
            c |= 2;
        display_change_requested = 0;
@@ -959,9 +959,9 @@ int check_prefs_changed_gfx (void)
     if (currprefs.win32_logfile != changed_prefs.win32_logfile) {
        currprefs.win32_logfile = changed_prefs.win32_logfile;
        if (currprefs.win32_logfile)
-           logging_open(0, 1);
+           logging_open (0, 1);
        else
-           logging_cleanup();
+           logging_cleanup ();
     }
 
     if (currprefs.leds_on_screen != changed_prefs.leds_on_screen ||
@@ -1261,6 +1261,7 @@ static int modeswitchneeded (struct winuae_currentmode *wc)
 {
     scalepicasso = 0;
     if (isfullscreen () > 0) {
+       /* fullscreen to fullscreen */
        if (screen_is_picasso) {
            if (picasso96_state.BytesPerPixel * 8 != wc->current_depth && currprefs.win32_rtgmatchdepth)
                return -1;
@@ -1272,7 +1273,11 @@ static int modeswitchneeded (struct winuae_currentmode *wc)
            }
            if (picasso96_state.Width != wc->current_width ||
                picasso96_state.Height != wc->current_height)
-               return -1;
+               return 1;
+           if (picasso96_state.Width == wc->current_width &&
+               picasso96_state.Height == wc->current_height &&
+               picasso96_state.BytesPerPixel * 8 == wc->current_depth)
+               return 0;
            return 1;
        } else {
            if (currentmode->current_width != wc->current_width ||
@@ -1281,6 +1286,7 @@ static int modeswitchneeded (struct winuae_currentmode *wc)
                return -1;
        }
     } else if (isfullscreen () == 0) {
+       /* windowed to windowed */
        if (screen_is_picasso) {
            if (picasso96_state.Width < wc->current_width && picasso96_state.Height < wc->current_height) {
                if (currprefs.win32_rtgscaleifsmall) {
@@ -1297,6 +1303,7 @@ static int modeswitchneeded (struct winuae_currentmode *wc)
                return 1;
        }
     } else {
+       /* fullwindow to fullwindow */
        if (currprefs.win32_rtgscaleifsmall) {
            scalepicasso = 1;
            return 0;
@@ -1543,6 +1550,8 @@ static int getbestmode (int nextbest)
                pr->res.width, pr->res.height);
            currentmode->native_width = pr->res.width;
            currentmode->native_height = pr->res.height;
+           currentmode->current_width = currentmode->native_width;
+           currentmode->current_height = currentmode->native_height;
            return 1;
        }
     }
@@ -1656,18 +1665,18 @@ static int create_windows_2 (void)
     if (rp_isactive ()) {
        HWND parent = rp_getparent ();
        hAmigaWnd = CreateWindowEx (dxfs ? WS_EX_ACCEPTFILES | WS_EX_TOPMOST : WS_EX_ACCEPTFILES | WS_EX_TOOLWINDOW | (currprefs.win32_alwaysontop ? WS_EX_TOPMOST : 0),
-                           "AmigaPowah", "WinUAE",
-                           WS_POPUP,
-                           x, y,
-                           currentmode->native_width, currentmode->native_height,
-                           parent, NULL, hInst, NULL);
+           "AmigaPowah", "WinUAE",
+           WS_POPUP,
+           x, y,
+           currentmode->native_width, currentmode->native_height,
+           parent, NULL, hInst, NULL);
     } else {
        hAmigaWnd = CreateWindowEx (dxfs ? WS_EX_ACCEPTFILES | WS_EX_TOPMOST : WS_EX_ACCEPTFILES | exstyle | (currprefs.win32_alwaysontop ? WS_EX_TOPMOST : 0),
-                           "AmigaPowah", "WinUAE",
-                           WS_CLIPCHILDREN | WS_CLIPSIBLINGS | (hMainWnd ? WS_VISIBLE | WS_CHILD : WS_VISIBLE | WS_POPUP | WS_SYSMENU | WS_MINIMIZEBOX),
-                           x, y,
-                           currentmode->native_width, currentmode->native_height,
-                           borderless ? NULL : (hMainWnd ? hMainWnd : hhWnd), NULL, hInst, NULL);
+           "AmigaPowah", "WinUAE",
+           WS_CLIPCHILDREN | WS_CLIPSIBLINGS | (hMainWnd ? WS_VISIBLE | WS_CHILD : WS_VISIBLE | WS_POPUP | WS_SYSMENU | WS_MINIMIZEBOX),
+           x, y,
+           currentmode->native_width, currentmode->native_height,
+           borderless ? NULL : (hMainWnd ? hMainWnd : hhWnd), NULL, hInst, NULL);
     }
     if (!hAmigaWnd) {
        write_log ("creation of amiga window failed\n");
@@ -1846,7 +1855,16 @@ static BOOL doInit (void)
                    if (usedfilter->x[0]) {
                        currentmode->current_depth = (currprefs.gfx_filter_filtermode / 2) ? 32 : 16;
                    } else {
-                       int j = 0, i = currprefs.gfx_filter_filtermode;
+                       int j, i;
+                       j = 0;
+                       for (i = 1; i <= 4; i++) {
+                           if (usedfilter->x[i])
+                               j++;
+                       }
+                       i = currprefs.gfx_filter_filtermode;
+                       if (i >= j)
+                           i = 0;
+                       j = 0;
                        while (i >= 0) {
                            while (!usedfilter->x[j])
                                j++;
@@ -1965,6 +1983,10 @@ static BOOL doInit (void)
     DX_SetPalette (0, 256);
 #endif
     picasso_refresh ();
+
+    if (isfullscreen () > 0)
+       setmouseactive (-1);
+
     return 1;
 
 oops:
index 08a541678cca4e12993532386382a83eabaa696f..cc85e1d0161359d03239f6d1e7ba08ada1b92636 100755 (executable)
@@ -923,7 +923,7 @@ static int scan_roms_3(void *fkey, char **paths, char *path)
     char pathp[MAX_DPATH];
 
     ret = 0;
-    GetFullPathName(path, MAX_DPATH, pathp, NULL);
+    GetFullPathName (path, MAX_DPATH, pathp, NULL);
     for (i = 0; i < MAX_ROM_PATHS; i++) {
        if (paths[i] && !strcmpi(paths[i], pathp))
            return ret;
@@ -1126,11 +1126,11 @@ void gui_display (int shortcut)
        return;
     here++;
     gui_active++;
+    setpaused ();
     screenshot_prepare ();
 #ifdef D3D
     D3D_guimode (TRUE);
 #endif
-    setpaused ();
     inputdevice_unacquire ();
     clearallkeys ();
     setmouseactive (0);
@@ -5475,7 +5475,7 @@ static INT_PTR CALLBACK KickstartDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LP
            break;
 
        case IDC_MAPROM:
-           workprefs.maprom = IsDlgButtonChecked(hDlg, IDC_MAPROM) ? 0xe00000 : 0;
+           workprefs.maprom = IsDlgButtonChecked(hDlg, IDC_MAPROM) ? 0x0f000000 : 0;
            break;
 #if 0
        case IDC_HRTMON:
@@ -5958,38 +5958,21 @@ static void enable_for_cpudlg (HWND hDlg)
     ew (hDlg, IDC_CS_CACHE_TEXT, enable);
     ew (hDlg, IDC_CACHE, enable);
     ew (hDlg, IDC_CACHETEXT, enable);
-    ew (hDlg, IDC_FORCE, enable);
     ew (hDlg, IDC_JITENABLE, cpu_based_enable);
     ew (hDlg, IDC_COMPATIBLE, !workprefs.cpu_cycle_exact && !workprefs.cachesize);
     ew (hDlg, IDC_COMPATIBLE_FPU, workprefs.fpu_model > 0);
 
     fpu = TRUE;
-    if (workprefs.cpu_model < 68020 || workprefs.cpu_model > 68030)
+    if (workprefs.cpu_model > 68030 || workprefs.cpu_compatible || workprefs.cpu_cycle_exact)
        fpu = FALSE;
     ew (hDlg, IDC_FPU1, fpu);
     ew (hDlg, IDC_FPU2, fpu);
     ew (hDlg, IDC_FPU3, workprefs.cpu_model >= 68040);
-
-#ifdef JIT
-    if(enable) {
-       if (!canbang) {
-           workprefs.compforcesettings = TRUE;
-           workprefs.comptrustbyte = 1;
-           workprefs.comptrustword = 1;
-           workprefs.comptrustlong = 1;
-           workprefs.comptrustnaddr= 1;
-       }
-    } else {
-       workprefs.cachesize = 0; // Disable JIT
-    }
-#endif
 }
 
 static void values_to_cpudlg (HWND hDlg)
 {
     char cache[8] = "";
-    BOOL enable = FALSE;
-    BOOL cpu_based_enable = FALSE;
     int cpu;
 
     SendDlgItemMessage (hDlg, IDC_SPEED, TBM_SETPOS, TRUE, workprefs.m68k_speed <= 0 ? 1 : workprefs.m68k_speed / CYCLE_UNIT );
@@ -6011,40 +5994,12 @@ static void values_to_cpudlg (HWND hDlg)
     else
        CheckRadioButton(hDlg, IDC_CS_HOST, IDC_CS_ADJUSTABLE, IDC_CS_ADJUSTABLE);
 
-    cpu_based_enable = (workprefs.cpu_model >= 68020) && (workprefs.address_space_24 == 0);
-
-    enable = cpu_based_enable && workprefs.cachesize;
-
-#ifdef JIT
-    if(enable) {
-       if (!canbang || !candirect) {
-           workprefs.compforcesettings = TRUE;
-           workprefs.comptrustbyte = 1;
-           workprefs.comptrustword = 1;
-           workprefs.comptrustlong = 1;
-           workprefs.comptrustnaddr = 1;
-       }
-    } else {
-#endif
-       workprefs.cachesize = 0; // Disable JIT
-#ifdef JIT
-    }
-#endif
-
-    if (!workprefs.compforcesettings) {
-       workprefs.comptrustbyte = 0;
-       workprefs.comptrustword = 0;
-       workprefs.comptrustlong = 0;
-       workprefs.comptrustnaddr= 0;
-    }
-
     CheckRadioButton (hDlg, IDC_TRUST0, IDC_TRUST1, trust_ids[workprefs.comptrustbyte]);
 
     SendDlgItemMessage (hDlg, IDC_CACHE, TBM_SETPOS, TRUE, workprefs.cachesize / 1024);
     sprintf (cache, "%d MB", workprefs.cachesize / 1024 );
     SetDlgItemText (hDlg, IDC_CACHETEXT, cache);
 
-    CheckDlgButton (hDlg, IDC_FORCE, workprefs.compforcesettings);
     CheckDlgButton (hDlg, IDC_NOFLAGS, workprefs.compnf);
     CheckDlgButton (hDlg, IDC_JITFPU, workprefs.compfpu);
     CheckDlgButton (hDlg, IDC_HARDFLUSH, workprefs.comp_hardflush);
@@ -6055,7 +6010,7 @@ static void values_to_cpudlg (HWND hDlg)
 static void values_from_cpudlg (HWND hDlg)
 {
     int newcpu, newfpu, newtrust, oldcache, jitena;
-    static int cachesize_prev, comptrust_prev, compforce_prev;
+    static int cachesize_prev, trust_prev;
 
     workprefs.cpu_compatible = workprefs.cpu_cycle_exact | (IsDlgButtonChecked (hDlg, IDC_COMPATIBLE) ? 1 : 0);
     workprefs.fpu_strict = IsDlgButtonChecked (hDlg, IDC_COMPATIBLE_FPU) ? 1 : 0;
@@ -6081,7 +6036,9 @@ static void values_from_cpudlg (HWND hDlg)
     {
        case 68000:
        case 68010:
-           workprefs.fpu_model = 0;
+           workprefs.fpu_model = newfpu == 0 ? 0 : (newfpu == 2 ? 68882 : 68881);
+           if (workprefs.cpu_compatible || workprefs.cpu_cycle_exact)
+               workprefs.fpu_model = 0;
            workprefs.address_space_24 = 1;
            if (newcpu == 0 && workprefs.cpu_cycle_exact)
                workprefs.m68k_speed = 0;
@@ -6104,14 +6061,13 @@ static void values_from_cpudlg (HWND hDlg)
            workprefs.address_space_24 = 0;
        break;
     }
-    newtrust = (IsDlgButtonChecked (hDlg, IDC_TRUST0) ? 0
-       : IsDlgButtonChecked (hDlg, IDC_TRUST1) ? 1 : 3);
+
+    newtrust = IsDlgButtonChecked (hDlg, IDC_TRUST0) ? 0 : 1;
     workprefs.comptrustbyte = newtrust;
     workprefs.comptrustword = newtrust;
     workprefs.comptrustlong = newtrust;
     workprefs.comptrustnaddr= newtrust;
 
-    workprefs.compforcesettings = IsDlgButtonChecked (hDlg, IDC_FORCE);
     workprefs.compnf            = IsDlgButtonChecked (hDlg, IDC_NOFLAGS);
     workprefs.compfpu           = IsDlgButtonChecked (hDlg, IDC_JITFPU);
     workprefs.comp_hardflush    = IsDlgButtonChecked (hDlg, IDC_HARDFLUSH);
@@ -6123,25 +6079,20 @@ static void values_from_cpudlg (HWND hDlg)
     workprefs.cachesize = SendMessage (GetDlgItem(hDlg, IDC_CACHE), TBM_GETPOS, 0, 0) * 1024;
     if (!jitena) {
        cachesize_prev = workprefs.cachesize;
-       comptrust_prev = workprefs.comptrustbyte;
-       compforce_prev = workprefs.compforcesettings;
+       trust_prev = workprefs.comptrustbyte;
        workprefs.cachesize = 0;
     } else if (jitena && !oldcache) {
        workprefs.cachesize = 8192;
        if (cachesize_prev) {
            workprefs.cachesize = cachesize_prev;
-           workprefs.comptrustbyte = comptrust_prev;
-           workprefs.comptrustword = comptrust_prev;
-           workprefs.comptrustlong = comptrust_prev;
-           workprefs.comptrustnaddr = comptrust_prev;
-           workprefs.compforcesettings = compforce_prev;
+           workprefs.comptrustbyte = trust_prev;
+           workprefs.comptrustword = trust_prev;
+           workprefs.comptrustlong = trust_prev;
+           workprefs.comptrustnaddr = trust_prev;
        }
     }
-    if (oldcache == 0 && workprefs.cachesize > 0)
+    if (oldcache == 0 && candirect && workprefs.cachesize > 0)
        canbang = 1;
-    if (!candirect)
-       canbang = 0;
-
 #endif
     workprefs.cpu_idle = SendMessage (GetDlgItem (hDlg, IDC_CPUIDLE), TBM_GETPOS, 0, 0);
     if (workprefs.cpu_idle > 0)
@@ -6256,10 +6207,14 @@ static void sound_loaddrivesamples (void)
 
     free (drivesounds);
     p = drivesounds = 0;
-    sprintf (dirname, "%s\\uae_data\\*.wav", start_path_data);
+    sprintf (dirname, "%s\\%sfloppysounds\\*.wav", start_path_data, WIN32_PLUGINDIR);
     h = FindFirstFile (dirname, &fd);
-    if (h == INVALID_HANDLE_VALUE)
-       return;
+    if (h == INVALID_HANDLE_VALUE) {
+       sprintf (dirname, "%s\\uae_data\\*.wav", start_path_data);
+        h = FindFirstFile (dirname, &fd);
+        if (h == INVALID_HANDLE_VALUE)
+           return;
+    }
     for (;;) {
        if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
            char *name = fd.cFileName;
@@ -8617,7 +8572,7 @@ static void values_to_portsdlg (HWND hDlg)
        if(result < 0 && workprefs.sername[0]) {
            // Warn the user that their COM-port selection is not valid on this machine
            char szMessage[MAX_DPATH];
-           WIN32GUI_LoadUIString(IDS_INVALIDCOMPORT, szMessage, MAX_DPATH);
+           WIN32GUI_LoadUIString (IDS_INVALIDCOMPORT, szMessage, MAX_DPATH);
            pre_gui_message (szMessage);
            // Select "none" as the COM-port
            SendDlgItemMessage(hDlg, IDC_SERIAL, CB_SETCURSEL, 0L, 0L);
index 5f8414aa9569c7f0a61373e51948aa52f648c8a9..e3b5fb8c0c4d29fc1e912220310c906ee936fe6c 100755 (executable)
@@ -1,4 +1,35 @@
 
+Beta 14:
+
+- fixed IDE emulation crash
+- uae-configuration problems with some config entries
+- pointless feature: 68881/68882 available in 68000/68010 modes
+  (cycle-exact or more compatible not allowed at the same time)
+- warp-mode didn't work in fullscreen mode if display refresh rate was
+  set to "default"
+- restoring statefile that includes one or more directory harddrives or
+  uaehf.device hardfiles didn't restore uae boot rom properly
+- some vsync tuning
+- pause sound immediately when entering GUI
+- maprom "shadow" ram moved to 0x0f000000 (no more conflicts with
+  extended ROMs or incompatible Cloanto Kickstart ROMs)
+- hardfile state restore freeze fix (Picasso96 statefile support not
+  yet updated)
+- Picasso96 hardware sprite DirectDraw surface is now allocated only
+  once (instead of dynamically re-creating when shape changed)
+- gfx garbage in mixed non-interlaced and interlaced modes should be
+  finally fixed (maybe. for example Pinball Illusions scoreboard in
+  hires-mode)
+- totally broken interlaced doublescan modes fixed
+ - "The Diagnostic 2.0" by Logica (Amiga diagnostic replacement ROM)
+  keyboard detection fixed. Checksums added to ROM scanner.
+- do not send initiate and terminate power-up key codes after
+  restoring statefile
+- floppy sounds also supported in <winuae path>\plugins\floppysounds
+  directory
+- JIT GUI changes, removed useless force checkbox, direct/indirect
+  switching should work as designed again
+
 Beta 13:
 
 - more screen mode switching problems fixed
index ad38484f4ed4bf91e6fab8dfc11a6bd8f70c7cc8..023ee7382f34b9220c7e3964d34e0772ba1d8205 100755 (executable)
@@ -239,8 +239,10 @@ static void save_chunk (struct zfile *f, uae_u8 *chunk, size_t len, char *name,
     /* chunk data */
     if (compress) {
        int tmplen = len;
+       size_t opos;
        dst = &tmp[0];
        save_u32 (len);
+       opos = zfile_ftell (f);
        zfile_fwrite (&tmp[0], 1, 4, f);
        len = zfile_zcompress (f, chunk, len);
        if (len > 0) {
@@ -252,7 +254,7 @@ static void save_chunk (struct zfile *f, uae_u8 *chunk, size_t len, char *name,
        } else {
            len = tmplen;
            compress = 0;
-           zfile_fseek (f, -8, SEEK_CUR);
+           zfile_fseek (f, opos, SEEK_SET);
            dst = &tmp[0];
            save_u32 (flags);
            zfile_fwrite (&tmp[0], 1, 4, f);
@@ -340,6 +342,8 @@ void restore_ram (size_t filepos, uae_u8 *memory)
     int size, fullsize;
     uae_u32 flags;
 
+    if (filepos == 0 || memory == NULL)
+       return;
     zfile_fseek (savestate_file, filepos, SEEK_SET);
     zfile_fread (tmp, 1, sizeof(tmp), savestate_file);
     size = restore_u32 ();
@@ -570,7 +574,7 @@ void savestate_restore_finish (void)
     zfile_fclose (savestate_file);
     savestate_file = 0;
     savestate_state = 0;
-    restore_cpu_finish();
+    restore_cpu_finish ();
 }
 
 /* 1=compressed,2=not compressed,3=ram dump,4=audio dump */