From 4be7cf079ce2f062bc364ed5e640562024e42e66 Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Sun, 22 Sep 2013 09:55:41 +0000 Subject: [PATCH] 05303: All sets in harddriv.c: Wrong colors on title screen and during gameplay. [Phil Bennett] m68000: The 68010 does not perform a read before write during a CLR instruction [Phil Bennett] Sources: http://www.opensource.apple.com/source/gcc/gcc-1765/gcc/config/m68k/m68k.c "clr insns on 68000 read before writing. This isn't so on the 68010, but we have no TARGET_68010." http://www.zophar.net/fileuploads/2/10544qufns/jag68k.txt "The special thing about a CLR (on the 68000, fixed in the 68010 and onwards I believe) is, that the processor does a source read before doing a destination write." --- src/emu/cpu/m68000/m68k_in.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/emu/cpu/m68000/m68k_in.c b/src/emu/cpu/m68000/m68k_in.c index 19af7dde3c9..46f8525e724 100644 --- a/src/emu/cpu/m68000/m68k_in.c +++ b/src/emu/cpu/m68000/m68k_in.c @@ -3897,9 +3897,9 @@ M68KMAKE_OP(clr, 8, ., .) { UINT32 ea = M68KMAKE_GET_EA_AY_8; - if(CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type)) + if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type)) { - m68ki_read_8((mc68kcpu), ea); /* the 68000 (and 010?) does a dummy read, the value is discarded */ + m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */ } m68ki_write_8((mc68kcpu), ea, 0); @@ -3926,9 +3926,9 @@ M68KMAKE_OP(clr, 16, ., .) { UINT32 ea = M68KMAKE_GET_EA_AY_16; - if(CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type)) + if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type)) { - m68ki_read_16((mc68kcpu), ea); /* the 68000 (and 010?) does a dummy read, the value is discarded */ + m68ki_read_16((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */ } m68ki_write_16((mc68kcpu), ea, 0); @@ -3955,9 +3955,9 @@ M68KMAKE_OP(clr, 32, ., .) { UINT32 ea = M68KMAKE_GET_EA_AY_32; - if(CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type)) + if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type)) { - m68ki_read_32((mc68kcpu), ea); /* the 68000 (and 010?) does a dummy read, the value is discarded */ + m68ki_read_32((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */ } m68ki_write_32((mc68kcpu), ea, 0);