Re: [hatari-devel] Small patch to add some partition IDs for auto-detection of byteswapped images

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


Hi,

On 12/6/18 8:16 AM, Thomas Huth wrote:
On 2018-12-06 02:05, Eero Tamminen wrote:
On 12/5/18 11:53 AM, Thorsten Otto wrote:
attached is a small patch that adds some more partition types to the
detection ('F32', 'MIX' and 'UNX').

Thanks, patch applied.

Btw. Partition type detection is used (only) for checking whether
harddisk should be byte-swapped.  However, it's done only for
the first Atari partition table partition.

It's not done for DOS MBR (supported by EmuTOS and e.g. Uwe's
HD driver).  Could HDs with MBR be also byte-swapped?

The check is there:

  bootsector[0x1fe] == 0xaa && bootsector[0x1ff] == 0x55

Right, sorry for being blind.


Doesn't that work for you?

According to AHDI documentation, "XGM" (extended) partition cannot
be the first one, because HD cannot booted from it.

However, it's also possible to boot from another hard disk (image)
or from a floppy with a HD driver, so it's possible to use a HD that
doesn't TOS compatible first partition.

-> I guess other partition types need to be checked for byte-swap,
like they already are, and what you proposed to extend.

Sorry, I don't understand what you try to say here. There is already a
check for XGM:

  (bootsector[0x1c6] == 'X' && bootsector[0x1c8] == 'M' &&
bootsector[0x1c9] == 'G')

What else should be missing?

I was just wondering whether it can be first partition, contrary to
the AHDI documentation.  Uwe already confirmed that yes, it can, so
Hatari does need to check for that (as it already does).


	- Eero




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