Re: [hatari-devel] Crash with HD IDE->ACSI image change? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
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).
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;
}
---------------------------------------
Besides checking for GEMDOS HD emulation, it probably
should also output a warning if GEMDOS HD writes are
disabled with ConfigureParams.HardDisk.nWriteProtection.
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));
(Drive < 2 check is redundant with GemDOS_IsDriveEmulated().)
> Anyway, I was not able to reproduce the
> problem with the IDE crash. But could you please try again anyway to
> see whether it makes a difference?
- Eero