Re: [hatari-devel] WinUAE core freeze with ST emulation

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


Hi Thomas,

Thanks for the help.

The problem is that I add a fprintf just after the

  if (changed)
         set_special (SPCFLAG_BRK);

I display the regs.spcflags value, it gives me 16 when I change the CPU (which is OK, it's the SPCFLAG_BRK 0x10 value.

I also display the regs.spcflags value when I just enter into m68k_reset().
It displays 0 (instead of 16).

So the clearing of this variable is done between the 2 functions.
I still haven't found where.

Anyway, you're right in m68k_reset, the value should't be cleaned.
I'll fix it too when I find the problem.

Regards

Laurent



Le 16/01/2012 22:00, Thomas Huth a écrit :
Am Mon, 16 Jan 2012 00:18:43 +0100
schrieb Laurent Sallafranque<laurent.sallafranque@xxxxxxx>:

If I boot with "--machine falcon --tos etos512k.img" and in
the settings select ST / 68000 / 8Mhz / TOS 1.02, them the old TOS
boots up fine too without saving settings, even with prefetch
enabled.
It's only by luck, as the wrong CPU is running after the reboot.

As I explained before, changing of CPU in the GUI makes the code run
into newcpu.c:check_prefs_changed_cpu (void)
and at the end of the function, it goes to

      if (changed)
          set_special (SPCFLAG_BRK);


But when the code returns to the running CPU (like m68k_run_1 (void),
m68k_run_2 (void), ...) the value of SPCFLAG_BRK is back to 0 and the
program doesn't return to m68k_go (that's where the change of CPU
occurs).

I haven't managed to find this problem, and it's quite annoying. Some
help would be appreciate on this one.
I remember having some similar problems a couple of years ago with the
uae-cpu core. Some quick observations:

1)
- check_prefs_changed_cpu() in uae-cpu/hatari-glue.c sets SPCFLAG_MODE_CHANGE
- check_prefs_changed_cpu() in cpu/newcpu.c sets SPCFLAG_BRK

2)
- uae-cpu/newcpu.c m68k_reset() does:
   regs.spcflags&= ( SPCFLAG_MODE_CHANGE | SPCFLAG_DEBUGGER );
- cpu/newcpu.c m68k_reset() does:
   regs.spcflags = 0;

==>  I guess one of your problems is that m68k_reset() (which is
certainly called when changing the CPU level) clears SPCFLAG_BREAK so
that the m68k_run-loop is never left.

  Thomas







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