Re: [hatari-devel] Bug in Hatari 2.0

[ Thread Index | Date Index | More Archives ]


On 01/28/2018 08:11 PM, Nicolas Pomarède wrote:
Le 28/01/2018 à 17:23, Thomas Huth a écrit :
Thanks! With that config file, I can reproduce the crash even with the
latest version from the Mercurial repo. Seems like the problem is when
you specify an FPU together with the GEMDOS hard disk. I was able to
reproduce it with this minimal config file, too:

bUseHardDiskDirectory = TRUE
szHardDiskDirectory = /tmp/hatari/gemdos.drv

szTosImageFileName = /tmp/hatari/etos512k.img

n_FPUType = 68882

The "n_FPUType = 68882" seems to trigger a re-initialization of the CPU
tables (even though it likely should not do that) as soon as you press
the OK button in the GUI. I guess that somehow kills the special
GEMDOS HD opcodes of Hatari, so that you finally run into a crash.
Unfortunately, I currently don't have much time for further debugging
(for the next 1.5 weeks) ... so either somebody else needs to have a
closer look or this has to wait a little bit.

when I try this with my config, it just prints :
FPU is not supported in 68000/010 configurations.

After this message, our WinUAE CPU core code forces FPU model to zero.

This looks like long standing bug in our WinUAE CPU core, which has
been there at least since WinUAE 2.3 code import.

One can install FPU to ST and I'm pretty sure Hatari has supported
ST+FPU configurations earlier, at least with oldUAE CPU core.  Thomas

Does this need a specific CPU or machine type to see the problem ?

Yes, the one with which you got that warning (68000/010).

As Roger stated, you need to press F12 & Enter, after which
you will see just illegal instructions.  Happens also with
normal TOS.

Attached patch makes that issue go away, but I didn't test
whether FPU emulation actually works properly with ST emulation.

	- Eero
diff -r 047de3d63a27 src/cpu/custom.c
--- a/src/cpu/custom.c	Sun Jan 28 22:50:08 2018 +0200
+++ b/src/cpu/custom.c	Mon Jan 29 00:20:45 2018 +0200
@@ -468,13 +468,14 @@
 		error_log (_T("24-bit address space is not supported in 68030/040/060 configurations."));
 		p->address_space_24 = 0;
-        /* Hatari : don't force address_space_24=0 for 68030, as the Falcon has a 68030 EC with only 24 bits */
 	if (p->cpu_model < 68020 && p->fpu_model && (p->cpu_compatible || p->cpu_cycle_exact)) {
 		error_log (_T("FPU is not supported in 68000/010 configurations."));
 		p->fpu_model = 0;
+        /* Hatari : don't force address_space_24=0 for 68030, as the Falcon has a 68030 EC with only 24 bits */
+	/* ST can have external FPU, so don't disable it for 68000/010 */
 	switch (p->cpu_model)

Mail converted by MHonArc 2.6.19+