Re: [hatari-devel] ACSI: READ/WRITE (10) incorrectly evaluate block number |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] ACSI: READ/WRITE (10) incorrectly evaluate block number
- From: Uwe Seimet <Uwe.Seimet@xxxxxxxxx>
- Date: Sat, 26 Oct 2013 22:51:24 +0200
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1382820684; l=945; s=domk; d=seimet.de; h=In-Reply-To:Content-Type:MIME-Version:References:Subject:To:From: Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=UBl+Bf7hZChFpUcf3TBcbwZ6ARY=; b=MrAssaWiJ45ZDQoB0NinDYXmQUFCz3TwKPIZOOePPnt1iNrUihMCm8EavcoJTgt2Nvz iY9qOYWXAzAM3wOop1WB/ytnFNP3Hab95p3kR3wZY909mKksn6AsTjmakUazhcwFe1BiW DtD6lNKqsyV3Nq4MS8XzlznvpvGABB/+r+E=
Hi,
> > 1. READ CAPACITY (10) returns a wrong block count. My image has a size of
> > 410009600 bytes, so it should have 800800 blocks of 512 bytes each.
>
> By the way, I've just noticed that my IDE master drive image has the
> same size as the ACSI drive image. So the values returned by READ
> CAPACITY should be identical. 800800 would be correct. The ACSI value is
> much too high, and the IDE value is a bit too low, even though this is
> not a problem in practice.
As far as I can tell the ACSI emulation code tries to determine the
drive size from the root sector content, which is not correct. There
might have been (old) partitioning software that once placed the total
number of sectors there, but this is not standardized and also would not
help for unpartitioned drives.
I would expect fstat() or something similar to be used in order to
derive the number of blocks from the image file size.
Take care
Uwe