]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2900b12
authorToni Wilen <twilen@winuae.net>
Sun, 17 Aug 2014 17:11:31 +0000 (20:11 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 17 Aug 2014 17:11:31 +0000 (20:11 +0300)
18 files changed:
blitter.cpp
blkdev_cdimage.cpp
cpuboard.cpp
expansion.cpp
gencpu.cpp
gfxboard.cpp
hardfile.cpp
include/memory.h
include/options.h
main.cpp
ncr_scsi.cpp
od-win32/mman.cpp
od-win32/win32.cpp
od-win32/win32.h
od-win32/win32gui.cpp
od-win32/winuae_msvc11/winuae_msvc.vcxproj
od-win32/winuae_msvc11/winuae_msvc.vcxproj.filters
od-win32/winuaechangelog.txt

index 3e7c97de639da7e6bccbd93b99fdf8718f27c032..3204df4ef06e0490a1a3c2c21f49c8f4d3c6de92 100644 (file)
@@ -1198,7 +1198,6 @@ void decide_blitter (int hpos)
                                break;
                        }
 
-                       check_channel_mods (last_blitter_hpos, c);
                        blt_info.got_cycle = 1;
                        if (c == 4) {
                                blitter_doddma (last_blitter_hpos);
@@ -1218,6 +1217,8 @@ void decide_blitter (int hpos)
                                        return;
                                }
                        }
+                       // check this after end check because last D write won't cause any problems.
+                       check_channel_mods (last_blitter_hpos, c);
                        break;
                }
 
index 8fde9a34bd1f5e98c676e5ded5d930060e813e31..0e0cbea08dad24b84d80e6ec5924eea850517094 100644 (file)
@@ -144,11 +144,27 @@ static struct cdtoc *findtoc (struct cdunit *cdu, int *sectorp, bool data)
        return NULL;
 }
 
