[hatari-devel] IDE & gemdos HD emulation

Thomas Huth huth at users.berlios.de
Tue Jan 19 19:59:06 CET 2010


On Tue, 19 Jan 2010 01:09:31 +0200
Eero Tamminen <eerot at users.berlios.de> wrote:

> Hi,
> 
> On Monday 18 January 2010, Thomas Huth wrote:
> > > E.g. with Cecile booting from IDE drive works, but not when having
> > > GEMDOS D & E drives.
> >
> > I just tried it again, and yes, it works for me. TOS 2.06, IDE
> > hard disk image with two partitions and AHDI 6 installed, and one
> > GEMDOS hard disk folder "E". Hatari successfully boots from the IDE
> > drive and all partitions, C, D and E show up correctly.
> 
> Hm.  I got this when trying to format an image with AHDI 6:
> 	HDC: Unsupported MODE SENSE command

RTFM ;-)
For _partitioning_, you need Cecile. Once you've got the disk image
partitioned, you can install AHDI 6.

> And when AHDI told that it couldn't format the disk image, I got an
> assert: hatari: int.c:394: Int_AddRelativeInterruptWithOffset:
> Assertion `CycleTime 
> >= 0' failed.

That's bad... is it reproducible? Could you do a backtrace?

> If I try to use the ACSI format disk image, everything works fine
> with that. If I try same image with --ide-master, HDX or HINSTALL
> don't even find C: (after running ahdi.prg, v5 or v6).  And Hatari
> doesn't boot from HD when --ide-master is used (when it has AHDI
> installed on it in --acsi mode).

IIRC, the disk images are endianess swapped (ACSI is big endian, IDE
is little). You might be able to convert it with dd, but I am not sure
whether this really works reliable.

> > > Might be related to ide.c not updating nNumDrives nor nPartitions:
> >
> > As you can see in gemdos.c, this code is only for old,
> > single-partition GEMDOS HD mode ("if (!bMultiPartitions) ....").
> > For multi-GEMDOS-drive mode, this does not apply.
> 
> This part applies also to multi partition support:
>                          /* If the GemDos Drive letter is free then */
>                         if (i >= nPartitions)
> 
> And anyway it's strange why IDE should work differently in this
> respect from the ASCI HDD?

I thought we've discussed this a year ago already... it should work the
same way, but so far nobody has tried to implement partition detection
to the IDE code yet. Anyway, I am also not sure whether we really want
to have partition detection in ACSI code, since it also fails for
example when the image is partitioned with a DOS-style partition table.
So I tend to say: When you want to use GEMDOS HD emulation and ACSI/IDE
disk images together, simply always configure your GEMDOS HD drive
letters manually.

> > > bdrv_read() return value errors (ret < 0) aren't handled?
> >
> > Looks like bad error handling. Feel free to fix it!
> 
> Problem is that not being familar with IDE, I'm not sure how it
> should be handled. :-)

Me neither, I just ported the code from qemu to Hatari :-)

 Thomas



More information about the hatari-devel mailing list