From: Toni Wilen Date: Sat, 9 Feb 2013 15:24:40 +0000 (+0200) Subject: 2600b7 X-Git-Tag: 2600~14 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=1f74aa281d173c893f1af071574227a4eab01a5c;p=francis%2Fwinuae.git 2600b7 --- diff --git a/a2065.cpp b/a2065.cpp index fe6e57cf..3d735f84 100644 --- a/a2065.cpp +++ b/a2065.cpp @@ -125,7 +125,8 @@ static void ew (int addr, uae_u32 value) void a2065_reset (void) { am_initialized = 0; - csr[0] = csr[1] = csr[2] = csr[3] = 0; + csr[0] = CSR0_STOP; + csr[1] = csr[2] = csr[3] = 0; rap = 0; uaenet_close (sysdata); @@ -647,29 +648,34 @@ static void chip_wput (uaecptr addr, uae_u16 v) csr[0] = CSR0_STOP; if (log_a2065) - write_log (_T("A2065: STOP.\n")); + write_log (_T("A2065: STOP. %04X -> %04X -> %04X\n"), oreg, v, csr[0]); csr[3] = 0; - am_initialized = 0; - } else if ((csr[0] & CSR0_STRT) && !(oreg & CSR0_STRT) && (oreg & CSR0_STOP)) { + } else if ((csr[0] & CSR0_STRT) && !(oreg & CSR0_STRT) && (oreg & (CSR0_STOP | CSR0_INIT))) { csr[0] &= ~CSR0_STOP; if (!(am_mode & MODE_DTX)) csr[0] |= CSR0_TXON; if (!(am_mode & MODE_DRX)) csr[0] |= CSR0_RXON; + if ((csr[0] & CSR0_INIT) && !(oreg & CSR0_INIT)) { + chip_init (); + csr[0] |= CSR0_IDON; + am_initialized = 1; + if (log_a2065) + write_log (_T("A2065: INIT+START. %04X -> %04X -> %04X\n"), oreg, v, csr[0]); + } if (log_a2065) - write_log (_T("A2065: START.\n")); + write_log (_T("A2065: START. %04X -> %04X -> %04X\n"), oreg, v, csr[0]); - } else if ((csr[0] & CSR0_INIT) && (oreg & CSR0_STOP) && !(oreg & CSR0_INIT)) { + } else if ((csr[0] & CSR0_INIT) && !(oreg & CSR0_INIT) && (oreg & CSR0_STOP)) { - if (log_a2065) - write_log (_T("A2065: INIT.\n")); chip_init (); csr[0] |= CSR0_IDON; csr[0] &= ~(CSR0_RXON | CSR0_TXON | CSR0_STOP); am_initialized = 1; - + if (log_a2065) + write_log (_T("A2065: INIT. %04X -> %04X -> %04X\n"), oreg, v, csr[0]); } if ((csr[0] & CSR0_STRT) && am_initialized) { diff --git a/cfgfile.cpp b/cfgfile.cpp index 4ad84cb0..9b319753 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -528,10 +528,6 @@ static void write_filesys_config (struct uae_prefs *p, struct zfile *f) TCHAR *str; int bp = ci->bootpri; - if (!ci->autoboot) - bp = -128; - if (ci->donotmount) - bp = -129; str = cfgfile_put_multipath (&p->path_hardfile, ci->rootdir); if (ci->type == UAEDEV_DIR) { _stprintf (tmp, _T("%s,%s:%s:%s,%d"), ci->readonly ? _T("ro") : _T("rw"), @@ -2397,10 +2393,6 @@ struct uaedev_config_data *add_filesys_config (struct uae_prefs *p, int index, s memcpy (&uci->ci, ci, sizeof (struct uaedev_config_info)); validatedevicename (uci->ci.devname); validatevolumename (uci->ci.volname); - if (uci->ci.bootpri < -128) - uci->ci.donotmount = true; - else if (uci->ci.bootpri >= -127) - uci->ci.autoboot = true; if (!uci->ci.devname[0] && ci->type != UAEDEV_CD) { TCHAR base[32]; TCHAR base2[32]; @@ -2562,12 +2554,11 @@ static bool parse_geo (const TCHAR *tname, struct uaedev_config_info *uci, struc if (!_tcsicmp (key, _T("forceload"))) uci->forceload = v; if (!_tcsicmp (key, _T("bootpri"))) { + if (v < -129) + v = -129; + if (v > 127) + v = 127; uci->bootpri = v; - uci->donotmount = false; - if (uci->bootpri <= -128) { - uci->bootpri = -128; - uci->donotmount = true; - } } if (!_tcsicmp (key, _T("filesystem"))) _tcscpy (uci->filesys, val); @@ -2702,8 +2693,6 @@ static int cfgfile_parse_newfilesys (struct uae_prefs *p, int nr, int type, TCHA goto invalid_fs; } empty_fs: - uci.autoboot = uci.bootpri >= -127; - uci.donotmount = uci.bootpri == -129; if (uci.rootdir[0]) { if (_tcslen (uci.rootdir) > 3 && uci.rootdir[0] == 'H' && uci.rootdir[1] == 'D' && uci.rootdir[2] == '_') { memmove (uci.rootdir, uci.rootdir + 2, (_tcslen (uci.rootdir + 2) + 1) * sizeof (TCHAR)); diff --git a/drawing.cpp b/drawing.cpp index 542a8730..499f42c9 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -2398,10 +2398,8 @@ static void center_image (void) /* Would the old value be good enough? If so, leave it as it is if we want to * be clever. */ - if (currprefs.gfx_ycenter == 2) { - if (center_reset || (thisframe_y_adjust != prev_y_adjust - && prev_y_adjust <= thisframe_first_drawn_line - && prev_y_adjust + max_drawn_amiga_line > thisframe_last_drawn_line)) + if (currprefs.gfx_ycenter == 2 && thisframe_y_adjust != prev_y_adjust) { + if (center_reset || (prev_y_adjust <= thisframe_first_drawn_line && prev_y_adjust + max_drawn_amiga_line > thisframe_last_drawn_line)) thisframe_y_adjust = prev_y_adjust; } } diff --git a/filesys.cpp b/filesys.cpp index d524bdb0..0012a291 100644 --- a/filesys.cpp +++ b/filesys.cpp @@ -336,7 +336,7 @@ int get_filesys_unitconfig (struct uae_prefs *p, int index, struct mountedinfo * mi->size = -1; mi->ismounted = true; if (blkdev_get_info (p, ui->hf.ci.cd_emu_unit, &di)) { - mi->ismedia = di.media_inserted; + mi->ismedia = di.media_inserted != 0; _tcscpy (mi->rootdir, di.label); } #if 0 @@ -512,7 +512,6 @@ void uci_set_defaults (struct uaedev_config_info *uci, bool rdb) uci->surfaces = 1; } uci->blocksize = 512; - uci->autoboot = true; uci->maxtransfer = 0x7fffffff; uci->mask = 0xffffffff; uci->bufmemtype = 1; @@ -627,10 +626,6 @@ static int set_filesys_unit_1 (int nr, struct uaedev_config_info *ci) if (c.filesys[0]) ui->filesysdir = my_strdup (c.filesys); ui->readonly = c.readonly; - if (!c.autoboot) - c.bootpri = -128; - if (c.donotmount) - c.bootpri = -129; if (c.bootpri < -129) c.bootpri = -129; if (c.bootpri > 127) @@ -1700,7 +1695,6 @@ int filesys_media_change (const TCHAR *rootdir, int inserted, struct uaedev_conf _tcscpy (ci.devname, devname); _tcscpy (ci.volname, volptr); _tcscpy (ci.rootdir, rootdir); - ci.autoboot = true; ci.flags = MYVOLUMEINFO_REUSABLE; nr = add_filesys_unit (&ci); if (nr < 0) diff --git a/fpp.cpp b/fpp.cpp index 21787b38..233fd250 100644 --- a/fpp.cpp +++ b/fpp.cpp @@ -209,18 +209,17 @@ static void fpu_op_illg2 (uae_u16 opcode, uae_u32 ea, uaecptr oldpc) m68k_areg (regs, 7) -= 4; x_put_long (m68k_areg (regs, 7), ea); m68k_areg (regs, 7) -= 2; - x_put_long (m68k_areg (regs, 7), 0x4000 + 11 * 4); - m68k_areg (regs, 7) -= 4; + x_put_word (m68k_areg (regs, 7), 0x4000 + 11 * 4); } else { m68k_areg (regs, 7) -= 4; x_put_long (m68k_areg (regs, 7), ea); m68k_areg (regs, 7) -= 2; - x_put_long (m68k_areg (regs, 7), 0x2000 + 11 * 4); - m68k_areg (regs, 7) -= 4; + x_put_word (m68k_areg (regs, 7), 0x2000 + 11 * 4); } + m68k_areg (regs, 7) -= 4; x_put_long (m68k_areg (regs, 7), newpc); m68k_areg (regs, 7) -= 2; - x_put_long (m68k_areg (regs, 7), regs.sr); + x_put_word (m68k_areg (regs, 7), regs.sr); write_log (_T("68040/060 FPU disabled exception OP=%04X EA=%08X PC=%08X\n"), opcode, ea, oldpc); newpc = x_get_long (regs.vbr + 11 * 4); m68k_setpc (newpc); diff --git a/gayle.cpp b/gayle.cpp index 441a341c..cfbb68be 100644 --- a/gayle.cpp +++ b/gayle.cpp @@ -869,8 +869,13 @@ static void do_process_rw_command (struct ide_hdf *ide) ide->data_offset = 0; get_lbachs (ide, &lba, &cyl, &head, &sec, ide->lba48); nsec = get_nsec (ide->lba48); - if (nsec * ide->blocksize > ide->hdhfd.size - lba * ide->blocksize) + if (IDE_LOG > 1) + write_log (_T("IDE%d off=%d, nsec=%d (%d) lba%d\n"), ide->num, (uae_u32)lba, nsec, ide->multiple_mode, ide->lba48 ? 48 : 28); + if (nsec * ide->blocksize > ide->hdhfd.size - lba * ide->blocksize) { nsec = (ide->hdhfd.size - lba * ide->blocksize) / ide->blocksize; + if (IDE_LOG > 1) + write_log (_T("IDE%d nsec changed to %d\n"), ide->num, nsec); + } if (nsec <= 0) { ide_data_ready (); ide_fail_err (IDE_ERR_IDNF); @@ -896,9 +901,6 @@ static void do_process_rw_command (struct ide_hdf *ide) if (IDE_LOG > 1) write_log (_T("IDE%d write finished\n"), ide->num); ide->regs.ide_status &= ~IDE_STATUS_DRQ; - } else { - if (IDE_LOG > 1) - write_log (_T("IDE%d read finished\n"), ide->num); } } ide->irq_delay = 1; @@ -919,8 +921,6 @@ static void ide_read_sectors (int flags) gui_flicker_led (LED_HD, ide->num, 1); nsec = get_nsec (lba48); get_lbachs (ide, &lba, &cyl, &head, &sec, lba48); - if (IDE_LOG > 0) - write_log (_T("IDE%d read off=%d, sec=%d (%d) lba%d\n"), ide->num, (uae_u32)lba, nsec, ide->multiple_mode, lba48 ? 48 : 28); if (lba * ide->blocksize >= ide->hdhfd.size) { ide_data_ready (); ide_fail_err (IDE_ERR_IDNF); diff --git a/gencpu.cpp b/gencpu.cpp index d422d3d4..c2f89437 100644 --- a/gencpu.cpp +++ b/gencpu.cpp @@ -133,7 +133,7 @@ static int endlabelno = 0; static int need_endlabel; static int n_braces, limit_braces; -static int m68k_pc_offset; +static int m68k_pc_offset, m68k_pc_offset_old; static int insn_n_cycles, insn_n_cycles020; static int ir2irc; @@ -488,12 +488,19 @@ static void incpc (const char *format, ...) static void sync_m68k_pc (void) { + m68k_pc_offset_old = m68k_pc_offset; if (m68k_pc_offset == 0) return; incpc ("%d", m68k_pc_offset); m68k_pc_offset = 0; } +static void sync_m68k_pc_noreset (void) +{ + sync_m68k_pc (); + m68k_pc_offset = m68k_pc_offset_old; +} + static void addmmufixup (char *reg) { if (!using_mmu) @@ -1741,7 +1748,7 @@ static void resetvars (void) srcb = "x_get_byte"; dstb = "x_put_byte"; do_cycles = "do_cycles_ce000"; - } else if (using_ce020) { + } else if (using_ce020 == 1) { /* x_ not used if it redirects to * get_word_ce020_prefetch() */ @@ -1760,6 +1767,21 @@ static void resetvars (void) do_cycles = "do_cycles_ce020"; nextw = "next_iword_020ce"; nextl = "next_ilong_020ce"; + } else if (using_ce020 == 2) { + // 68030/40/60 CE + prefetch_long = "get_long_ce030_prefetch"; + prefetch_word = "get_word_ce030_prefetch"; + srcli = "x_get_ilong"; + srcwi = "x_get_iword"; + srcbi = "x_get_ibyte"; + srcl = "x_get_long"; + dstl = "x_put_long"; + srcw = "x_get_word"; + dstw = "x_put_word"; + srcb = "x_get_byte"; + dstb = "x_put_byte"; + nextw = "next_iword_030ce"; + nextl = "next_ilong_030ce"; } else if (using_prefetch_020) { prefetch_word = "get_word_020_prefetch"; prefetch_long = "get_long_020_prefetch"; @@ -1775,12 +1797,12 @@ static void resetvars (void) nextw = "next_iword_020"; nextl = "next_ilong_020"; } - +#if 0 } else if (using_ce020) { disp020 = "x_get_disp_ea_020"; do_cycles = "do_cycles_ce020"; if (using_ce020 == 2) { - // 68030 CE + // 68030/40/60 CE prefetch_long = "get_long_ce030_prefetch"; prefetch_word = "get_word_ce030_prefetch"; nextw = "next_iword_030ce"; @@ -1808,6 +1830,7 @@ static void resetvars (void) srcb = "get_byte_ce020"; dstb = "put_byte_ce020"; } +#endif } else if (using_mmu == 68030) { // 68030 MMU disp020 = "get_disp_ea_020_mmu030"; @@ -3514,7 +3537,8 @@ static void gen_opcode (unsigned long int opcode) } if (curi->dmode == Aipi || curi->dmode == Apdi) printf ("\t\tm68k_areg (regs, dstreg) %c= %d;\n", curi->dmode == Aipi ? '-' : '+', 1 << curi->size); - printf ("\t\top_unimpl ();\n"); + sync_m68k_pc_noreset (); + printf ("\t\top_unimpl (opcode);\n"); printf ("\t\tgoto %s;\n", endlabelstr); printf ("\t}\n"); need_endlabel = 1; @@ -4323,7 +4347,7 @@ static void generate_cpu (int id, int mode) read_counts (); for (rp = 0; rp < nr_cpuop_funcs; rp++) opcode_next_clev[rp] = cpu_level; - } else if (id == 22 || id == 23 || id == 24) { // 68030+ "cycle-exact" + } else if (id == 22 || id == 23 || id == 24) { // 68030/040/60 "cycle-exact" cpu_level = 3 + (24 - id); using_ce020 = 2; if (id == 22) { diff --git a/hardfile.cpp b/hardfile.cpp index 209c614a..faac154e 100644 --- a/hardfile.cpp +++ b/hardfile.cpp @@ -1844,16 +1844,6 @@ static uae_u32 hardfile_do_io (struct hardfiledata *hfd, struct hardfileprivdata } break; -bad_command: - error = IOERR_BADADDRESS; - break; -bad_len: - error = IOERR_BADLENGTH; - break; -no_disk: - error = 29; /* no disk */ - break; - case NSCMD_DEVICEQUERY: put_long (dataptr + 0, 0); put_long (dataptr + 4, 16); /* size */ @@ -1960,6 +1950,16 @@ no_disk: } break; +bad_command: + error = IOERR_BADADDRESS; + break; +bad_len: + error = IOERR_BADLENGTH; + break; +no_disk: + error = 29; /* no disk */ + break; + default: /* Command not understood. */ error = IOERR_NOCMD; diff --git a/include/newcpu.h b/include/newcpu.h index 7d3d4129..7605321a 100644 --- a/include/newcpu.h +++ b/include/newcpu.h @@ -66,7 +66,7 @@ struct comptbl { #endif extern uae_u32 REGPARAM3 op_illg (uae_u32) REGPARAM; -extern void REGPARAM3 op_unimpl (void) REGPARAM; +extern void REGPARAM3 op_unimpl (uae_u16) REGPARAM; typedef uae_u8 flagtype; @@ -394,6 +394,7 @@ extern int get_cpu_model (void); extern void REGPARAM3 MakeSR (void) REGPARAM; extern void REGPARAM3 MakeFromSR (void) REGPARAM; extern void REGPARAM3 Exception (int) REGPARAM; +extern void REGPARAM3 Exception (int, uaecptr) REGPARAM; extern void NMI (void); extern void NMI_delayed (void); extern void prepare_interrupt (uae_u32); @@ -432,7 +433,7 @@ extern void fpux_restore (int*); extern void exception3 (uae_u32 opcode, uaecptr addr); extern void exception3i (uae_u32 opcode, uaecptr addr); -extern void exception3 (uae_u32 opcode, uaecptr addr, int w, int i, uaecptr pc); +extern void exception3 (uae_u32 opcode, uaecptr addr, bool w, bool i, uaecptr pc); extern void exception2 (uaecptr addr); extern void cpureset (void); extern void cpu_halt (int id); diff --git a/include/options.h b/include/options.h index 95963404..038ab7c0 100644 --- a/include/options.h +++ b/include/options.h @@ -111,6 +111,11 @@ struct wh { #define UAEDEV_DIR 0 #define UAEDEV_HDF 1 #define UAEDEV_CD 2 + +#define BOOTPRI_NOAUTOBOOT -128 +#define BOOTPRI_NOAUTOMOUNT -129 +#define ISAUTOBOOT(ci) ((ci)->bootpri > BOOTPRI_NOAUTOBOOT) +#define ISAUTOMOUNT(ci) ((ci)->bootpri > BOOTPRI_NOAUTOMOUNT) struct uaedev_config_info { int type; TCHAR devname[MAX_DPATH]; @@ -118,8 +123,6 @@ struct uaedev_config_info { TCHAR rootdir[MAX_DPATH]; bool readonly; int bootpri; - bool autoboot; - bool donotmount; TCHAR filesys[MAX_DPATH]; int lowcyl; int highcyl; // zero if detected from size diff --git a/main.cpp b/main.cpp index 89465bcf..81dc58f9 100644 --- a/main.cpp +++ b/main.cpp @@ -225,6 +225,9 @@ void fixup_cpu (struct uae_prefs *p) break; } + if (p->cpu_model >= 68040 && p->cachesize && p->cpu_compatible) + p->cpu_compatible = false; + if (p->cpu_model < 68030 || p->cachesize) p->mmu_model = 0; diff --git a/newcpu.cpp b/newcpu.cpp index 38fddd64..282f9e26 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -1025,7 +1025,7 @@ static uae_u32 REGPARAM2 op_unimpl_1 (uae_u32 opcode) if ((opcode & 0xf000) == 0xf000 || currprefs.cpu_model < 68060) op_illg (opcode); else - op_unimpl (); + op_unimpl (opcode); return 4; } @@ -2537,6 +2537,8 @@ static void Exception_mmu (int nr, uaecptr oldpc) Exception_build_stack_frame(oldpc, currpc, regs.mmu_ssw, nr, 0x2); } else if (regs.m && nr >= 24 && nr < 32) { /* M + Interrupt */ Exception_build_stack_frame(oldpc, currpc, regs.mmu_ssw, nr, 0x1); + } else if (nr == 61) { + Exception_build_stack_frame(oldpc, regs.instruction_pc, regs.mmu_ssw, nr, 0x0); } else { Exception_build_stack_frame(oldpc, currpc, regs.mmu_ssw, nr, 0x0); } @@ -2751,15 +2753,18 @@ kludge_me_do: exception_trace (nr); } -void REGPARAM2 Exception (int nr) +// address = format $2 stack frame address field +static void ExceptionX (int nr, uaecptr address) { regs.exception = nr; if (cpu_tracer) { cputrace.state = nr; } +#ifdef JIT if (currprefs.cachesize) - regs.instruction_pc = m68k_getpc (); + regs.instruction_pc = address == -1 ? m68k_getpc () : address; +#endif #ifdef CPUEMU_12 if (currprefs.cpu_cycle_exact && currprefs.cpu_model == 68000) Exception_ce000 (nr); @@ -2787,6 +2792,15 @@ void REGPARAM2 Exception (int nr) } } +void REGPARAM2 Exception (int nr) +{ + ExceptionX (nr, -1); +} +void REGPARAM2 Exception (int nr, uaecptr address) +{ + ExceptionX (nr, address); +} + STATIC_INLINE void do_interrupt (int nr) { if (debug_dma) @@ -3010,7 +3024,7 @@ STATIC_INLINE int div_unsigned (uae_u32 src_hi, uae_u32 src_lo, uae_u32 div, uae void m68k_divl (uae_u32 opcode, uae_u32 src, uae_u16 extra) { if ((extra & 0x400) && currprefs.cpu_compatible && currprefs.cpu_model == 68060) { - op_unimpl (); + op_unimpl (opcode); return; } if (src == 0) { @@ -3149,7 +3163,7 @@ STATIC_INLINE void mul_unsigned (uae_u32 src1, uae_u32 src2, uae_u32 *dst_hi, ua void m68k_mull (uae_u32 opcode, uae_u32 src, uae_u16 extra) { if ((extra & 0x400) && currprefs.cpu_compatible && currprefs.cpu_model == 68060) { - op_unimpl (); + op_unimpl (opcode); return; } #if defined (uae_s64) @@ -3331,9 +3345,14 @@ void m68k_reset (int hardreset) fill_prefetch_quick (); } -void REGPARAM2 op_unimpl (void) +void REGPARAM2 op_unimpl (uae_u16 opcode) { - Exception (61); + static int warned; + if (warned < 20) { + write_log (_T("68060 unimplemented opcode %04X, PC=%08x\n"), opcode, regs.instruction_pc); + warned++; + } + Exception (61, regs.instruction_pc); } uae_u32 REGPARAM2 op_illg (uae_u32 opcode) @@ -4186,8 +4205,9 @@ void execute_normal (void) /* Take note: This is the do-it-normal loop */ uae_u16 opcode; + regs.instruction_pc = m68k_getpc (); if (currprefs.cpu_compatible) { - opcode = get_word_020_prefetchf (m68k_getpc ()); + opcode = get_word_020_prefetchf (regs.instruction_pc); } else { opcode = get_iword (0); } @@ -5831,7 +5851,10 @@ static void exception3f (uae_u32 opcode, uaecptr addr, int writeaccess, int inst if (currprefs.cpu_model >= 68040) addr &= ~1; if (currprefs.cpu_model >= 68020) { - last_addr_for_exception_3 = regs.instruction_pc; + if (pc == 0xffffffff) + last_addr_for_exception_3 = regs.instruction_pc; + else + last_addr_for_exception_3 = pc; } else if (pc == 0xffffffff) { last_addr_for_exception_3 = m68k_getpc () + 2; } else { @@ -5855,7 +5878,7 @@ void exception3i (uae_u32 opcode, uaecptr addr) { exception3f (opcode, addr, 0, 1, 0xffffffff); } -void exception3 (uae_u32 opcode, uaecptr addr, int w, int i, uaecptr pc) +void exception3 (uae_u32 opcode, uaecptr addr, bool w, bool i, uaecptr pc) { exception3f (opcode, addr, w, i, pc); } diff --git a/od-win32/direct3d.cpp b/od-win32/direct3d.cpp index 8e8950ed..aee19192 100644 --- a/od-win32/direct3d.cpp +++ b/od-win32/direct3d.cpp @@ -53,13 +53,12 @@ static bool showoverlay = true; struct shaderdata { - int type; // 0 = before , 1 = after, 2 = post + int type; int psPreProcess; LPDIRECT3DTEXTURE9 lpWorkTexture1; LPDIRECT3DTEXTURE9 lpWorkTexture2; LPDIRECT3DTEXTURE9 lpTempTexture; LPD3DXEFFECT pEffect; - D3DXEFFECT_DESC EffectDesc; // Technique stuff D3DXHANDLE m_PreprocessTechnique1EffectHandle; D3DXHANDLE m_PreprocessTechnique2EffectHandle; @@ -317,7 +316,7 @@ static int postEffect_ParseParameters (LPD3DXEFFECTCOMPILER EffectCompiler, LPD3 return true; } -static int psEffect_ParseParameters (LPD3DXEFFECTCOMPILER EffectCompiler, LPD3DXEFFECT effect, struct shaderdata *s) +static int psEffect_ParseParameters (LPD3DXEFFECTCOMPILER EffectCompiler, LPD3DXEFFECT effect, D3DXEFFECT_DESC EffectDesc, struct shaderdata *s) { HRESULT hr = S_OK; // Look at parameters for semantics and annotations that we know how to interpret @@ -328,10 +327,11 @@ static int psEffect_ParseParameters (LPD3DXEFFECTCOMPILER EffectCompiler, LPD3DX LPDIRECT3DBASETEXTURE9 pTex = NULL; UINT iParam, iAnnot; + if(effect == NULL) return 0; - for(iParam = 0; iParam < s->EffectDesc.Parameters; iParam++) { + for(iParam = 0; iParam < EffectDesc.Parameters; iParam++) { LPCSTR pstrName = NULL; LPCSTR pstrFunction = NULL; D3DXHANDLE pstrFunctionHandle = NULL; @@ -786,6 +786,7 @@ static bool psEffect_LoadEffect (const TCHAR *shaderfile, int full, struct shade DWORD compileflags = psEnabled ? 0 : D3DXSHADER_USE_LEGACY_D3DX9_31_DLL; int canusefile = 0, existsfile = 0; bool plugin_path; + D3DXEFFECT_DESC EffectDesc; compileflags |= EFFECTCOMPILERFLAGS; plugin_path = get_plugin_path (tmp, sizeof tmp / sizeof (TCHAR), _T("filtershaders\\direct3d")); @@ -858,13 +859,13 @@ static bool psEffect_LoadEffect (const TCHAR *shaderfile, int full, struct shade write_log (_T("%s: D3DXCreateEffect failed: %s\n"), D3DHEAD, D3DX_ErrorString (hr, Errors)); goto end; } - hr = effect->GetDesc (&s->EffectDesc); + hr = effect->GetDesc (&EffectDesc); if (FAILED (hr)) { write_log (_T("%s: effect->GetDesc() failed: %s\n"), D3DHEAD, D3DX_ErrorString (hr, Errors)); goto end; } if (full) { - if (!psEffect_ParseParameters (EffectCompiler, effect, s)) + if (!psEffect_ParseParameters (EffectCompiler, effect, EffectDesc, s)) goto end; } else { if (!postEffect_ParseParameters (EffectCompiler, effect, s)) @@ -872,7 +873,7 @@ static bool psEffect_LoadEffect (const TCHAR *shaderfile, int full, struct shade } ret = 1; if (plugin_path && filenotificationhandle == NULL) - filenotificationhandle = FindFirstChangeNotification (tmp3, FALSE, FILE_NOTIFY_CHANGE_LAST_WRITE); + filenotificationhandle = FindFirstChangeNotification (tmp3, FALSE, FILE_NOTIFY_CHANGE_LAST_WRITE); end: if (Errors) Errors->Release (); @@ -1163,6 +1164,7 @@ static int createamigatexture (int w, int h) static int createtexture (int ow, int oh, int win_w, int win_h) { HRESULT hr; + bool haveafter = false; int w, h; #if 0 @@ -1186,14 +1188,19 @@ static int createtexture (int ow, int oh, int win_w, int win_h) return 0; } if (shaders[i].type == SHADERTYPE_AFTER) { + haveafter = true; if (!allocextratextures (&shaders[i], window_w, window_h)) return 0; } } } - if (FAILED (hr = d3ddev->CreateTexture (window_w, window_h, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &lpPostTempTexture, NULL))) { - write_log (_T("%s: Failed to create working texture1: %s\n"), D3DHEAD, D3D_ErrorString (hr)); - return 0; + + + if (haveafter) { + if (FAILED (hr = d3ddev->CreateTexture (window_w, window_h, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &lpPostTempTexture, NULL))) { + write_log (_T("%s: Failed to create working texture1: %s\n"), D3DHEAD, D3D_ErrorString (hr)); + return 0; + } } write_log (_T("%s: working texture allocated pre %d*%d, post %d*%d, bits per pixel %d\n"), D3DHEAD, w, h, window_w, window_h, t_depth); texelsize.x = 1.0f / w; texelsize.y = 1.0f / h; texelsize.z = 1; texelsize.w = 1; @@ -1873,6 +1880,25 @@ static void freetextures (void) lpHq2xLookupTexture->Release (); lpHq2xLookupTexture = NULL; } + for (int i = 0; i < MAX_SHADERS; i++) { + struct shaderdata *s = &shaders[i]; + if (s->lpTempTexture) { + s->lpTempTexture->Release (); + s->lpTempTexture = NULL; + } + if (s->lpWorkTexture1) { + s->lpWorkTexture1->Release (); + s->lpWorkTexture1 = NULL; + } + if (s->lpWorkTexture2) { + s->lpWorkTexture2->Release (); + s->lpWorkTexture2 = NULL; + } + } + if (lpPostTempTexture) { + lpPostTempTexture->Release(); + lpPostTempTexture = NULL; + } } static void getswapchain (void) @@ -1887,7 +1913,7 @@ static void getswapchain (void) static void invalidatedeviceobjects (void) { - if (filenotificationhandle != NULL) + if (filenotificationhandle != NULL) FindCloseChangeNotification (filenotificationhandle); filenotificationhandle = NULL; freetextures (); @@ -1928,24 +1954,8 @@ static void invalidatedeviceobjects (void) shaders[i].pEffect->Release (); shaders[i].pEffect = NULL; } - if (shaders[i].lpTempTexture) { - shaders[i].lpTempTexture->Release (); - shaders[i].lpTempTexture = NULL; - } - if (shaders[i].lpWorkTexture1) { - shaders[i].lpWorkTexture1->Release (); - shaders[i].lpWorkTexture1 = NULL; - } - if (shaders[i].lpWorkTexture2) { - shaders[i].lpWorkTexture2->Release (); - shaders[i].lpWorkTexture2 = NULL; - } memset (&shaders[i], 0, sizeof (struct shaderdata)); } - if (lpPostTempTexture) { - lpPostTempTexture->Release(); - lpPostTempTexture = NULL; - } if (d3ddev) d3ddev->SetStreamSource (0, NULL, 0, 0); if (vertexBuffer) { @@ -2062,7 +2072,7 @@ static void D3D_free2 (void) d3d = NULL; } d3d_enabled = 0; - psActive = 0; + psActive = FALSE; resetcount = 0; devicelost = 0; renderdisabled = false; diff --git a/od-win32/fsdb_mywin32.cpp b/od-win32/fsdb_mywin32.cpp index c744c885..c60f90a1 100644 --- a/od-win32/fsdb_mywin32.cpp +++ b/od-win32/fsdb_mywin32.cpp @@ -509,14 +509,10 @@ int dos_errno (void) } } -typedef BOOL (CALLBACK* GETVOLUMEPATHNAME) - (LPCTSTR lpszFileName, LPTSTR lpszVolumePathName, DWORD cchBufferLength); - int my_getvolumeinfo (const TCHAR *root) { DWORD v, err; int ret = 0; - GETVOLUMEPATHNAME pGetVolumePathName; TCHAR volume[MAX_DPATH]; v = GetFileAttributesSafe (root); @@ -529,13 +525,11 @@ int my_getvolumeinfo (const TCHAR *root) if (v & FILE_ATTRIBUTE_READONLY) ret |= MYVOLUMEINFO_READONLY; */ - pGetVolumePathName = (GETVOLUMEPATHNAME)GetProcAddress( - GetModuleHandle (_T("kernel32.dll")), "GetVolumePathNameW"); - if (pGetVolumePathName && pGetVolumePathName (root, volume, sizeof (volume))) { + if (GetVolumePathName (root, volume, sizeof (volume))) { TCHAR fsname[MAX_DPATH]; DWORD comlen; DWORD flags; - if (GetVolumeInformation (volume, NULL, 0, NULL, &comlen, &flags, fsname, sizeof (fsname))) { + if (GetVolumeInformation (volume, NULL, 0, NULL, &comlen, &flags, fsname, sizeof fsname / sizeof (TCHAR))) { //write_log (_T("Volume %s FS=%s maxlen=%d flags=%08X\n"), volume, fsname, comlen, flags); if (flags & FILE_NAMED_STREAMS) ret |= MYVOLUMEINFO_STREAMS; @@ -564,6 +558,36 @@ FILE *my_opentext (const TCHAR *name) return _tfopen (name, _T("r")); } +typedef BOOL (CALLBACK* GETVOLUMEINFORMATIONBYHANDLEW) + (_In_ HANDLE hFile, + LPWSTR lpVolumeNameBuffer, + DWORD nVolumeNameSize, + LPDWORD lpVolumeSerialNumber, + LPDWORD lpMaximumComponentLength, + LPDWORD lpFileSystemFlags, + LPWSTR lpFileSystemNameBuffer, + DWORD nFileSystemNameSize); + + +static bool isfat (HANDLE h) +{ + TCHAR fsname[MAX_DPATH]; + DWORD comlen; + DWORD flags; + GETVOLUMEINFORMATIONBYHANDLEW pGetVolumeInformationByHandleW; + + pGetVolumeInformationByHandleW = (GETVOLUMEINFORMATIONBYHANDLEW)GetProcAddress( + GetModuleHandle (_T("kernel32.dll")), "GetVolumeInformationByHandleW"); + if (!pGetVolumeInformationByHandleW) + return false; + if (pGetVolumeInformationByHandleW (h, NULL, NULL, NULL, &comlen, &flags, fsname, sizeof fsname / sizeof (TCHAR))) { + if (!_tcsncmp (fsname, _T("FAT"), 3)) { + return true; + } + } + return false; +} + bool my_stat (const TCHAR *name, struct mystat *statbuf) { DWORD attr, ok; @@ -571,8 +595,9 @@ bool my_stat (const TCHAR *name, struct mystat *statbuf) HANDLE h; BY_HANDLE_FILE_INFORMATION fi; const TCHAR *namep; + bool fat; TCHAR path[MAX_DPATH]; - + if (currprefs.win32_filesystem_mangle_reserved_names == false) { _tcscpy (path, PATHPREFIX); _tcscat (path, name); @@ -585,6 +610,8 @@ bool my_stat (const TCHAR *name, struct mystat *statbuf) h = CreateFile (namep, 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL); if (h == INVALID_HANDLE_VALUE) return false; + fat = isfat (h); + ok = GetFileInformationByHandle (h, &fi); CloseHandle (h); @@ -592,7 +619,25 @@ bool my_stat (const TCHAR *name, struct mystat *statbuf) ft.dwHighDateTime = ft.dwLowDateTime = 0; if (ok) { attr = fi.dwFileAttributes; - ft = fi.ftLastWriteTime; + if (fat) { + // fat lastwritetime only has 2 second resolution + // fat creationtime has 10ms resolution + // use creationtime if creationtime is inside lastwritetime 2s resolution + ULARGE_INTEGER ct, wt; + ct.HighPart = fi.ftCreationTime.dwHighDateTime; + ct.LowPart = fi.ftCreationTime.dwLowDateTime; + wt.HighPart = fi.ftLastWriteTime.dwHighDateTime; + wt.LowPart = fi.ftLastWriteTime.dwLowDateTime; + uae_u64 ctsec = ct.QuadPart / 10000000; + uae_u64 wtsec = wt.QuadPart / 10000000; + if (wtsec == ctsec || wtsec + 1 == ctsec) { + ft = fi.ftCreationTime; + } else { + ft = fi.ftLastAccessTime; + } + } else { + ft = fi.ftLastWriteTime; + } statbuf->size = ((uae_u64)fi.nFileSizeHigh << 32) | fi.nFileSizeLow; } else { write_log (_T("GetFileInformationByHandle(%s) failed: %d\n"), namep, GetLastError ()); diff --git a/od-win32/win32.h b/od-win32/win32.h index 8c14b40e..12d7473b 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -19,11 +19,11 @@ #define LANG_DLL 1 #if WINUAEPUBLICBETA -#define WINUAEBETA _T("6") +#define WINUAEBETA _T("7") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2013, 2, 3) +#define WINUAEDATE MAKEBD(2013, 2, 9) #define WINUAEEXTRA _T("") //#define WINUAEEXTRA _T("AmiKit Preview") #define WINUAEREV _T("") diff --git a/od-win32/win32_filesys.cpp b/od-win32/win32_filesys.cpp index 609ff2e4..0bc0fd18 100644 --- a/od-win32/win32_filesys.cpp +++ b/od-win32/win32_filesys.cpp @@ -194,7 +194,6 @@ void filesys_addexternals (void) #endif ci.readonly = !rw; ci.bootpri = -20 - drvnum; - ci.autoboot = true; //write_log (_T("Drive type %d: '%s' '%s'\n"), drivetype, volumepath, volumename); add_filesys_unit (&ci); drvnum++; diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index 1b8ccae7..42ba4ad7 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -2526,6 +2526,12 @@ static void setDwmEnableMMCSS (bool state) pDwmEnableMMCSS (state); } +static void freesoftbuffer (struct vidbuffer *buf) +{ + xfree (buf->realbufmem); + memset (buf, 0, sizeof (struct vidbuffer)); +} + void close_windows (void) { changevblankthreadmode (VBLANKTH_IDLE); @@ -2535,10 +2541,8 @@ void close_windows (void) #if defined (GFXFILTER) S2X_free (); #endif - xfree (gfxvidinfo.drawbuffer.realbufmem); - xfree (gfxvidinfo.tempbuffer.realbufmem); - memset (&gfxvidinfo.drawbuffer, 0, sizeof (struct vidbuffer)); - memset (&gfxvidinfo.tempbuffer, 0, sizeof (struct vidbuffer)); + freesoftbuffer (&gfxvidinfo.drawbuffer); + freesoftbuffer (&gfxvidinfo.tempbuffer); DirectDraw_Release (); close_hwnds (); } @@ -3907,7 +3911,7 @@ static void allocsoftbuffer (const TCHAR *name, struct vidbuffer *buf, int flags buf->bufmemend = buf->realbufmem + size - buf->rowbytes; buf->bufmem_lockable = true; - write_log (_T("Allocated %s temp buffer (%d*%d*%d)\n"), name, width, height, depth); + write_log (_T("Allocated %s temp buffer (%d*%d*%d) = %p\n"), name, width, height, depth, buf->realbufmem); } } @@ -4051,7 +4055,8 @@ static BOOL doInit (void) #endif gfxvidinfo.drawbuffer.emergmem = scrlinebuf; // memcpy from system-memory to video-memory - xfree (gfxvidinfo.drawbuffer.realbufmem); + freesoftbuffer (&gfxvidinfo.drawbuffer); + freesoftbuffer (&gfxvidinfo.tempbuffer); gfxvidinfo.drawbuffer.realbufmem = NULL; gfxvidinfo.drawbuffer.bufmem = NULL; gfxvidinfo.drawbuffer.bufmem_allocated = NULL; diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index ccdbc551..bc6cba8b 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -9214,7 +9214,6 @@ static int archivehd; static void default_fsvdlg (struct fsvdlg_vals *f) { memset (f, 0, sizeof (struct fsvdlg_vals)); - f->ci.autoboot = true; f->ci.type = UAEDEV_DIR; } static void default_hfdlg (struct hfdlg_vals *f, bool rdb) @@ -9294,12 +9293,11 @@ static INT_PTR CALLBACK VolumeSettingsProc (HWND hDlg, UINT msg, WPARAM wParam, SetDlgItemText (hDlg, IDC_VOLUME_NAME, current_fsvdlg.ci.volname); SetDlgItemText (hDlg, IDC_VOLUME_DEVICE, current_fsvdlg.ci.devname); SetDlgItemText (hDlg, IDC_PATH_NAME, current_fsvdlg.ci.rootdir); - SetDlgItemInt (hDlg, IDC_VOLUME_BOOTPRI, current_fsvdlg.ci.bootpri >= -127 ? current_fsvdlg.ci.bootpri : -127, TRUE); + SetDlgItemInt (hDlg, IDC_VOLUME_BOOTPRI, current_fsvdlg.ci.bootpri, TRUE); if (archivehd > 0) current_fsvdlg.ci.readonly = true; CheckDlgButton (hDlg, IDC_FS_RW, !current_fsvdlg.ci.readonly); - CheckDlgButton (hDlg, IDC_FS_AUTOBOOT, current_fsvdlg.ci.autoboot); - current_fsvdlg.ci.donotmount = 0; + CheckDlgButton (hDlg, IDC_FS_AUTOBOOT, ISAUTOBOOT(¤t_fsvdlg.ci)); ew (hDlg, IDC_FS_RW, archivehd <= 0); recursive--; } @@ -9356,7 +9354,14 @@ static INT_PTR CALLBACK VolumeSettingsProc (HWND hDlg, UINT msg, WPARAM wParam, GetDlgItemText (hDlg, IDC_VOLUME_DEVICE, current_fsvdlg.ci.devname, sizeof current_fsvdlg.ci.devname / sizeof (TCHAR)); current_fsvdlg.ci.readonly = !ischecked (hDlg, IDC_FS_RW); current_fsvdlg.ci.bootpri = GetDlgItemInt (hDlg, IDC_VOLUME_BOOTPRI, NULL, TRUE); - current_fsvdlg.ci.autoboot = ischecked (hDlg, IDC_FS_AUTOBOOT); + if(LOWORD (wParam) == IDC_FS_AUTOBOOT) { + if (!ischecked (hDlg, IDC_FS_AUTOBOOT)) { + current_fsvdlg.ci.bootpri = BOOTPRI_NOAUTOBOOT; + } else { + current_fsvdlg.ci.bootpri = 0; + } + SetDlgItemInt (hDlg, IDC_VOLUME_BOOTPRI, current_fsvdlg.ci.bootpri, TRUE); + } recursive--; break; } @@ -9379,10 +9384,10 @@ static void sethardfile (HWND hDlg) SetDlgItemInt (hDlg, IDC_HEADS, current_hfdlg.ci.surfaces, FALSE); SetDlgItemInt (hDlg, IDC_RESERVED, current_hfdlg.ci.reserved, FALSE); SetDlgItemInt (hDlg, IDC_BLOCKSIZE, current_hfdlg.ci.blocksize, FALSE); - SetDlgItemInt (hDlg, IDC_HARDFILE_BOOTPRI, current_hfdlg.ci.bootpri >= -127 ? current_hfdlg.ci.bootpri : -127, TRUE); + SetDlgItemInt (hDlg, IDC_HARDFILE_BOOTPRI, current_hfdlg.ci.bootpri, TRUE); CheckDlgButton (hDlg, IDC_HDF_RW, !current_hfdlg.ci.readonly); - CheckDlgButton (hDlg, IDC_HDF_AUTOBOOT, current_hfdlg.ci.autoboot); - CheckDlgButton (hDlg, IDC_HDF_DONOTMOUNT, current_hfdlg.ci.donotmount); + CheckDlgButton (hDlg, IDC_HDF_AUTOBOOT, ISAUTOBOOT(¤t_hfdlg.ci)); + CheckDlgButton (hDlg, IDC_HDF_DONOTMOUNT, !ISAUTOMOUNT(¤t_hfdlg.ci)); ew (hDlg, IDC_HDF_RDB, !rdb); ew (hDlg, IDC_HDF_AUTOBOOT, TRUE); ew (hDlg, IDC_HDF_DONOTMOUNT, TRUE); @@ -9470,8 +9475,6 @@ static void hardfile_testrdb (HWND hDlg, struct hfdlg_vals *hdf) hdf->ci.reserved = 0; hdf->ci.filesys[0] = 0; hdf->ci.bootpri = 0; - hdf->ci.autoboot = 1; - hdf->ci.donotmount = 0; hdf->ci.devname[0] = 0; break; } @@ -9738,9 +9741,7 @@ static INT_PTR CALLBACK HardfileSettingsProc (HWND hDlg, UINT msg, WPARAM wParam #endif _tcscpy (fs, current_hfdlg.ci.filesys); _tcscpy (dev, current_hfdlg.ci.devname); - bool autoboot = current_hfdlg.ci.autoboot; bool rw = current_hfdlg.ci.readonly; - bool donot = current_hfdlg.ci.donotmount; int bootpri = current_hfdlg.ci.bootpri; hdctrlr = current_hfdlg.ci.controller; default_hfdlg (¤t_hfdlg, false); @@ -9748,9 +9749,7 @@ static INT_PTR CALLBACK HardfileSettingsProc (HWND hDlg, UINT msg, WPARAM wParam _tcscpy (current_hfdlg.ci.devname, dev); current_hfdlg.ci.controller = hdctrlr; current_hfdlg.ci.bootpri = bootpri; - current_hfdlg.ci.autoboot = autoboot; current_hfdlg.ci.readonly = rw; - current_hfdlg.ci.donotmount = donot; hardfileselecthdf (hDlg, NULL); #if 0 if (oldsize > 0 && oldsize == current_hfdlg.size) { @@ -9788,18 +9787,23 @@ static INT_PTR CALLBACK HardfileSettingsProc (HWND hDlg, UINT msg, WPARAM wParam current_hfdlg.ci.readonly = !ischecked (hDlg, IDC_HDF_RW); break; case IDC_HDF_AUTOBOOT: - current_hfdlg.ci.autoboot = ischecked (hDlg, IDC_HDF_AUTOBOOT); - if (current_hfdlg.ci.autoboot && current_hfdlg.ci.donotmount) { - current_hfdlg.ci.donotmount = false; + if (ischecked (hDlg, IDC_HDF_AUTOBOOT)) { + current_hfdlg.ci.bootpri = 0; setchecked (hDlg, IDC_HDF_DONOTMOUNT, false); + } else { + current_hfdlg.ci.bootpri = BOOTPRI_NOAUTOBOOT; } + SetDlgItemInt (hDlg, IDC_HARDFILE_BOOTPRI, current_hfdlg.ci.bootpri, TRUE); break; case IDC_HDF_DONOTMOUNT: - current_hfdlg.ci.donotmount = ischecked (hDlg, IDC_HDF_DONOTMOUNT); - if (current_hfdlg.ci.donotmount && current_hfdlg.ci.autoboot) { - current_hfdlg.ci.autoboot = false; + if (ischecked (hDlg, IDC_HDF_DONOTMOUNT)) { + current_hfdlg.ci.bootpri = BOOTPRI_NOAUTOMOUNT; setchecked (hDlg, IDC_HDF_AUTOBOOT, false); + } else { + current_hfdlg.ci.bootpri = BOOTPRI_NOAUTOBOOT; + setchecked (hDlg, IDC_HDF_AUTOBOOT, true); } + SetDlgItemInt (hDlg, IDC_HARDFILE_BOOTPRI, current_hfdlg.ci.bootpri, TRUE); break; case IDC_HDF_RDB: SetDlgItemInt (hDlg, IDC_SECTORS, 0, FALSE); @@ -9809,8 +9813,6 @@ static INT_PTR CALLBACK HardfileSettingsProc (HWND hDlg, UINT msg, WPARAM wParam SetDlgItemText (hDlg, IDC_HARDFILE_DEVICE, _T("")); current_hfdlg.ci.sectors = current_hfdlg.ci.reserved = current_hfdlg.ci.surfaces = 0; current_hfdlg.ci.bootpri = 0; - current_hfdlg.ci.autoboot = true; - current_hfdlg.ci.donotmount = false; sethardfile (hDlg); break; case IDC_SECTORS: @@ -9973,24 +9975,11 @@ static INT_PTR CALLBACK HarddriveSettingsProc (HWND hDlg, UINT msg, WPARAM wPara return FALSE; } -static int tweakbootpri (int bp, int ab, int dnm) -{ - if (dnm) - return -129; - if (!ab) - return -128; - if (bp < -127) - bp = -127; - return bp; -} - static void new_filesys (HWND hDlg, int entry) { struct uaedev_config_data *uci; struct uaedev_config_info ci; - int bp = tweakbootpri (current_fsvdlg.ci.bootpri, current_fsvdlg.ci.autoboot, current_fsvdlg.ci.donotmount); memcpy (&ci, ¤t_fsvdlg.ci, sizeof (struct uaedev_config_info)); - ci.bootpri = bp; uci = add_filesys_config (&workprefs, entry, &ci); if (uci) { if (uci->ci.rootdir[0]) @@ -10015,9 +10004,7 @@ static void new_hardfile (HWND hDlg, int entry) { struct uaedev_config_data *uci; struct uaedev_config_info ci; - int bp = tweakbootpri (current_hfdlg.ci.bootpri, current_hfdlg.ci.autoboot, current_hfdlg.ci.donotmount); memcpy (&ci, ¤t_hfdlg.ci, sizeof (struct uaedev_config_info)); - ci.bootpri = bp; uci = add_filesys_config (&workprefs, entry, &ci); if (uci) { struct hardfiledata *hfd = get_hardfile_data (uci->configoffset); diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 6ee4bbf2..bdab471c 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,11 +1,26 @@ - restore only single input target to default. -MMU emulation is now considered mostly done. Some minor bugs probably still exist but Amix, NetBSD, Debian -Linux, Enforcer and WHDLoad MMU option seem to work fine. +Beta 7: + +- In JIT mode format 2 stack frames had wrong address field contents, this also broke 68060 unimplemented integer + instruction exceptions (64-bit variants of DIVL and MULL). +- GUI boot priority/autoboot/automount handling fixed and simplified. +- 68030 "cycle-exact" mode used 020 instruction cache emulation code. No guarantees that this fixes all 68030 "CE" problems. +- D3D texture memory leak fixed (b6) +- A2024/Graffiti extra display buffer memory leak fixed. +- 1/50s file modification date also supported on FAT volumes. Returns FAT file creation date (which has 10ms resolution, + file modification date only has 2s resolution) if it is inside file modifcation date's 2s resolution. +- 68040+ "no FPU" exception stack frame still had incorrect data. +- Disable 68040/060 CPU "More compatible" option if JIT is enabled. JIT active and not emulating unimplemented + instructions isn't safe because JIT and normal emulation does not always agree which instructions are supported. +- A2065 emulation tweak, Ethernet chip documentation STOP/STRT/INIT bit documentation is not very clear. Beta 6: +MMU emulation is now considered mostly done. Some minor bugs probably still exist but Amix, NetBSD, Debian +Linux, Enforcer and WHDLoad MMU option seem to work fine. + - SCSI and IDE emulation HD and CD read and write commands are now executed in background thread, slow devices (for example real optical drive) won't temporarily pause the emulation anymore. - ATAPI CD emulation didn't support split data transfers. Fixes NetBSD installer unpack error.