Re: [hatari-devel] Drive image byteswap confusion

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


This looks wrong to me. When byteswapping is configured to be off, it's
actually enabled and Hatari reports:

IDE: little->big endian byte-swapping enabled for drive 0.

This explains why an image, which was created when assigned to an IDE
drive with byte swapping off (which I'd expect to be the default IDE
behavior of a real Atari) is bootable out of the box when assigned to
an ACSI drive. With a real Atari this would not work.

> Hi,
> 
> On 10/18/19 8:02 PM, Uwe Seimet wrote:
> > I'm confused about how Hatari handles byteswapping. Can it be that if
> > Byteswap is "Off" it is *not* compatible with the standard behavior of an
> > Atari IDE port, and it has to be "On" in order to be compatible?
> 
> I see in ide.c:
> 	nIDEPartitions += HDC_PartitionCount(hd_table[i]->fhndl, TRACE_IDE, 
> &is_byteswap);
> 	/* Our IDE implementation is little endian by default,
>           * so we need to byteswap if the image is not swapped! */
> 	if (ConfigureParams.Ide[i].nByteSwap == BYTESWAP_AUTO)
>          	hd_table[i]->byteswap = !is_byteswap;
> 	else
> 		hd_table[i]->byteswap = !ConfigureParams.Ide[i].nByteSwap;
> 	LOG_TRACE(TRACE_IDE, "IDE: little->big endian byte-swapping %s for 
> drive %d\n",
> 		hd_table[i]->byteswap ? "enabled" : "disabled", i);
> 
> 
> 	- Eero
> 
> 



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