Re: [hatari-devel] Crash with HD IDE->ACSI image change?

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


Am Sun, 12 Oct 2014 17:36:37 +0300
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:

> Hi,
> 
> On sunnuntai 12 lokakuu 2014, Thomas Huth wrote:
> > While playing with Uwe's hatari.cfg, I noticed indeed some problems
> > with hard disk emulation, but they were not related to IDE drives:
> > When using GEMDOS HD emulation and extended VDI resolutions, Hatari
> > always tried to access GEMDOS HD "C:" ... if it did not exist ->
> > crash.
> > 
> > I fixed that now, so problems with GEMDOS HD and extended VDI
> > resolution should be gone now.
> 
> I think this should be fixed in a different way.
> 
> With your fix, DESKTOP.INF & NEWDESK.INF could get written to
> user's host root directory (if/when Hatari has access rights
> to write there).

How that?

> I.e. it's this part that should be fixed, not gemdos.c:
> ---------------------------------------
> static void VDI_FixDesktopInf(void)
> {
>         char *szDesktopFileName, *szNewDeskFileName;
> 
>         /* Modifying DESKTOP.INF only makes sense when we emulate the
> GEMDOS
>          * hard disk 'C:' (i.e. the HD we boot from) - if not, simply
> return */
>         if (!emudrives || !emudrives[0] ||
> emudrives[0]->drive_number != 2) {
>                 return;
>         }
> ---------------------------------------

That's one of the spots that I just fixed. Which modification do you
propose?

> Besides checking for GEMDOS HD emulation, it probably
> should also output a warning if GEMDOS HD writes are
> disabled with ConfigureParams.HardDisk.nWriteProtection.

Feel free to add that check.

> Because every other user of GemDOS_CreateHardDriveFileName()
> function calls it only for valid GEMDOS drives (they check
> for that before calling the function), the check you added
> there:
>         if (Drive < 2 || !GemDOS_IsDriveEmulated(Drive))
> 
> should IMHO be changed to an assert:
>         assert(GemDOS_IsDriveEmulated(Drive));

I did not check the other callers. If they really all do the check on
their own, the assert is fine for me, too.

 Thomas



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