From 9467673534f754a7659494504f1f38ee544a3384 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 17 Aug 2014 20:11:31 +0300 Subject: [PATCH] 2900b12 --- blitter.cpp | 3 +- blkdev_cdimage.cpp | 62 ++++++++----- cpuboard.cpp | 6 +- expansion.cpp | 17 ++-- gencpu.cpp | 8 +- gfxboard.cpp | 2 +- hardfile.cpp | 87 ++++++++++++++++--- include/memory.h | 1 + include/options.h | 3 + main.cpp | 13 +-- ncr_scsi.cpp | 2 +- od-win32/mman.cpp | 2 +- od-win32/win32.cpp | 9 +- od-win32/win32.h | 4 +- od-win32/win32gui.cpp | 5 +- od-win32/winuae_msvc11/winuae_msvc.vcxproj | 5 ++ .../winuae_msvc11/winuae_msvc.vcxproj.filters | 21 ++++- od-win32/winuaechangelog.txt | 17 +++- 18 files changed, 199 insertions(+), 68 deletions(-) diff --git a/blitter.cpp b/blitter.cpp index 3e7c97de..3204df4e 100644 --- a/blitter.cpp +++ b/blitter.cpp @@ -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; } diff --git a/blkdev_cdimage.cpp b/blkdev_cdimage.cpp index 8fde9a34..0e0cbea0 100644 --- a/blkdev_cdimage.cpp +++ b/blkdev_cdimage.cpp @@ -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]) diff --git a/cpuboard.cpp b/cpuboard.cpp index 9a4ddcf9..a811186a 100644 --- a/cpuboard.cpp +++ b/cpuboard.cpp @@ -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; diff --git a/expansion.cpp b/expansion.cpp index 39a84ae9..3858a44d 100644 --- a/expansion.cpp +++ b/expansion.cpp @@ -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); } } diff --git a/gencpu.cpp b/gencpu.cpp index 0452f1d5..11cfd547 100644 --- a/gencpu.cpp +++ b/gencpu.cpp @@ -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); diff --git a/gfxboard.cpp b/gfxboard.cpp index c34fef89..3a88e825 100644 --- a/gfxboard.cpp +++ b/gfxboard.cpp @@ -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); diff --git a/hardfile.cpp b/hardfile.cpp index cee0469a..3ad51b1c 100644 --- a/hardfile.cpp +++ b/hardfile.cpp @@ -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); diff --git a/include/memory.h b/include/memory.h index c833f1d1..37c04347 100644 --- a/include/memory.h +++ b/include/memory.h @@ -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; diff --git a/include/options.h b/include/options.h index ab0fda82..396b15db 100644 --- a/include/options.h +++ b/include/options.h @@ -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 diff --git a/main.cpp b/main.cpp index e1f9e005..1fcf31f7 100644 --- 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); diff --git a/ncr_scsi.cpp b/ncr_scsi.cpp index 44ba207b..f1490206 100644 --- a/ncr_scsi.cpp +++ b/ncr_scsi.cpp @@ -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; diff --git a/od-win32/mman.cpp b/od-win32/mman.cpp index 20cbaaf7..713f985c 100644 --- a/od-win32/mman.cpp +++ b/od-win32/mman.cpp @@ -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..) diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index ca6f74d4..0633c5af 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -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); diff --git a/od-win32/win32.h b/od-win32/win32.h index 81e4e613..b632ced8 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -20,12 +20,12 @@ #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") diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index d7da93b7..c01c17e1 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -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) diff --git a/od-win32/winuae_msvc11/winuae_msvc.vcxproj b/od-win32/winuae_msvc11/winuae_msvc.vcxproj index ddccd218..6e9700a2 100644 --- a/od-win32/winuae_msvc11/winuae_msvc.vcxproj +++ b/od-win32/winuae_msvc11/winuae_msvc.vcxproj @@ -754,11 +754,16 @@ + + + + + diff --git a/od-win32/winuae_msvc11/winuae_msvc.vcxproj.filters b/od-win32/winuae_msvc11/winuae_msvc.vcxproj.filters index 4aafcf84..4defc3a5 100644 --- a/od-win32/winuae_msvc11/winuae_msvc.vcxproj.filters +++ b/od-win32/winuae_msvc11/winuae_msvc.vcxproj.filters @@ -550,9 +550,6 @@ unpackers\chd - - unpackers\chd - common @@ -712,6 +709,24 @@ ppc + + unpackers\chd + + + unpackers\chd + + + unpackers\chd + + + unpackers\chd + + + unpackers\chd + + + unpackers\chd + diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 456afcda..4c4d12f4 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -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: -- 2.47.3