Previous 199869 Revisions Next

r25393 Sunday 22nd September, 2013 at 09:55:41 UTC by Phil Bennett
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

trunk/src/emu/cpu/m68000/m68k_in.c
r25392r25393
38973897{
38983898   UINT32 ea = M68KMAKE_GET_EA_AY_8;
38993899
3900   if(CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type))
3900   if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
39013901   {
3902      m68ki_read_8((mc68kcpu), ea);   /* the 68000 (and 010?) does a dummy read, the value is discarded */
3902      m68ki_read_8((mc68kcpu), ea);   /* the 68000 does a dummy read, the value is discarded */
39033903   }
39043904
39053905   m68ki_write_8((mc68kcpu), ea, 0);
r25392r25393
39263926{
39273927   UINT32 ea = M68KMAKE_GET_EA_AY_16;
39283928
3929   if(CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type))
3929   if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
39303930   {
3931      m68ki_read_16((mc68kcpu), ea);  /* the 68000 (and 010?) does a dummy read, the value is discarded */
3931      m68ki_read_16((mc68kcpu), ea);  /* the 68000 does a dummy read, the value is discarded */
39323932   }
39333933
39343934   m68ki_write_16((mc68kcpu), ea, 0);
r25392r25393
39553955{
39563956   UINT32 ea = M68KMAKE_GET_EA_AY_32;
39573957
3958   if(CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type))
3958   if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
39593959   {
3960      m68ki_read_32((mc68kcpu), ea);  /* the 68000 (and 010?) does a dummy read, the value is discarded */
3960      m68ki_read_32((mc68kcpu), ea);  /* the 68000 does a dummy read, the value is discarded */
39613961   }
39623962
39633963   m68ki_write_32((mc68kcpu), ea, 0);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team