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
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Small patch to add some partition IDs for auto-detection of byteswapped images
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Thu, 6 Dec 2018 07:16:41 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1544077009; bh=88lt9fKlaVz8Fsz/I+OhEQi2mdOhf7coV7unzyHzmHI=; h=Subject:To:From:Date:From; b=CI5p7e8vJUsY+tzodznqQL8Tyau6Yzuj9ArRUGoSOmnCU9cer1W2lkTsuqxY2dIBr ycyxJ+y6yY1vRn1DHKIlfIYR5YaUC+n2RzA91FPG3zFS1Y3l/qNtZ2gt8QOM9+wx22 HvHi1ylL6T1Yj/pbtudiRjasPEpC8cTPx5bn+OizfyaAcdifkzFUdiTwYIKmD6pWp2 J1REkDJpboz4ALJXVI6IP2T2tOnYW01CzczEdC3TVsokhRfdwfQocdVcQJ0eXpTBTI jG9kf7JleA1WiS1J5LrnN526oNcGLfATnrF+g0d596OCmobSqzHvyrAChX8ur4cnoD vY7jaxFyBLpEw==
On 2018-12-06 02:05, Eero Tamminen wrote:
> Hi,
>
> 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
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?
Thomas