[hatari-devel] Hatari fails to run AUTO programs from GEMDOS C: (was: Hatari freezing when running FIX24.PRG)

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


Christian Zietz schrieb:

> Uwe Seimet schrieb:
> 
>> While trying to run more tests with Hatari I just stumbled upon a problem:
>> With only 4 MB ST-RAM configured NVDI does not install on Hatari. First
>> I thought this was another NVDI issue, but then I noticed that it looks
>> as if no AUTO order program is executed at all when I configure 4 MB of
>> ST-RAM.
> 
> Solution for that: leave at least one floppy drive enabled. Whether this
> is a Hatari or a TOS 3.06 issue, I don't know. It works with EmuTOS, though.

It *is* a bug in Hatari. Analysis with Hatari 2.1 shows:

With GEMDOS HD Hatari sets bootdev ($446) to 2 (=C:) directly after
reset. With more than 4 MB ST-RAM it will also fake a warm-boot, meaning
that TOS will not clear bootdev again. This is why it works with more
than 4 MB ST-RAM.

But with e.g. 4 MB ST-RAM, TOS 3.06 goes through its normal boot
routine, clearing the memory, including bootdev, which is thus set to 0
(=A:). When no floppy drive is emulated, TOS will notice that its boot
drive is unavailable and will not even try to run any AUTO folder files.

You might ask: But why does TOS boot from C: when a floppy drive is
connected, even though bootdev is overwritten with 0? This is because
Hatari changes the default GEMDOS drive to C: [1]. So when TOS searches
for \AUTO\*.PRG, it will search on C:, even though bootdev is 0.

Hence, another workaround, not requiring Uwe to enable a floppy drive is
to set the "Boot faster by patching TOS & sysvars" option, which will
prevent the memory (incl. bootdev) from being cleared.

Possible bugfixes: Set bootdev only after memory has been cleared, e.g.
in GemDOS_Boot or by hooking hdv_boot like a HD driver would do.

Regards
Christian

[1]
<https://hg.tuxfamily.org/mercurialroot/hatari/hatari/file/533b11ea2f1e/src/gemdos.c#l550>
-- 
Christian Zietz  -  CHZ-Soft  -  czietz@xxxxxxx
WWW: http://www.chzsoft.de/
PGP/GnuPG-Key-ID: 0x52CB97F66DA025CA / 0x6DA025CA



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