maxvpos_display = maxvpos;
equ_vblank_endline = -1;
doublescan = htotal <= 164 && vtotal >= 350 ? 1 : 0;
+ // if superhires and wide enough: not doublescan
+ if (doublescan && htotal >= 140 && (bplcon0 & 0x0040))
+ doublescan = 0;
programmedmode = true;
varsync_changed = true;
vpos_count = maxvpos_nom;
}
static void SPRxDATB (int hpos, uae_u16 v, int num)
{
- int hp = hpos == 0 ? 0 : hpos - 1;
+ int hp = hpos;
decide_sprites (hp);
SPRxDATB_1 (v, num, hp);
}
graphics_reset();
}
int newres = largest_res;
- if (htotal < 200)
+ if (htotal < 190)
newres = largest_res + 1;
if (newres < RES_HIRES)
newres = RES_HIRES;
newres = RES_MAX;
if (changed_prefs.gfx_resolution != newres) {
autoswitch_old_resolution = RES_HIRES;
+ write_log(_T("Programmed mode autores = %d -> %d (%d)\n"), changed_prefs.gfx_resolution, newres, largest_res);
changed_prefs.gfx_resolution = newres;
- write_log(_T("NEWRES = %d\n"), newres);
}
} else if (autoswitch_old_resolution == 1) {
changed_prefs.gfx_resolution = RES_HIRES;
#endif
}
+#if 0
+static void normalize(uae_u32 *pwrd1, uae_u32 *pwrd2, uae_u32 *pwrd3)
+{
+ uae_u32 wrd1 = *pwrd1;
+ uae_u32 wrd2 = *pwrd2;
+ uae_u32 wrd3 = *pwrd3;
+ int exp = (wrd1 >> 16) & 0x7fff;
+ // Normalize if unnormal.
+ if (exp != 0 && exp != 0x7fff && !(wrd2 & 0x80000000)) {
+ while (!(wrd2 & 0x80000000) && (wrd2 || wrd3)) {
+ wrd2 <<= 1;
+ if (wrd3 & 0x80000000)
+ wrd2 |= 1;
+ wrd3 <<= 1;
+ exp--;
+ }
+ if (exp < 0)
+ exp = 0;
+ if (!wrd2 && !wrd3)
+ exp = 0;
+ *pwrd1 = (wrd1 & 0x80000000) | (exp << 16);
+ *pwrd2 = wrd2;
+ *pwrd3 = wrd3;
+ }
+}
+#endif
+
bool fpu_get_constant(fpdata *fp, int cr)
{
fptype f;
if (dstptr)
dstbak = dst = dstptr;
else
- dstbak = dst = xmalloc (uae_u8, 4+4+8*10+4+4+4+4+4);
+ dstbak = dst = xmalloc (uae_u8, 4+4+8*10+4+4+4+4+4+2*10+3*(4+2));
save_u32 (currprefs.fpu_model);
save_u32 (0x80000000 | 0x40000000 | (regs.fpu_state == 0 ? 1 : 0) | (regs.fpu_exp_state ? 2 : 0) | (regs.fpu_exp_state > 1 ? 4 : 0));
for (i = 0; i < 8; i++) {
getpc = "m68k_getpci ()";
} else {
// generic
- prefetch_long = "get_ilong";
- prefetch_word = "get_iword";
- nextw = "next_iword";
- nextl = "next_ilong";
- srcli = "get_ilong";
- srcwi = "get_iword";
- srcbi = "get_ibyte";
+ prefetch_long = "get_dilong";
+ prefetch_word = "get_diword";
+ nextw = "next_diword";
+ nextl = "next_dilong";
+ srcli = "get_dilong";
+ srcwi = "get_diword";
+ srcbi = "get_dibyte";
srcl = "get_long";
dstl = "put_long";
srcw = "get_word";
scsi_log (_T("RD:"));
i = 0;
while (i < reply_len) {
- if (i < 24)
+ if (i < 24) {
scsi_log (_T("%02X%c"), reply[i], i < reply_len - 1 ? '.' : ' ');
+ }
put_byte (scsi_data + i, reply[i]);
i++;
}
i++;
}
i = release_async_request (hfpd, request);
- if (i >= 0)
+ if (i >= 0) {
hf_log (_T("asyncronous request=%08X aborted, error=%d\n"), request, errcode);
+ }
}
static void *hardfile_thread (void *devs);
canquick = hardfile_canquick (hfd, request);
if (((flags & 1) && canquick) || (canquick < 0)) {
hf_log (_T("hf quickio unit=%d request=%p cmd=%d\n"), unit, request, cmd);
- if (hardfile_do_io (hfd, hfpd, request))
+ if (hardfile_do_io(hfd, hfpd, request)) {
hf_log2 (_T("uaehf.device cmd %d bug with IO_QUICK\n"), cmd);
+ }
if (!(flags & 1))
uae_ReplyMsg (request);
return get_byte (request + 31);
#define m68k_dreg(r,num) ((r).regs[(num)])
#define m68k_areg(r,num) (((r).regs + 8)[(num)])
-STATIC_INLINE void m68k_setpc (uaecptr newpc)
+
+/* direct (regs.pc_p) access */
+
+STATIC_INLINE void m68k_setpc(uaecptr newpc)
{
- regs.pc_p = regs.pc_oldp = get_real_address (newpc);
+ regs.pc_p = regs.pc_oldp = get_real_address(newpc);
regs.instruction_pc = regs.pc = newpc;
}
-
-STATIC_INLINE uaecptr m68k_getpc (void)
+STATIC_INLINE uaecptr m68k_getpc(void)
{
return (uaecptr)(regs.pc + ((uae_u8*)regs.pc_p - (uae_u8*)regs.pc_oldp));
}
#define M68K_GETPC m68k_getpc()
-
-STATIC_INLINE uaecptr m68k_getpc_p (uae_u8 *p)
+STATIC_INLINE uaecptr m68k_getpc_p(uae_u8 *p)
{
return (uaecptr)(regs.pc + ((uae_u8*)p - (uae_u8*)regs.pc_oldp));
}
-
-STATIC_INLINE void m68k_incpc (int o)
+STATIC_INLINE void m68k_incpc(int o)
{
regs.pc_p += o;
}
-STATIC_INLINE void m68k_setpci (uaecptr newpc)
+STATIC_INLINE uae_u32 get_dibyte(int o)
{
- regs.instruction_pc = regs.pc = newpc;
+ return do_get_mem_byte((uae_u8 *)((regs).pc_p + (o) + 1));
}
-STATIC_INLINE uaecptr m68k_getpci (void)
+STATIC_INLINE uae_u32 get_diword(int o)
{
- return regs.pc;
+ return do_get_mem_word((uae_u16 *)((regs).pc_p + (o)));
}
-STATIC_INLINE void m68k_incpci (int o)
+STATIC_INLINE uae_u32 get_dilong(int o)
{
- regs.pc += o;
+ return do_get_mem_long((uae_u32 *)((regs).pc_p + (o)));
}
-
-STATIC_INLINE void m68k_incpc_normal (int o)
+STATIC_INLINE uae_u32 next_diword(void)
{
- if (m68k_pc_indirect)
- m68k_incpci(o);
- else
- m68k_incpc (o);
+ uae_u32 r = do_get_mem_word((uae_u16 *)((regs).pc_p));
+ m68k_incpc(2);
+ return r;
}
-
-STATIC_INLINE void m68k_setpc_normal (uaecptr pc)
+STATIC_INLINE uae_u32 next_dilong(void)
{
- if (m68k_pc_indirect) {
- regs.pc_p = regs.pc_oldp = 0;
- m68k_setpci(pc);
- } else {
- m68k_setpc(pc);
- }
+ uae_u32 r = do_get_mem_long((uae_u32 *)((regs).pc_p));
+ m68k_incpc(4);
+ return r;
}
-STATIC_INLINE void m68k_do_rts (void)
+STATIC_INLINE void m68k_do_bsr(uaecptr oldpc, uae_s32 offset)
{
- uae_u32 newpc = get_long (m68k_areg (regs, 7));
- m68k_setpc (newpc);
- m68k_areg (regs, 7) += 4;
+ m68k_areg(regs, 7) -= 4;
+ put_long(m68k_areg(regs, 7), oldpc);
+ m68k_incpc(offset);
}
-
-STATIC_INLINE void m68k_do_rtsi (void)
+STATIC_INLINE void m68k_do_rts(void)
{
- uae_u32 newpc = get_long (m68k_areg (regs, 7));
- m68k_setpci (newpc);
- m68k_areg (regs, 7) += 4;
+ uae_u32 newpc = get_long(m68k_areg(regs, 7));
+ m68k_setpc(newpc);
+ m68k_areg(regs, 7) += 4;
}
-STATIC_INLINE void m68k_do_bsr (uaecptr oldpc, uae_s32 offset)
+/* indirect (regs.pc) access */
+
+STATIC_INLINE void m68k_setpci(uaecptr newpc)
{
- m68k_areg (regs, 7) -= 4;
- put_long (m68k_areg (regs, 7), oldpc);
- m68k_incpc (offset);
+ regs.instruction_pc = regs.pc = newpc;
}
-
-STATIC_INLINE void m68k_do_bsri (uaecptr oldpc, uae_s32 offset)
+STATIC_INLINE uaecptr m68k_getpci(void)
+{
+ return regs.pc;
+}
+STATIC_INLINE void m68k_incpci(int o)
{
- m68k_areg (regs, 7) -= 4;
- put_long (m68k_areg (regs, 7), oldpc);
- m68k_incpci (offset);
+ regs.pc += o;
}
-STATIC_INLINE uae_u32 get_ibyte (int o)
+STATIC_INLINE uae_u32 get_iibyte(int o)
{
- return do_get_mem_byte((uae_u8 *)((regs).pc_p + (o) + 1));
+ return get_wordi(m68k_getpci() + (o) + 1);
}
-STATIC_INLINE uae_u32 get_iword (int o)
+STATIC_INLINE uae_u32 get_iiword(int o)
{
- return do_get_mem_word((uae_u16 *)((regs).pc_p + (o)));
+ return get_wordi(m68k_getpci() + (o));
}
-STATIC_INLINE uae_u32 get_ilong (int o)
+STATIC_INLINE uae_u32 get_iilong(int o)
{
- return do_get_mem_long((uae_u32 *)((regs).pc_p + (o)));
+ return get_longi(m68k_getpci () + (o));
}
-#define get_iwordi(o) get_wordi(o)
-#define get_ilongi(o) get_longi(o)
-
-/* These are only used by the 68020/68881 code, and therefore don't
-* need to handle prefetch. */
-STATIC_INLINE uae_u32 next_ibyte (void)
+STATIC_INLINE uae_u32 next_iibyte (void)
{
- uae_u32 r = get_ibyte (0);
- m68k_incpc (2);
+ uae_u32 r = get_iibyte (0);
+ m68k_incpci (2);
return r;
}
-STATIC_INLINE uae_u32 next_iword (void)
+STATIC_INLINE uae_u32 next_iiword (void)
{
- uae_u32 r = get_iword (0);
- m68k_incpc (2);
+ uae_u32 r = get_iiword (0);
+ m68k_incpci (2);
return r;
}
-STATIC_INLINE uae_u32 next_iwordi (void)
+STATIC_INLINE uae_u32 next_iiwordi (void)
{
- uae_u32 r = get_iwordi (m68k_getpci ());
- m68k_incpc (2);
+ uae_u32 r = get_wordi(m68k_getpci());
+ m68k_incpci (2);
return r;
}
-STATIC_INLINE uae_u32 next_ilong (void)
+STATIC_INLINE uae_u32 next_iilong (void)
{
- uae_u32 r = get_ilong (0);
- m68k_incpc (4);
+ uae_u32 r = get_iilong(0);
+ m68k_incpci (4);
return r;
}
-STATIC_INLINE uae_u32 next_ilongi (void)
+STATIC_INLINE uae_u32 next_iilongi (void)
{
- uae_u32 r = get_ilongi (m68k_getpci ());
- m68k_incpc (4);
+ uae_u32 r = get_longi (m68k_getpci ());
+ m68k_incpci (4);
return r;
}
+STATIC_INLINE void m68k_do_bsri(uaecptr oldpc, uae_s32 offset)
+{
+ m68k_areg(regs, 7) -= 4;
+ put_long(m68k_areg(regs, 7), oldpc);
+ m68k_incpci(offset);
+}
+STATIC_INLINE void m68k_do_rtsi(void)
+{
+ uae_u32 newpc = get_long(m68k_areg(regs, 7));
+ m68k_setpci(newpc);
+ m68k_areg(regs, 7) += 4;
+}
+
+/* common access */
+
+STATIC_INLINE void m68k_incpc_normal(int o)
+{
+ if (m68k_pc_indirect)
+ m68k_incpci(o);
+ else
+ m68k_incpc(o);
+}
+
+STATIC_INLINE void m68k_setpc_normal(uaecptr pc)
+{
+ if (m68k_pc_indirect) {
+ regs.pc_p = regs.pc_oldp = 0;
+ m68k_setpci(pc);
+ }
+ else {
+ m68k_setpc(pc);
+ }
+}
+
extern uae_u32 (*x_prefetch)(int);
extern uae_u32 (*x_get_byte)(uaecptr addr);
extern uae_u32 (*x_get_word)(uaecptr addr);
#define OPTIONS_H
#define UAEMAJOR 2
-#define UAEMINOR 7
-#define UAESUBREV 1
+#define UAEMINOR 8
+#define UAESUBREV 0
typedef enum { KBD_LANG_US, KBD_LANG_DK, KBD_LANG_DE, KBD_LANG_SE, KBD_LANG_FR, KBD_LANG_IT, KBD_LANG_ES } KbdLang;
} else if (currprefs.cpu_compatible) {
x_prefetch = get_word_prefetch;
x_get_ilong = NULL;
- x_get_iword = get_iword;
- x_get_ibyte = get_ibyte;
+ x_get_iword = get_iiword;
+ x_get_ibyte = get_iibyte;
x_next_iword = NULL;
x_next_ilong = NULL;
x_put_long = put_long;
x_do_cycles_post = do_cycles_post;
} else {
x_prefetch = NULL;
- x_get_ilong = get_ilong;
- x_get_iword = get_iword;
- x_get_ibyte = get_ibyte;
- x_next_iword = next_iword;
- x_next_ilong = next_ilong;
+ x_get_ilong = get_iilong;
+ x_get_iword = get_iiword;
+ x_get_ibyte = get_iibyte;
+ x_next_iword = next_iiword;
+ x_next_ilong = next_iilong;
x_put_long = put_long;
x_put_word = put_word;
x_put_byte = put_byte;
} else {
// JIT or 68030+ does not have real prefetch only emulation
x_prefetch = NULL;
- x_get_ilong = get_ilong;
- x_get_iword = get_iword;
- x_get_ibyte = get_ibyte;
- x_next_iword = next_iword;
- x_next_ilong = next_ilong;
+ x_get_ilong = get_dilong;
+ x_get_iword = get_diword;
+ x_get_ibyte = get_dibyte;
+ x_next_iword = next_diword;
+ x_next_ilong = next_dilong;
x_put_long = put_long;
x_put_word = put_word;
x_put_byte = put_byte;
}
} else {
x_prefetch = NULL;
- x_get_ilong = get_ilong;
- x_get_iword = get_iword;
- x_get_ibyte = get_ibyte;
- x_next_iword = next_iword;
- x_next_ilong = next_ilong;
+ x_get_ilong = get_dilong;
+ x_get_iword = get_diword;
+ x_get_ibyte = get_dibyte;
+ x_next_iword = next_diword;
+ x_next_ilong = next_dilong;
x_put_long = put_long;
x_put_word = put_word;
x_put_byte = put_byte;
write_log (_T("Building CPU, %d opcodes (%d %d %d)\n"),
opcnt, lvl,
currprefs.cpu_cycle_exact ? -1 : currprefs.cpu_compatible ? 1 : 0, currprefs.address_space_24);
- write_log (_T("CPU=%d, FPU=%d, MMU=%d, JIT%s=%d.\n"),
- currprefs.cpu_model, currprefs.fpu_model,
- currprefs.mmu_model,
- currprefs.cachesize ? (currprefs.compfpu ? _T("=CPU/FPU") : _T("=CPU")) : _T(""),
- currprefs.cachesize);
#ifdef JIT
build_comp ();
#endif
+
+ write_log(_T("CPU=%d, FPU=%d, MMU=%d, JIT%s=%d."),
+ currprefs.cpu_model, currprefs.fpu_model,
+ currprefs.mmu_model,
+ currprefs.cachesize ? (currprefs.compfpu ? _T("=CPU/FPU") : _T("=CPU")) : _T(""),
+ currprefs.cachesize);
+
+ regs.address_space_mask = 0xffffffff;
+ if (currprefs.cpu_compatible) {
+ if (currprefs.address_space_24 && currprefs.cpu_model >= 68030)
+ currprefs.address_space_24 = false;
+ }
+ if (currprefs.cpu_cycle_exact) {
+ if (currprefs.cpu_model == 68000)
+ write_log(_T(" prefetch and cycle-exact"));
+ else
+ write_log(_T(" ~cycle-exact"));
+ } else if (currprefs.cpu_compatible) {
+ if (currprefs.cpu_model <= 68020) {
+ write_log(_T(" prefetch"));
+ } else {
+ write_log(_T(" fake prefetch"));
+ }
+ }
+ if (currprefs.int_no_unimplemented && currprefs.cpu_model == 68060) {
+ write_log(_T(" no unimplemented integer instructions"));
+ }
+ if (currprefs.fpu_no_unimplemented && currprefs.fpu_model) {
+ write_log(_T(" no unimplemented floating point instructions"));
+ }
+ if (currprefs.address_space_24) {
+ regs.address_space_mask = 0x00ffffff;
+ write_log(_T(" 24-bit"));
+ }
+ write_log(_T("\n"));
+
m68k_pc_indirect = (currprefs.mmu_model || currprefs.cpu_compatible) && !currprefs.cachesize;
if (tbl == op_smalltbl_0_ff || tbl == op_smalltbl_1_ff || tbl == op_smalltbl_2_ff || tbl == op_smalltbl_3_ff || tbl == op_smalltbl_4_ff || tbl == op_smalltbl_5_ff)
m68k_pc_indirect = false;
currprefs.blitter_cycle_exact = changed_prefs.blitter_cycle_exact;
}
-void check_prefs_changed_cpu (void)
+
+static int check_prefs_changed_cpu2(void)
{
- bool changed = false;
+ int changed = 0;
- if (!config_changed)
- return;
#ifdef JIT
changed = check_prefs_changed_comp ();
#endif
|| currprefs.fpu_no_unimplemented != changed_prefs.fpu_no_unimplemented
|| currprefs.cpu_compatible != changed_prefs.cpu_compatible
|| currprefs.cpu_cycle_exact != changed_prefs.cpu_cycle_exact) {
-
- uaecptr pc = m68k_getpc();
- prefs_changed_cpu ();
- build_cpufunctbl ();
- m68k_setpc_normal(pc);
- fill_prefetch();
- changed = true;
+ changed |= 1;
}
if (changed
|| currprefs.m68k_speed != changed_prefs.m68k_speed
|| currprefs.cpu_frequency != changed_prefs.cpu_frequency) {
currprefs.m68k_speed = changed_prefs.m68k_speed;
currprefs.m68k_speed_throttle = changed_prefs.m68k_speed_throttle;
- update_68k_cycles ();
- changed = true;
+ changed |= 2;
}
+ return changed;
+}
+
+
+void check_prefs_changed_cpu(void)
+{
+ if (!config_changed)
+ return;
if (currprefs.cpu_idle != changed_prefs.cpu_idle) {
currprefs.cpu_idle = changed_prefs.cpu_idle;
}
- if (changed) {
- set_special (SPCFLAG_MODE_CHANGE);
- reset_frame_rate_hack ();
+ if (check_prefs_changed_cpu2()) {
+ set_special(SPCFLAG_MODE_CHANGE);
+ reset_frame_rate_hack();
}
-
}
+
void init_m68k (void)
{
int i;
}
}
#endif
- write_log (_T("Building CPU table for configuration: %d"), currprefs.cpu_model);
- regs.address_space_mask = 0xffffffff;
- if (currprefs.cpu_compatible) {
- if (currprefs.address_space_24 && currprefs.cpu_model >= 68030)
- currprefs.address_space_24 = false;
- }
- if (currprefs.fpu_model > 0)
- write_log (_T("/%d"), currprefs.fpu_model);
- if (currprefs.cpu_cycle_exact) {
- if (currprefs.cpu_model == 68000)
- write_log (_T(" prefetch and cycle-exact"));
- else
- write_log (_T(" ~cycle-exact"));
- } else if (currprefs.cpu_compatible) {
- if (currprefs.cpu_model <= 68020) {
- write_log (_T(" prefetch"));
- } else {
- write_log (_T(" fake prefetch"));
- }
- }
- if (currprefs.int_no_unimplemented && currprefs.cpu_model == 68060) {
- write_log (_T(" no unimplemented integer instructions"));
- }
- if (currprefs.fpu_no_unimplemented && currprefs.fpu_model) {
- write_log (_T(" no unimplemented floating point instructions"));
- }
- if (currprefs.address_space_24) {
- regs.address_space_mask = 0x00ffffff;
- write_log (_T(" 24-bit"));
- }
- write_log (_T("\n"));
read_table68k ();
do_merges ();
struct flag_struct regflags;
static long int m68kpc_offset;
+#if 0
#define get_ibyte_1(o) get_byte (regs.pc + (regs.pc_p - regs.pc_oldp) + (o) + 1)
#define get_iword_1(o) get_word (regs.pc + (regs.pc_p - regs.pc_oldp) + (o))
#define get_ilong_1(o) get_long (regs.pc + (regs.pc_p - regs.pc_oldp) + (o))
+#endif
static uaecptr ShowEA (void *f, uaecptr pc, uae_u16 opcode, int reg, amodes mode, wordsizes size, TCHAR *buf, uae_u32 *eaddr, int safemode)
{
#endif
v = get_long (4);
m68k_areg (regs, 7) = get_long (0);
- m68k_setpc (v);
- m68k_setpci (v);
+ m68k_setpc_normal(v);
regs.s = 1;
regs.m = 0;
regs.stopped = 0;
}
if (regs.spcflags & (SPCFLAG_BRK | SPCFLAG_MODE_CHANGE)) {
- unset_special (SPCFLAG_BRK | SPCFLAG_MODE_CHANGE);
+ unset_special (SPCFLAG_BRK);
// SPCFLAG_BRK breaks STOP condition, need to prefetch
m68k_resumestopped ();
return 1;
for (;;)
{
- uae_u16 opcode = get_iword (0);
+ uae_u16 opcode = get_diword (0);
cpu_cycles = (*cpufunctbl[opcode])(opcode);
cpu_cycles = adjust_cycles (cpu_cycles);
do_cycles (cpu_cycles);
if (currprefs.cpu_compatible) {
opcode = get_word_020_prefetchf (regs.instruction_pc);
} else {
- opcode = get_iword (0);
+ opcode = get_diword (0);
}
special_mem = DISTRUST_CONSISTENT_MEM;
for (;;) {
r->instruction_pc = m68k_getpc ();
- uae_u16 opcode = get_iword (0);
+ uae_u16 opcode = get_diword (0);
count_instr (opcode);
// if (regs.s == 0 && regs.regs[15] < 0x10040000 && regs.regs[15] > 0x10000000)
static void m68k_run_mmu (void)
{
for (;;) {
- uae_u16 opcode = get_iword (0);
+ uae_u16 opcode = get_iiword (0);
do_cycles (cpu_cycles);
mmu_backup_regs = regs;
cpu_cycles = (*cpufunctbl[opcode])(opcode);
}
}
-#if 0 /* what was the meaning of this? this breaks trace emulation if debugger is used */
- if (regs.spcflags) {
- uae_u32 of = regs.spcflags;
- regs.spcflags &= ~(SPCFLAG_BRK | SPCFLAG_MODE_CHANGE);
- do_specialties (0);
- regs.spcflags |= of & (SPCFLAG_BRK | SPCFLAG_MODE_CHANGE);
+ if (regs.spcflags & SPCFLAG_MODE_CHANGE) {
+ int v = check_prefs_changed_cpu2();
+ if (v & 1) {
+ uaecptr pc = m68k_getpc();
+ prefs_changed_cpu();
+ build_cpufunctbl();
+ m68k_setpc_normal(pc);
+ fill_prefetch();
+ }
+ if (v & 2) {
+ currprefs.m68k_speed = changed_prefs.m68k_speed;
+ currprefs.m68k_speed_throttle = changed_prefs.m68k_speed_throttle;
+ update_68k_cycles();
+ }
}
-#endif
- set_x_funcs ();
+
+ set_x_funcs();
if (startup) {
custom_prepare ();
protect_roms (true);
#if 0
}
#endif
+ unset_special(SPCFLAG_BRK | SPCFLAG_MODE_CHANGE);
//activate_debugger();
- run_func ();
- unset_special (SPCFLAG_BRK | SPCFLAG_MODE_CHANGE);
+ run_func();
}
protect_roms (false);
in_m68k_go--;
uae_u32 REGPARAM2 get_disp_ea_020 (uae_u32 base, int idx)
{
- uae_u16 dp = next_iword ();
+ uae_u16 dp = next_diword ();
int reg = (dp >> 12) & 15;
uae_s32 regd = regs.regs[reg];
if ((dp & 0x800) == 0)
if (dp & 0x40) regd = 0;
if ((dp & 0x30) == 0x20)
- base += (uae_s32)(uae_s16) next_iword ();
+ base += (uae_s32)(uae_s16) next_diword ();
if ((dp & 0x30) == 0x30)
- base += next_ilong ();
+ base += next_dilong ();
if ((dp & 0x3) == 0x2)
- outer = (uae_s32)(uae_s16) next_iword ();
+ outer = (uae_s32)(uae_s16) next_diword ();
if ((dp & 0x3) == 0x3)
- outer = next_ilong ();
+ outer = next_dilong ();
if ((dp & 0x4) == 0)
base += regd;
#define FPCR_PRECISION_DOUBLE 0x00000080
#define FPCR_PRECISION_EXTENDED 0x00000000
+STATIC_INLINE void exten_zeronormalize(uae_u32 *pwrd1, uae_u32 *pwrd2, uae_u32 *pwrd3)
+{
+ uae_u32 wrd1 = *pwrd1;
+ uae_u32 wrd2 = *pwrd2;
+ uae_u32 wrd3 = *pwrd3;
+ int exp = (wrd1 >> 16) & 0x7fff;
+ // Force zero if mantissa is zero but exponent is non-zero
+ // M68k FPU automatically convert them to plain zeros.
+ // x86 FPU considers them invalid values
+ if (exp != 0 && exp != 0x7fff && !wrd2 && !wrd3) {
+ *pwrd1 = (wrd1 & 0x80000000);
+ }
+}
+
#if USE_LONG_DOUBLE
STATIC_INLINE void to_exten(fpdata *dst, uae_u32 wrd1, uae_u32 wrd2, uae_u32 wrd3)
{
long double lf;
uae_u32 longarray[3];
} uld;
+ exten_zeronormalize(&wrd1, &wrd2, &wrd3);
// little endian order
uld.longarray[0] = wrd3;
uld.longarray[1] = wrd2;
#define HAVE_to_exten
STATIC_INLINE void to_exten(fpdata *fpd, uae_u32 wrd1, uae_u32 wrd2, uae_u32 wrd3)
{
- uae_u32 longarray[] = { wrd3, wrd2, ((wrd1 >> 16) & 0xffff) }; // little endian
+ uae_u32 longarray[3];
double extenfake;
+ exten_normalize(&wrd1, &wrd2, &wrd3);
+ longarray[0] = wrd3; // littlen endian
+ longarray[1] = wrd2;
+ longarray[2] = wrd2 >> 16;
+
__asm {
fld tbyte ptr longarray;
fstp qword ptr extenfake;
fpd->fpm = wrd1;
fpd->fpx = true;
#endif
+ exten_zeronormalize(&wrd1, &wrd2, &wrd3);
if ((wrd1 & 0x7fff0000) == 0 && wrd2 == 0 && wrd3 == 0) {
fpd->fp = (wrd1 & 0x80000000) ? -0.0 : +0.0;
return;
{
v = fpd->fp;
if (v == 0.0) {
- *wrd1 = 0;
+ *wrd1 = signbit(v) ? 0x80000000 : 0;
*wrd2 = 0;
*wrd3 = 0;
return;
// Microsoft Visual C++ generated resource script.
//
-#include "winres.h"
#include "resource.h"
+#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
// English resources
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,7,1,0
- PRODUCTVERSION 2,7,1,0
+ FILEVERSION 2,8,0,0
+ PRODUCTVERSION 2,8,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "WinUAE"
- VALUE "FileVersion", "2.7.1.0"
+ VALUE "FileVersion", "2.8.0.0"
VALUE "InternalName", "WinUAE"
VALUE "LegalCopyright", "© 1996-2013 under the GNU Public License (GPL)"
VALUE "OriginalFilename", "WinUAE.exe"
VALUE "ProductName", "WinUAE"
- VALUE "ProductVersion", "2.7.1.0"
+ VALUE "ProductVersion", "2.8.0.0"
END
END
BLOCK "VarFileInfo"
#define LANG_DLL 1
#if WINUAEPUBLICBETA
-#define WINUAEBETA _T("14")
+#define WINUAEBETA _T("15")
#else
#define WINUAEBETA _T("")
#endif
-#define WINUAEDATE MAKEBD(2014, 4, 8)
+#define WINUAEDATE MAKEBD(2014, 4, 13)
#define WINUAEEXTRA _T("")
//#define WINUAEEXTRA _T("AmiKit Preview")
//#define WINUAEEXTRA _T("Amiga Forever Edition")
- restore only single input target to default.
+Beta 15:
+
+- Finally bumped version to 2.8.0. This isn't small 2.7.0 update (Should have been done since b6 or so..)
+- FPU register negative zero transformed to positive zero when it was written to or read from memory
+ in extended FP format (FMOVE.X FPx,<ea> or FMOVE.X <ea>,FPx or FMOVEM). No one should care as usual.
+- When loading FPU register from memory in extended format, normalize any "unnormal" zero.
+ (non-zero exponent but zero mantissa part). Motorola FPUs do this automatically, x86 FPU
+ does not seem to like them. (Another mostly Next specific update)
+- Programmed mode autoresolution should now work with strange modes like highgfx.
+- Only allow CPU mode changes between instructions, previously change sometimes happened mid-instruction
+ (during instruction internal memory read/write) which wasn't safe.
+- Small tweak to recent sprite update (Hybris)
+
Beta 14:
- FSINCOS second register supported in disassembler.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <Product Id="*" Name="WinUAE" Language="1033" Version="2.7.0.0" Manufacturer="Arabuusimiehet" UpgradeCode="88C6D045-E416-4AEA-9EE9-0B7A53EE0F16">
+ <Product Id="*" Name="WinUAE" Language="1033" Version="2.8.0.0" Manufacturer="Arabuusimiehet" UpgradeCode="88C6D045-E416-4AEA-9EE9-0B7A53EE0F16">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<?define SRCDIST="$(var.winuae.ProjectDir)/../../../distribution/"?>