-static int do_read (struct cdunit *cdu, struct cdtoc *t, uae_u8 *data, int sector, int offset, int size)
+static int do_read (struct cdunit *cdu, struct cdtoc *t, uae_u8 *data, int sector, int offset, int size, bool audio)
 {
        if (t->enctype == ENC_CHD) {
 #ifdef WITH_CHD
-               return read_partial_sector(cdu->chd_cdf, data, sector + t->offset, 0, offset, size) == CHDERR_NONE;
+               int type = CD_TRACK_MODE1_RAW;
+               switch (size)
+               {
+                       default:
+                       case 2352:
+                       type = CD_TRACK_MODE1_RAW;
+                       break;
+                       case 2336:
+                       type = CD_TRACK_MODE2;
+                       break;
+                       case 2048:
+                       type = CD_TRACK_MODE1;
+                       break;
+               }
+               if (audio && size == 2352)
+                       type = CD_TRACK_AUDIO;
+               return cdrom_read_data(cdu->chd_cdf, sector + t->offset, data, type, true) != 0;
 #endif
        } else if (t->handle) {
                int ssize = t->size + t->skipsize;
@@ -280,8 +296,7 @@ static int getsub_deinterleaved (uae_u8 *dst, struct cdunit *cdu, struct cdtoc *
                if (t->enctype == ENC_CHD) {
 #ifdef WITH_CHD
                        const cdrom_track_info *cti = t->chdtrack;
-                       ret = do_read (cdu, t, dst, sector, cti->datasize, cti->subsize);
-                       if (ret)
+                       if (cdrom_read_subcode(cdu->chd_cdf, sector, dst, false))
                                ret = t->subcode;
 #endif
                } else if (t->subhandle) {
@@ -551,7 +566,7 @@ static void *cdda_play_func (void *v)
                                        if (!(t->ctrl & 4)) {
                                                if (t->enctype == ENC_CHD) {
 #ifdef WITH_CHD
-                                                       do_read (cdu, t, dst, sector, 0, t->size);
+                                                       do_read (cdu, t, dst, sector, 0, t->size, true);
                                                        for (int i = 0; i < 2352; i+=2) {
                                                                uae_u8 p;
                                                                p = dst[i + 0];
@@ -805,7 +820,7 @@ static int command_rawread (int unitnum, uae_u8 *data, int sector, int size, int
                                data[13] = tobcd((uae_u8)((address / 75) % 60));
                                data[14] = tobcd((uae_u8)(address % 75));
                                data[15] = 2; /* MODE2 */
-                               do_read(cdu, t, data + 16, sector, 0, t->size);
+                               do_read(cdu, t, data + 16, sector, 0, t->size, false);
                                sector++;
                                asector++;
                                data += sectorsize;
@@ -815,7 +830,7 @@ static int command_rawread (int unitnum, uae_u8 *data, int sector, int size, int
                        // 2048 -> 2352
                        while (size-- > 0) {
                                memset (data, 0, 16);
-                               do_read (cdu, t, data + 16, sector, 0, 2048);
+                               do_read (cdu, t, data + 16, sector, 0, 2048, false);
                                encode_l2 (data, sector + 150);
                                sector++;
                                asector++;
@@ -826,8 +841,8 @@ static int command_rawread (int unitnum, uae_u8 *data, int sector, int size, int
                        // 2352 -> 2048
                        while (size-- > 0) {
                                uae_u8 b = 0;
-                               do_read (cdu, t, &b, sector, 15, 1);
-                               do_read (cdu, t, data, sector, b == 2 ? 24 : 16, sectorsize);
+                               do_read (cdu, t, &b, sector, 15, 1, false);
+                               do_read (cdu, t, data, sector, b == 2 ? 24 : 16, sectorsize, false);
                                sector++;
                                asector++;
                                data += sectorsize;
@@ -837,10 +852,10 @@ static int command_rawread (int unitnum, uae_u8 *data, int sector, int size, int
                        // 2352 -> 2336
                        while (size-- > 0) {
                                uae_u8 b = 0;
-                               do_read (cdu, t, &b, sector, 15, 1);
+                               do_read (cdu, t, &b, sector, 15, 1, false);
                                if (b != 2 && b != 0) // MODE0 or MODE2 only allowed
                                        return 0;
-                               do_read (cdu, t, data, sector, 16, sectorsize);
+                               do_read (cdu, t, data, sector, 16, sectorsize, false);
                                sector++;
                                asector++;
                                data += sectorsize;
@@ -849,7 +864,7 @@ static int command_rawread (int unitnum, uae_u8 *data, int sector, int size, int
                } else if (sectorsize == t->size) {
                        // no change
                        while (size -- > 0) {
-                               do_read (cdu, t, data, sector, 0, sectorsize);
+                               do_read (cdu, t, data, sector, 0, sectorsize, false);
                                sector++;
                                asector++;
                                data += sectorsize;
@@ -882,7 +897,7 @@ static int command_rawread (int unitnum, uae_u8 *data, int sector, int size, int
                        goto end;
                }
                for (int i = 0; i < size; i++) {
-                       do_read (cdu, t, data, sector, 0, t->size);
+                       do_read (cdu, t, data, sector, 0, t->size, true);
                        uae_u8 *p = data + t->size;
                        if (subs) {
                                uae_u8 subdata[SUB_CHANNEL_SIZE];
@@ -919,7 +934,7 @@ static int command_read (int unitnum, uae_u8 *data, int sector, int numsectors)
        cdda_stop (cdu);
        if (t->size == 2048) {
                while (numsectors-- > 0) {
-                       do_read (cdu, t, data, sector, 0, 2048);
+                       do_read (cdu, t, data, sector, 0, 2048, false);
                        data += 2048;
                        sector++;
                }
@@ -927,11 +942,11 @@ static int command_read (int unitnum, uae_u8 *data, int sector, int numsectors)
                while (numsectors-- > 0) {
                        if (t->size == 2352) {
                                uae_u8 b = 0;
-                               do_read (cdu, t, &b, sector, 15, 1);
+                               do_read (cdu, t, &b, sector, 15, 1, false);
                                // 2 = MODE2
-                               do_read (cdu, t, data, sector, b == 2 ? 24 : 16, 2048);
+                               do_read (cdu, t, data, sector, b == 2 ? 24 : 16, 2048, false);
                        } else {
-                               do_read (cdu, t, data, sector, 16, 2048);
+                               do_read (cdu, t, data, sector, 16, 2048, false);
                        }
                        data += 2048;
                        sector++;
@@ -1225,7 +1240,7 @@ static int parsechd (struct cdunit *cdu, struct zfile *zcue, const TCHAR *img)
        if (!f)
                return 0;
        chd_file *cf = new chd_file();
-       err = cf->open(f, false, NULL);
+       err = cf->open(*f, false, NULL);
        if (err != CHDERR_NONE) {
                write_log (_T("CHD '%s' err=%d\n"), zfile_getname (zcue), err);
                zfile_fclose (f);
@@ -1732,15 +1747,18 @@ static int parse_image (struct cdunit *cdu, const TCHAR *img)
                if (p > curdir)
                        my_setcurrentdir (curdir, oldcurdir);
 
-               if (!_tcsicmp (ext, _T("cue")))
+               if (!_tcsicmp (ext, _T("cue"))) {
                        parsecue (cdu, zcue, img);
-               else if (!_tcsicmp (ext, _T("ccd")))
+               } else if (!_tcsicmp (ext, _T("ccd"))) {
                        parseccd (cdu, zcue, img);
-               else if (!_tcsicmp (ext, _T("mds")))
+               } else if (!_tcsicmp (ext, _T("mds"))) {
                        parsemds (cdu, zcue, img);
 #ifdef WITH_CHD
-               else if (!_tcsicmp (ext, _T("chd")))
+               } else if (!_tcsicmp (ext, _T("chd"))) {
+                       if (oldcurdir[0])
+                               my_setcurrentdir (oldcurdir, NULL);
                        parsechd (cdu, zcue, img);
+               }
 #endif
 
                if (oldcurdir[0])
index 9a4ddcf91a20b2f795dc4317c0b41e85341a0953..a811186a620360d29e0d968ace5a0993fe54b964 100644 (file)
@@ -850,6 +850,10 @@ static uae_u32 REGPARAM2 blizzardio_bget(uaecptr addr)
                                v |= 0x08;
                        } else if (reg == CSIII_REG_RESET) {
                                v &= 0x1f;
+                       } else if (reg == CSIII_REG_IPL_EMU) {
+                               // PPC not master: m68k IPL = all ones
+                               if (io_reg[CSIII_REG_INT] & P5_INT_MASTER)
+                                       v |= P5_M68k_IPL_MASK;
                        }
 #if CPUBOARD_IO_LOG > 0
                        if (reg != CSIII_REG_IRQ || CPUBOARD_IO_LOG > 2)
@@ -1727,7 +1731,7 @@ addrbank *cpuboard_autoconfig_init(void)
        zfile_fclose(autoconfig_rom);
 
        if (f0rom_size)
-               map_banks(&blizzardf0_bank, 0xf00000 >> 16, f0rom_size >> 16, 0);
+               map_banks(&blizzardf0_bank, 0xf00000 >> 16, (f0rom_size > 262144 ? 262144 : f0rom_size) >> 16, 0);
        if (!autoconf)
                return &expamem_null;
        return &blizzarde8_bank;
index 39a84ae9acb70c0b16db28d4870616b6f429537d..3858a44db0b5e7374259633afc8e84dc8ce54146 100644 (file)
@@ -177,6 +177,11 @@ static uae_u8 expamem[65536];
 static uae_u8 expamem_lo;
 static uae_u16 expamem_hi;
 
+bool expamem_z3hack(struct uae_prefs *p)
+{
+       return p->jit_direct_compatible_memory || cpuboard_blizzardram(p);
+}
+
 /* Ugly hack for >2M chip RAM in single pool
  * We can't add it any later or early boot menu
  * stops working because it sets kicktag at the end
@@ -403,7 +408,7 @@ static void REGPARAM2 expamem_wput (uaecptr addr, uae_u32 value)
                switch (addr & 0xff) {
                case 0x44:
                        if (expamem_type () == zorroIII) {
-                               if (currprefs.jit_direct_compatible_memory) {
+                               if (expamem_z3hack(&currprefs)) {
                                        uae_u32 p2 = value;
                                        // +Bernd Roesch & Toni Wilen
                                        if ((card_flags[ecard] & 2) && (expamem[0] & add_memory)) {
@@ -1019,7 +1024,7 @@ static void expamem_map_z3fastmem_2 (addrbank *bank, uaecptr *startp, uae_u32 si
        int z3fs = ((expamem_hi | (expamem_lo >> 4)) << 16);
        int start = *startp;
 
-       if (currprefs.jit_direct_compatible_memory) {
+       if (expamem_z3hack(&currprefs)) {
                if (z3fs && start != z3fs) {
                        write_log (_T("WARNING: Z3MEM mapping changed from $%08x to $%08x\n"), start, z3fs);
                        map_banks (&dummy_bank, start >> 16, size >> 16, allocated);
@@ -1211,7 +1216,7 @@ uaecptr expansion_startaddress(uaecptr addr, uae_u32 size)
                return addr;
        if (size < 16 * 1024 * 1024)
                size = 16 * 1024 * 1024;
-       if (!currprefs.jit_direct_compatible_memory)
+       if (!expamem_z3hack(&currprefs))
                return (addr + size - 1) & ~(size - 1);
        return addr;
 }
@@ -1230,7 +1235,7 @@ static void allocate_expamem (void)
        z3fastmem_bank.start = currprefs.z3fastmem_start;
        if (currprefs.mbresmem_high_size == 128 * 1024 * 1024)
                z3chipmem_bank.start += 16 * 1024 * 1024;
-       if (!currprefs.jit_direct_compatible_memory)
+       if (!expamem_z3hack(&currprefs))
                z3fastmem_bank.start = 0x40000000;
        if (currprefs.cpuboard_type == BOARD_WARPENGINE_A4000) {
                z3fastmem_bank.start += 0x01000000;
@@ -1624,14 +1629,14 @@ void expamem_reset (void)
                card_name[cardno] = _T("Z3Fast");
                card_init[cardno] = expamem_init_z3fastmem;
                card_map[cardno++] = expamem_map_z3fastmem;
-               if (currprefs.jit_direct_compatible_memory)
+               if (expamem_z3hack(&currprefs))
                        map_banks (&z3fastmem_bank, z3fastmem_bank.start >> 16, currprefs.z3fastmem_size >> 16, z3fastmem_bank.allocated);
                if (z3fastmem2_bank.baseaddr != NULL) {
                        card_flags[cardno] = 2 | 1;
                        card_name[cardno] = _T("Z3Fast2");
                        card_init[cardno] = expamem_init_z3fastmem2;
                        card_map[cardno++] = expamem_map_z3fastmem2;
-                       if (currprefs.jit_direct_compatible_memory)
+                       if (expamem_z3hack(&currprefs))
                                map_banks (&z3fastmem2_bank, z3fastmem2_bank.start >> 16, currprefs.z3fastmem2_size >> 16, z3fastmem2_bank.allocated);
                }
        }
index 0452f1d58366910bfcb77421d9642eaefa84da06..11cfd547e998306c4e37bcb809da2f1c747bb354 100644 (file)
@@ -3541,6 +3541,10 @@ static void gen_opcode (unsigned int opcode)
                        genamode (NULL, Aipi, "7", sz_word, "sr", 1, 0, GF_NOREFILL);
                        genamode (NULL, Aipi, "7", sz_long, "pc", 1, 0, GF_NOREFILL);
                        printf ("\tregs.sr = sr;\n");
+                       printf ("\tif (pc & 1) {\n");
+                       printf ("\t\texception3i (0x%04X, pc);\n", opcode);
+                       printf ("\t\tgoto %s;\n", endlabelstr);
+                       printf ("\t}\n");
                        setpc ("pc");
                        makefromsr ();
                } else if (cpu_level == 1 && using_prefetch) {
@@ -3633,10 +3637,6 @@ static void gen_opcode (unsigned int opcode)
                        genamode (NULL, Aipi, "7", sz_long, "pc", 1, 0, 0);
                        genamode (curi, curi->smode, "srcreg", curi->size, "offs", 1, 0, 0);
                        printf ("\tm68k_areg (regs, 7) += offs;\n");
-                       printf ("\tif (pc & 1) {\n");
-                       printf ("\t\texception3i (0x%04X, pc);\n", opcode);
-                       printf ("\t\tgoto %s;\n", endlabelstr);
-                       printf ("\t}\n");
                }
            printf ("\tif (pc & 1) {\n");
            printf ("\t\texception3i (0x%04X, pc);\n", opcode);
index c34fef89f57a76eb7b1ed124b3146c191a0042e9..3a88e8250e2e9b65e929f21323d863c2f256ea7d 100644 (file)
@@ -1230,7 +1230,7 @@ static void REGPARAM2 gfxboard_wput_mem_autoconfig (uaecptr addr, uae_u32 b)
        addr &= 65535;
        if (addr == 0x44) {
                uae_u32 start;
-               if (currprefs.jit_direct_compatible_memory) {
+               if (expamem_z3hack(&currprefs)) {
                        start = gfxmem_bank.start;
                        put_word (regs.regs[11] + 0x20, start >> 16);
                        put_word (regs.regs[11] + 0x28, start >> 16);
index cee0469a278eaf20c008bfa24b3cbc5636fe8599..3ad51b1c4b8119ba779c2d0f184eeb61a664e985 100644 (file)
@@ -31,6 +31,7 @@
 #ifdef WITH_CHD
 #include "archivers/chd/chdtypes.h"
 #include "archivers/chd/chd.h"
+#include "archivers/chd/harddisk.h"
 #endif
 
 //#undef DEBUGME
@@ -68,9 +69,10 @@ struct hardfileprivdata {
        uaecptr changeint;
 };
 
-#define HFD_VHD_DYNAMIC 3
-#define HFD_VHD_FIXED 2
-#define HFD_CHD 1
+#define HFD_VHD_DYNAMIC 4
+#define HFD_VHD_FIXED 3
+#define HFD_CHD_OTHER 2
+#define HFD_CHD_HD 1
 
 STATIC_INLINE uae_u32 gl (uae_u8 *p)
 {
@@ -475,20 +477,37 @@ int hdf_open (struct hardfiledata *hfd, const TCHAR *pname)
        _tcscpy (nametmp, pname);
        TCHAR *ext = _tcsrchr (nametmp, '.');
        if (ext && !_tcsicmp (ext, _T(".chd"))) {
-               struct zfile *zf = zfile_fopen (nametmp, _T("rb"));
+               bool chd_readonly = false;
+               struct zfile *zf = NULL;
+               if (!hfd->ci.readonly)
+                       zf = zfile_fopen (nametmp, _T("rb+"));
+               if (!zf) {
+                       chd_readonly = true;
+                       zf = zfile_fopen (nametmp, _T("rb"));
+               }
                if (zf) {
                        int err;
+                       hard_disk_file *chdf;
                        chd_file *cf = new chd_file();
-                       err = cf->open(zf, false, NULL);
+                       err = cf->open(*zf, false, NULL);
                        if (err != CHDERR_NONE) {
                                zfile_fclose (zf);
                                goto nonvhd;
                        }
-                       hfd->chd_handle = cf;
-                       hfd->ci.readonly = true;
-                       hfd->hfd_type = HFD_CHD;
-                       hfd->handle_valid = -1;
+                       chdf = hard_disk_open(cf);
+                       if (!chdf) {
+                               hfd->ci.readonly = true;
+                               hfd->hfd_type = HFD_CHD_OTHER;
+                               hfd->chd_handle = cf;
+                       } else {
+                               hfd->hfd_type = HFD_CHD_HD;
+                               hfd->chd_handle = chdf;
+                       }
+                       if (cf->compressed() || chd_readonly)
+                               hfd->ci.readonly = true;
                        hfd->virtsize = cf->logical_bytes ();
+                       hfd->handle_valid = -1;
+                       write_log(_T("CHD '%s' mounted as %s, %s.\n"), pname, chdf ? _T("HD") : _T("OTHER"), hfd->ci.readonly ? _T("read only") : _T("read/write"));
                        goto nonvhd;
                }
        }
@@ -563,11 +582,18 @@ void hdf_close (struct hardfiledata *hfd)
        hdf_flush_cache (hfd);
        hdf_close_target (hfd);
 #ifdef WITH_CHD
-       if (hfd->chd_handle) {
+       if (hfd->hfd_type == HFD_CHD_OTHER) {
                chd_file *cf = (chd_file*)hfd->chd_handle;
                cf->close();
-               hfd->chd_handle = NULL;
+               delete cf;
+       } else if (hfd->hfd_type == HFD_CHD_HD) {
+               hard_disk_file *chdf = (hard_disk_file*)hfd->chd_handle;
+               chd_file *cf = hard_disk_get_chd(chdf);
+               hard_disk_close(chdf);
+               cf->close();
+               delete cf;
        }
+       hfd->chd_handle = NULL;
 #endif
        hfd->hfd_type = 0;
        xfree (hfd->vhd_header);
@@ -874,11 +900,27 @@ static int hdf_read2 (struct hardfiledata *hfd, void *buffer, uae_u64 offset, in
        else if (hfd->hfd_type == HFD_VHD_FIXED)
                return hdf_read_target (hfd, buffer, offset + 512, len);
 #ifdef WITH_CHD
-       else if (hfd->hfd_type == HFD_CHD) {
+       else if (hfd->hfd_type == HFD_CHD_OTHER) {
                chd_file *cf = (chd_file*)hfd->chd_handle;
                if (cf->read_bytes(offset, buffer, len) == CHDERR_NONE)
                        return len;
                return 0;
+       } else if (hfd->hfd_type == HFD_CHD_HD) {
+               hard_disk_file *chdf = (hard_disk_file*)hfd->chd_handle;
+               hard_disk_info *chdi = hard_disk_get_info(chdf);
+               chd_file *cf = hard_disk_get_chd(chdf);
+               uae_u8 *buf = (uae_u8*)buffer;
+               int got = 0;
+               offset /= chdi->sectorbytes;
+               while (len > 0) {
+                       if (cf->read_units(offset, buf) != CHDERR_NONE)
+                               return got;
+                       got += chdi->sectorbytes;
+                       buf += chdi->sectorbytes;
+                       len -= chdi->sectorbytes;
+                       offset++;
+               }
+               return got;
        }
 #endif
        else
@@ -892,8 +934,27 @@ static int hdf_write2 (struct hardfiledata *hfd, void *buffer, uae_u64 offset, i
        else if (hfd->hfd_type == HFD_VHD_FIXED)
                return hdf_write_target (hfd, buffer, offset + 512, len);
 #ifdef WITH_CHD
-       else if (hfd->hfd_type == HFD_CHD)
+       else if (hfd->hfd_type == HFD_CHD_OTHER)
                return 0;
+       else if (hfd->hfd_type == HFD_CHD_HD) {
+               if (hfd->ci.readonly)
+                       return 0;
+               hard_disk_file *chdf = (hard_disk_file*)hfd->chd_handle;
+               hard_disk_info *chdi = hard_disk_get_info(chdf);
+               chd_file *cf = hard_disk_get_chd(chdf);
+               uae_u8 *buf = (uae_u8*)buffer;
+               int got = 0;
+               offset /= chdi->sectorbytes;
+               while (len > 0) {
+                       if (cf->write_units(offset, buf) != CHDERR_NONE)
+                               return got;
+                       got += chdi->sectorbytes;
+                       buf += chdi->sectorbytes;
+                       len -= chdi->sectorbytes;
+                       offset++;
+               }
+               return got;
+       }
 #endif
        else
                return hdf_write_target (hfd, buffer, offset, len);
index c833f1d1dffc1b321d28a97938d5bf8e58d53d4f..37c04347e436ff921be01771c1a7337e1f347ec5 100644 (file)
@@ -331,6 +331,7 @@ extern void rtarea_setup (void);
 extern void expamem_init (void);
 extern void expamem_reset (void);
 extern void expamem_next (void);
+extern bool expamem_z3hack(struct uae_prefs*);
 
 extern uae_u32 last_custom_value1;
 
index ab0fda82468848dc6ca65d8020752c80cd72c55e..396b15db5cf1b1716dca95943433deab5a830bc3 100644 (file)
@@ -81,8 +81,11 @@ struct jport {
 #define MAX_SPARE_DRIVES 20
 #define MAX_CUSTOM_MEMORY_ADDRS 2
 
+#define CONFIG_TYPE_ALL -1
+#define CONFIG_TYPE_DEFAULT 0
 #define CONFIG_TYPE_HARDWARE 1
 #define CONFIG_TYPE_HOST 2
+#define CONFIG_TYPE_NORESET 4
 #define CONFIG_BLEN 2560
 
 #define TABLET_OFF 0
index e1f9e005895aaa322291aca4646021070487dc27..1fcf31f73a3d569085507f43c04a0de88cce01f4 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -157,7 +157,7 @@ static void fixup_prefs_dim2 (struct wh *wh)
        if (wh->special)
                return;
        if (wh->width < 160) {
-               error_log (_T("Width (%d) must be at least 128."), wh->width);
+               error_log (_T("Width (%d) must be at least 160."), wh->width);
                wh->width = 160;
        }
        if (wh->height < 128) {
@@ -786,6 +786,7 @@ static TCHAR *parsetextpath (const TCHAR *s)
 static void parse_cmdline (int argc, TCHAR **argv)
 {
        int i;
+       bool firstconfig = true;
 
        for (i = 1; i < argc; i++) {
                if (!_tcsncmp (argv[i], _T("-diskswapper="), 13)) {
@@ -800,8 +801,9 @@ static void parse_cmdline (int argc, TCHAR **argv)
                } else if (_tcsncmp (argv[i], _T("-config="), 8) == 0) {
                        TCHAR *txt = parsetextpath (argv[i] + 8);
                        currprefs.mountitems = 0;
-                       target_cfgfile_load (&currprefs, txt, -1, 0);
+                       target_cfgfile_load (&currprefs, txt, firstconfig ? CONFIG_TYPE_ALL : CONFIG_TYPE_HARDWARE | CONFIG_TYPE_HOST | CONFIG_TYPE_NORESET, 0);
                        xfree (txt);
+                       firstconfig = false;
                } else if (_tcsncmp (argv[i], _T("-statefile="), 11) == 0) {
                        TCHAR *txt = parsetextpath (argv[i] + 11);
                        savestate_state = STATE_DORESTORE;
@@ -814,8 +816,9 @@ static void parse_cmdline (int argc, TCHAR **argv)
                        } else {
                                TCHAR *txt = parsetextpath (argv[++i]);
                                currprefs.mountitems = 0;
-                               target_cfgfile_load (&currprefs, txt, -1, 0);
+                               target_cfgfile_load (&currprefs, txt, firstconfig ? CONFIG_TYPE_ALL : CONFIG_TYPE_HARDWARE | CONFIG_TYPE_HOST | CONFIG_TYPE_NORESET, 0);
                                xfree (txt);
+                               firstconfig = false;
                        }
                } else if (_tcscmp (argv[i], _T("-s")) == 0) {
                        if (i + 1 == argc)
@@ -868,12 +871,12 @@ static void parse_cmdline_and_init_file (int argc, TCHAR **argv)
 
        _tcscat (optionsfile, restart_config);
 
-       if (! target_cfgfile_load (&currprefs, optionsfile, 0, default_config)) {
+       if (! target_cfgfile_load (&currprefs, optionsfile, CONFIG_TYPE_DEFAULT, default_config)) {
                write_log (_T("failed to load config '%s'\n"), optionsfile);
 #ifdef OPTIONS_IN_HOME
                /* sam: if not found in $HOME then look in current directory */
                _tcscpy (optionsfile, restart_config);
-               target_cfgfile_load (&currprefs, optionsfile, 0, default_config);
+               target_cfgfile_load (&currprefs, optionsfile, CONFIG_TYPE_DEFAULT, default_config);
 #endif
        }
        fixup_prefs (&currprefs);
index 44ba207bd898dea733d7b81cf280abde412033c1..f1490206059a358b59bbb8fdc1bf8eeb3700a439 100644 (file)
@@ -475,7 +475,7 @@ static void REGPARAM2 ncr_wput (struct ncr_state *ncr, uaecptr addr, uae_u32 w)
                {
                        case 0x44:
                        // yes, this could be much better..
-                       if (currprefs.jit_direct_compatible_memory) {
+                       if (expamem_z3hack(&currprefs)) {
                                if (ncr == &ncr_we) {
                                        // warp engine needs to be first
                                        value = 0x10000000;
index 20cbaaf703751f91c5f2ae9e9c75e2358871d8ec..713f985c2034611c0dc82de02cc59a905bb9afd0 100644 (file)
@@ -359,7 +359,7 @@ static int doinit_shm (void)
                p96base_offset = getz2rtgaddr (changed_prefs.rtgmem_size);
        }
        if (p96base_offset) {
-               if (changed_prefs.jit_direct_compatible_memory) {
+               if (expamem_z3hack(&changed_prefs)) {
                        p96mem_offset = natmem_offset + p96base_offset;
                } else {
                        // calculate Z3 alignment (argh, I thought only Z2 needed this..)
index ca6f74d4a406b335060e6f738ed4264ab05dfba4..0633c5afbccea9f66cd7416f102f25760fd49c69 100644 (file)
@@ -1519,20 +1519,21 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
                                        {
                                                LPNMMOUSE lpnm = (LPNMMOUSE) lParam;
                                                int num = (int)lpnm->dwItemSpec;
-                                               if (num >= 7 && num <= 10) { // DF0-DF3
-                                                       num -= 7;
+                                               int df0 = 8;
+                                               if (num >= df0 && num <= df0 + 3) { // DF0-DF3
+                                                       num -= df0;
                                                        if (nm->code == NM_RCLICK) {
                                                                disk_eject (num);
                                                        } else if (changed_prefs.floppyslots[num].dfxtype >= 0) {
                                                                DiskSelection (hWnd, IDC_DF0 + num, 0, &changed_prefs, 0);
                                                                disk_insert (num, changed_prefs.floppyslots[num].df);
                                                        }
-                                               } else if (num == 4) {
+                                               } else if (num == 5) {
                                                        if (nm->code == NM_CLICK) // POWER
                                                                inputdevice_add_inputcode (AKS_ENTERGUI, 1);
                                                        else
                                                                uae_reset (0, 1);
-                                               } else if (num == 3) {
+                                               } else if (num == 4) {
                                                        if (pause_emulation) {
                                                                resumepaused (9);
                                                                setmouseactive (1);
index 81e4e6130c6068d3ebf419c69a8b214450558078..b632ced8876ae70661a82dfd4ef68dc09827aaf9 100644 (file)
 #define LANG_DLL_FULL_VERSION_MATCH 1
 
 #if WINUAEPUBLICBETA
-#define WINUAEBETA _T("11")
+#define WINUAEBETA _T("12")
 #else
 #define WINUAEBETA _T("")
 #endif
 
-#define WINUAEDATE MAKEBD(2014, 8, 16)
+#define WINUAEDATE MAKEBD(2014, 8, 17)
 
 //#define WINUAEEXTRA _T("AmiKit Preview")
 //#define WINUAEEXTRA _T("Amiga Forever Edition")
index d7da93b7ff22f11bda59a4c370af674055874441..c01c17e1a075ad92827a0edccfb87e9c61b5f2b0 100644 (file)
@@ -1898,6 +1898,7 @@ int target_cfgfile_load (struct uae_prefs *p, const TCHAR *filename, int type, i
        type2 = type;
        if (type == 0 || type == 3) {
                default_prefs (p, type);
+               write_log(_T("config reset\n"));
 #if 0
                if (isdefault == 0) {
                        fetch_configurationpath (tmp1, sizeof (tmp1) / sizeof (TCHAR));
@@ -2623,7 +2624,7 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs
                        }
                        break;
                case IDC_LOAD:
-                       if (target_cfgfile_load (&workprefs, full_path, 0, 0) == 0) {
+                       if (target_cfgfile_load (&workprefs, full_path, CONFIG_TYPE_DEFAULT, 0) == 0) {
                                TCHAR szMessage[MAX_DPATH];
                                WIN32GUI_LoadUIString (IDS_COULDNOTLOADCONFIG, szMessage, MAX_DPATH);
                                pre_gui_message (szMessage);
@@ -16551,7 +16552,7 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int currentpage)
                        _tcscpy (prefs->flashfile, file);
                        break;
                case ZFILE_CONFIGURATION:
-                       if (target_cfgfile_load (&workprefs, file, 0, 0)) {
+                       if (target_cfgfile_load (&workprefs, file, CONFIG_TYPE_DEFAULT, 0)) {
                                if (full_property_sheet) {
                                        inputdevice_updateconfig (NULL, &workprefs);
                                        if (!workprefs.start_gui)
index ddccd21869efda165db1bed0d4b236fcdf8a38a8..6e9700a25f3850870fca5ab1eaa3ad699e94c50b 100644 (file)
     <ClCompile Include="..\..\archivers\chd\chd.cpp" />
     <ClCompile Include="..\..\archivers\chd\chdcdrom.cpp" />
     <ClCompile Include="..\..\archivers\chd\chdcodec.cpp" />
+    <ClCompile Include="..\..\archivers\chd\chdglue.cpp" />
+    <ClCompile Include="..\..\archivers\chd\corealloc.cpp" />
     <ClCompile Include="..\..\archivers\chd\flac.cpp" />
+    <ClCompile Include="..\..\archivers\chd\harddisk.cpp" />
     <ClCompile Include="..\..\archivers\chd\hashing.cpp" />
     <ClCompile Include="..\..\archivers\chd\huffman.cpp" />
     <ClCompile Include="..\..\archivers\chd\md5.cpp" />
     <ClCompile Include="..\..\archivers\chd\sha1.cpp" />
+    <ClCompile Include="..\..\archivers\chd\windows\wintime.cpp" />
+    <ClCompile Include="..\..\archivers\chd\windows\winwork.cpp" />
     <ClCompile Include="..\..\archivers\dms\crc_csum.cpp" />
     <ClCompile Include="..\..\archivers\dms\getbits.cpp" />
     <ClCompile Include="..\..\archivers\dms\maketbl.cpp" />
index 4aafcf84878430cf22c7d0726331f0770b5b2751..4defc3a584f9db3ca54c8006cd2bce992145dfe5 100644 (file)
     <ClCompile Include="..\..\archivers\chd\flac.cpp">
       <Filter>unpackers\chd</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\archivers\chd\chdcdrom.cpp">
-      <Filter>unpackers\chd</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\scsitape.cpp">
       <Filter>common</Filter>
     </ClCompile>
     <ClCompile Include="..\..\ppc\pearpc\cpu\cpu_generic\ppc_vec.cpp">
       <Filter>ppc</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\archivers\chd\harddisk.cpp">
+      <Filter>unpackers\chd</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\archivers\chd\chdcdrom.cpp">
+      <Filter>unpackers\chd</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\archivers\chd\chdglue.cpp">
+      <Filter>unpackers\chd</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\archivers\chd\corealloc.cpp">
+      <Filter>unpackers\chd</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\archivers\chd\windows\wintime.cpp">
+      <Filter>unpackers\chd</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\archivers\chd\windows\winwork.cpp">
+      <Filter>unpackers\chd</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\resources\35floppy.ico">
index 456afcda9932ef218b1bc4304831d214361cfa47..4c4d12f49c1a428fbc4153aca3a4a828c1ec5346 100644 (file)
@@ -18,6 +18,19 @@ Things that may happen in 2015:
 
 - restore only single input target to default.
 
+Beta 12:
+
+- Windowed mode status bar button mouse click off-by-one fix.
+- If command line has more than one -f/-config= parameters, config will be now reset to built-in defaults
+  only once, before first config file is loaded.
+- Updated CHD support, uncompressed CHD write support added, can be mounted as read-write hardfile.
+  (CD subchannel support may or may not work, there does not appear to be easy way to convert ccd/sub/img
+  combination to chd)
+- CSPPC/BPPC IPL_EMU register's M68K_IPL bits only change when PPC is interrupt master.
+- b11 Blizzard accelerator Z3 autoconfig hack didn't work correctly.
+- BlizzardPPC flash mapping fixed (b11)
+- 68000 mode, without CE and more compatible, RTE instruction didn't check for odd program counter.
+
 Beta 11:
 
 - P5_AMIGA_RESET CSMK3/CSPPC/BPPC bit can be only changed if P5_SELF_RESET is cleared first.
@@ -52,13 +65,13 @@ Next topic:
 PearPC CPU emulator is a dead-end. Missing instructions, only partially emulated instructions, no support
 for integer overflows, division by zero, illegal instruction exceptions and so on.. (Which means any buggy or
 badly behaving program can crash the emulator or hang or crash emulated operating system). It did its job, allowed
-easy and quick PPC emulation test. It would not have happened with any other more complex ores.
+easy and quick PPC emulation test. It would not have happened with any other more complex cores.
 
 It seems most compatible PPC CPU emulation is in QEMU. Dolphin only have experimental MMU support which is not
 supported in JIT modes. But QEMU is complex, very complex..
 
 What does this mean? It means all PPC CPU related bugs will be ignored until PPC CPU emulator core is replaced
-(timeframe: unknown. Not going to happen without help.), only exception is bugs that didn't exist in b10.
+(timeframe: unknown.), only exception is bugs that didn't exist in b10.
 
 Beta 10: