Re: [hatari-devel] TT emulation crashes when there is no ACSI drive |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] TT emulation crashes when there is no ACSI drive
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Sun, 13 Oct 2019 10:00:19 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1570953730; bh=SYtUxhaSocEFIIEOZl2+Q5VpBcDWiTRk4ZplkyWIVYc=; h=Date:From:To:Subject:From; b=C+wwvlPoeoaEwvOFO4dgqvQHoQ/RukaYHp6uwkTSnFcg+VoxBWorb3AnnsFx6TJlT Jr8xBkt6uUfOo7Iqhi8T7MFRsVLORWwqfjczZ8jrEsQvoZOsij1vpUFaM8Me68QfBc IbE5s2nQuFG80vGDM3Dw87A4aP72Dk/Lp77ySUCIkTDMOpb9uag+NrKvuN9dLmKdvH tRfxYD5Ea1xnH6KcAboPEpmdQI6X9nk0hQyStmhH32TmLFiKMjLEblw8l3l2b3NTDK vtXyU5TYc3L6DWuhsbSD7uUszliuHvqK8H3WyMt46tSGA6oJQ4fksT7yLw0Wo2fqYI wLaGWAxGqKhYg==
Am Wed, 9 Oct 2019 00:34:52 +0300
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
> 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.
Yes, I assume that was the issue. I've pushed a patch now that reverts
to the old behavior, so I think the AUTO start issue with TOS 3.0
should be fixed now.
Thomas