HiassofT wrote:
flashjazzcat wrote:
I had an idea for a foolproof way to read the LBA drive geometry in 16 bit mode: just use a binary chop, starting with LBA 0 through <arbitrarily high value>. I would imagine the upper LBA range would be found after a dozen or so disk reads.
I just had the same idea and then read that you already came up with it
Set the "<arbitrarily high value>" to 2^28-1 and then loop until lo==hi, you'll have the last readable sector after a constant 28 runs. This could also be handy to check if the drive isn't lying about the size in the "identify" command
Hias
LOL. It came to me while my wife was talking to me about something or other... that's when I do a lot of my best thinking.
To answer the question about separate versions for inernal and external devices: there's no need, since the driver will automatically configure itself to whichever interface is installed. Of course there are ATM relatively few possible configurations:
1) IntSDX and external MyIDE
2) SDX cart and internal MyIDE
3) AtariMax MyIDE+Flash cart containing SDX
I was considering making a homebrew internal interface which will live with IntSDX, but I really don't have the time just at the moment (Thanks for the plans and files, by the way Matthias: sorry I haven't gotten around to replying yet: I had to take a day off to finish a couple of XM301/SIO2SD conversions).
I also forgot to respond to Sijmen's question about the non-checksummed I/O code. Well - there's nothing complex about it. The code in the driver is basically the same as the code in the MyIDE movie viewer. In my view, the IDE device either works or it doesn't. Mine didn't work (properly) until I performed a proper Phi2 mod. Before that, the need to constantly check DRQ during the read/write loop basically meant the interface wasn't working properly. I was ready to abandon the hadrware and driver at that point, even though it was functional. Now the timing issues are sorted out, IDE read/write is 100% accurate. I may be wrong, but surely extensive retry/error correction logic/DRQ/busy checks are basically to compensate for the Phi2 timing errors on so many Atari computers?
Of course the option of "safer" I/O code will remain for those who have stability problems or for whom speed is not a great concern: at the very least, DRQ checking inside the loop, and error checking and retry logic needs building into both (fast and slower) flavours. But speed was the main objective at the outset: MyIDE running at 12KB/s under DOS is no use to me at all: I might as well use an SIO2SD which can achieve the same speed and brings no OS compatibility problems. MyIDE at 60KB/s, however, is a different matter altogether. That's the whole reason I wanted to finish Kyle's driver.