[hatari-devel] Re: 030 emulation issue

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]

 Hi Douglas,

Am Fri, 10 Jan 2014 14:59:08 +0000
schrieb Douglas Little <doug694@xxxxxxxxxxxxxx>:

> I found what looks like a bug in the WinUAE CPU emulation (I don't
> imagine it would happen much in the wild, but it is severe if
> encountered).
> Writing and then reading the state of CAAR differs between Hatari and
> real HW.
> On Hatari, only bits 2-7 (low byte, rounded to long address) are
> preserved as 1's, the rest return 0.
> On real HW, all bits in this register are preserved as 1's if written
> and read back, even if most are not used internally by cache
> management.

I think you're right, that's a bug, at least for 68030, since the
MC68030 user manual states:

 6.3.2 Cache Address Register
  The CAAR is a 32-bit register shown in Figure 6-15. The index field (bits 7-2)
  contains the address for the "clear cache entry" operations. The bits of this
  field correspond to bits 7-2 of addresses; they specify the index and a long
  word of a cache line. Although only the index field is used currently, all 32
  bits of the register are implemented and are reserved for use by Motorola.

The MC68020 user manual only talks about reserved bits, not that they
are implemented ... so I am not sure about 68020, but since this chip
has hardly been used on Atari machines anyway, I think we can neglect
this here ;-)

I'll try to implement a fix for this...

Thanks for reporting the bug!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/