Re: [hatari-devel] Drive image byteswap confusion

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


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/