Re: [hatari-devel] TT emulation crashes when there is no ACSI drive

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


Hi,

On 10/8/19 2:20 AM, Eero Tamminen wrote:
On 10/7/19 8:56 AM, Thomas Huth wrote:
Am Sun, 6 Oct 2019 10:01:31 +0200
schrieb Uwe Seimet <Uwe.Seimet@xxxxxxxxx>:
I'm afraid with my setup (TT, TOS 3.06) programs in the AUTO folder
(GEMDOS drive C:) are not executed anymore.

I can reproduce the bug. Weird, it only happens in TT mode, all other
machines seem to be fine. And the problem goes away, when I add a
"--trace gemdos" to the command line.

Problem goes away also with any of the following trace options:
     os_base, vdi, aes
not just by tracing all gemdos calls.

Or by using autostarting or "--tos-res <resolution>" option.


I'll have a closer look when I've got some spare time ...

Because of autostarting, I wonder whether the issue could be
ConnectedDriveMask not being initialized anymore here, but later
on:
--------------
        LOG_TRACE(TRACE_OS_GEMDOS, "Gemdos_Boot() at PC 0x%X\n", M68000_GetPC() );

         /* install our gemdos handler, if user has enabled either
          * GEMDOS HD, autostarting or GEMDOS tracing
          */
         if (!GEMDOS_EMU_ON &&
             !INF_Overriding(AUTOSTART_INTERCEPT) &&
             !(LogTraceFlags & (TRACE_OS_GEMDOS|TRACE_OS_BASE)))
                 return;
...
         /* Add any drives mapped by TOS in the interim */
         ConnectedDriveMask |= STMemory_ReadLong(0x4c2);
         /* Initialize the connected drive mask */
         STMemory_WriteLong(0x4c2, ConnectedDriveMask);
--------------

That would mean that GEMDOS_EMU_ON macro not working there anymore:
src/includes/gemdos.h:#define  GEMDOS_EMU_ON  (emudrives != NULL)

I.e. "emudrives" getting initialized too late, after Gemdos_Boot()
is called...

That's actually set by GemDOS_InitDrives() which is called
already from Main_Init() after GemDOS_Init(), so GEMDOS_EMU_ON
should work early enough.

GEMDOS HD drives are added to ConnectedDriveMask / 0x4c2 already
in STMemory_SetDefaultConfig().


When tracing drive mask changes:
	b (0x4c2).l ! (0x4c2).l :trace

I can seen that TOS (EmuTOS & TOS v1.04 checked) sets
0x4c2 first to zero, and then adds each bit separately.


Before your change, GemDOS_Boot() got called in between of these
bits being added to 0x4c2, and now it's called after it.  You've
added there code to update ConnectedDriveMask, but I don't know
whether that actually has any impact.


	- Eero




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