Re: [hatari-devel] Strange Line-F exception

[ Thread Index | Date Index | More Archives ]

Le 12/12/2017 à 11:55, Miro Kropáček a écrit :
On 11 December 2017 at 23:23, Nicolas Pomarède <npomarede@xxxxxxxxxxxx <mailto:npomarede@xxxxxxxxxxxx>> wrote:

    what cpu/machine settings are you using  ? It could be a prefetch
    issue where Hatari didn't correctly update the prefetch words.

I have attached my cfg file and the offending binary. From my experiments I can see that the problem occurs when:
- "Cycle exact, slower" *isn't* set
- "MMU emulation" *is* set

So it has two different test cases. Can you reproduce them?

    What is the content of the registers ('r') when reaching the
    breakpoint ?

The PC and disassembly at the PC looks good:

Prefetch 00032058 123c0001 (1) 0099 (1) 123c (1) 0001 (1)
00032054 103c 0099                MOVE.B #$99,D0
Next PC: 00032058

So whatever is happening it's happening after I step to next instruction.


I can reproduce it under falcon + tos 4.04, but it's not a bug.

What happens in fact is that when your program is started, a HBL interrupt is pending at the same time. So, when you press 'n', this will execute the next instruction, but in that case it will be the pending exception for HBL interrupt, which calls handler at address $68.

When using different mmu settings or cpu emulation mode, the timings will change (as number of cycles per emulated opcode will be different) ; in some cases the HBL int will trigger just before your code (as you see), in some other it will trigger at a different time.


Mail converted by MHonArc 2.6.19+