[hatari-devel] WinUae CPU for hatari

Nicolas Pomarède npomarede at corp.free.fr
Wed Nov 17 11:38:47 CET 2010


Le 17/11/2010 00:53, Laurent Sallafranque a écrit :

> With cpu_emu_0 core (seems correct) :
>
> cpu video_cyc= 0 0@ 0 : 00FC0030 46fc 2700 MV2SR.W #$2700
> cpu video_cyc= 0 0@ 0 : 00FC0034 4e70 RESET.L
> ikbd custom exe off
> cpu video_cyc= 0 0@ 0 : 00FC0036 0cb9 fa52 235f 00fa 0000 CMP.L
> #$fa52235f,$00fa0000
> cpu video_cyc= 0 0@ 0 : 00FC0040 660a BNE.B #$0000000a == $00FC004C (T)
> cpu video_cyc= 0 0@ 0 : 00FC004C 4dfa 0006 LEA.L (PC,$0006) == $00fc0054,A6
> cpu video_cyc= 0 0@ 0 : 00FC0050 6000 0636 BT .W #$0636 == $00FC0688 (T)
> cpu video_cyc= 0 0@ 0 : 00FC0688 9bcd SUBA.L A5,A5
> ...
>
>
> With cpu_emu_11 core (seems wrong) :
>
> cpu video_cyc= 0 0@ 0 : 00FC0030 46fc 2700 MV2SR.W #$2700
> cpu video_cyc= 0 0@ 0 : 00FC0034 4e70 RESET.L
> cpu video_cyc= 0 0@ 0 : 00FC0038 fa52 ILLEGAL.L
> cpu video_cyc= 0 0@ 0 : 00FC003C 00fa ILLEGAL.L
> cpu video_cyc= 0 0@ 0 : 00FC0040 660a BNE.B #$0000000a == $00FC004C (F)
> cpu video_cyc= 0 0@ 0 : 00FC0044 0008 ILLEGAL.L
> cpu video_cyc= 0 0@ 0 : 00FC0048 00fa ILLEGAL.L
> cpu video_cyc= 0 0@ 0 : 00FC004C 4dfa 0006 LEA.L (PC,$0006) == $00fc0054,A6
> cpu video_cyc= 0 0@ 0 : 00FC0050 6000 0636 BT .W #$0636 == $00FC0688 (T)
> ...
>
>
> It seems (by comparing the 2 traces), that PC is wrongly computed with
> the "better" cpu core.
>
>
> Do you know if there's something that could explain this (a diff between
> amiga and atari for example), or if it's just because I've badly
> implemented WinUae code ?
>

Hello,

from what I see, the prefetched word seems either to be lost or the pc 
is wrongly set after the prefetched word, which is wrong.

For example at fc00034, you read 1 word for reset and prefetch 1 word, 
so PC should be at fc0034+2, not at fc0034+4.

I don't think there was anything rally specific to Hatari in uae-cpu, so 
I guess sthg is not correctly implemented with win-uae's integration.

Nicolas



More information about the hatari-devel mailing list