http://www.64kib.com/redmine/http://www.64kib.com/redmine/redmine/favicon.ico?16973035742018-05-24T18:52:47Z64kibEclaireXL - Feature #65: Implement ATA to SPI bridgehttp://www.64kib.com/redmine/issues/65?journal_id=5122018-05-24T18:52:47Zsadospsadosp@gmail.com
<ul></ul><p>foft wrote:</p>
<blockquote>
<p>There is plenty of software for the Atari which accesses ATA hard drives via a simple register interface. Find out what this interface is and wire it up to the SD card directly. So its possible to use it like the compact flash in an incognito for instance.</p>
</blockquote>
<p>P-o-ss-i-b-i-l-i-t-i-e-s :-)</p> EclaireXL - Feature #65: Implement ATA to SPI bridgehttp://www.64kib.com/redmine/issues/65?journal_id=5132018-05-25T04:30:47Zfoft
<ul></ul><p>I need to prepare a document outlining the minimum requirements of IDE emulation since I'm explaining the same thing in multiple locations at the moment. ;) Absolute minimum requirement is the 8 basic IDE registers, and it's useful to be able to reset the device. These are the SIDE2 registers as an example:</p>
<p>IDE_DATA equ $D5f0<br />IDE_ERR equ $D5f1<br />IDE_SCNT equ $D5f2<br />IDE_SNUM equ $D5f3 ; LBA 0<br />IDE_CYLL equ $D5f4 ; LBA 1<br />IDE_CYLH equ $D5f5 ; LBA 2<br />IDE_HEAD equ $D5f6 ; LBA 3 ($Ex)<br />IDE_STAT equ $D5f7<br />IDE_CTRL equ $D5f8 ; Device control (used for device reset)<br />One could implement a latched sixteen bit data register to do away with the need for 8-bit PIO mode, but I'm not sure off the top of my head how that would work with the PDM Player (since I didn't code up an IDE Plus 2.0 version yet).</p>
<p>Bare minimum required commands are read (0x20), write (0x30), Indentify device (0xEC) and Set Features (0xEF, if no sixteen bit data bus is provided). Only the following information from the Identify Device buffer is employed by APT tools:<br />1 Number of logical cylinders<br />3 Number of logical heads<br />5 Number of logical sectors per track<br />10-19 Serial number (20 ASCII characters)<br />23-26 Firware revision (8 ASCII characters)<br />27-46 Model number (40 ASCII characters)<br />60-61 Total number of user addressable sectors (LBA mode only)<br />CHS data is used by the partition editor when laying out the MBR. The three strings can be populated with generic place-holder information if necessary.</p>
<p>Of course I'm not delving into the entire APT implementation here, which ideally requires a PBI device ROM.</p> EclaireXL - Feature #65: Implement ATA to SPI bridgehttp://www.64kib.com/redmine/issues/65?journal_id=5142018-05-25T04:31:29Zfoft
<ul></ul><p>Above was info from flashjazzcat on the forum</p> EclaireXL - Feature #65: Implement ATA to SPI bridgehttp://www.64kib.com/redmine/issues/65?journal_id=5472018-06-11T18:40:19Zfoft
<ul></ul><p>Some links..<br /><a class="external" href="https://www.pjrc.com/tech/8051/ide/wesley.html#idereg">https://www.pjrc.com/tech/8051/ide/wesley.html#idereg</a><br /><a class="external" href="http://atariage.com/forums/topic/279232-fujiconvert-01/page-3">http://atariage.com/forums/topic/279232-fujiconvert-01/page-3</a></p>
<p>Simple read seems to be:<br />sector address-> 4 lba regs with $e0 in high part<br />scnt-> 1<br />stat-> cmd<br />data-> read each byte at a time</p> EclaireXL - Feature #65: Implement ATA to SPI bridgehttp://www.64kib.com/redmine/issues/65?journal_id=5482018-06-11T18:53:05Zfoft
<ul></ul><p><a class="external" href="https://wiki.osdev.org/ATA_PIO_Mode">https://wiki.osdev.org/ATA_PIO_Mode</a></p>
<p>Probably want at least <abbr title="3/ 1=ready">DRQ</abbr>, <abbr title="6 /1=good">RDY</abbr> and <abbr title="7/ 0=not busy">BSY</abbr> in the status reg</p> EclaireXL - Feature #65: Implement ATA to SPI bridgehttp://www.64kib.com/redmine/issues/65?journal_id=5492018-06-11T19:04:50Zfoft
<ul></ul><p>Identify:0xec<br />0->SCNT,SNUM,CYLL,CYLH<br />0xa0->HEAD<br />0xec >STAT<br />read stat -> if 0 then does not exist! Then wait for BSY to clear and RDQ to set.<br />read data -> 512 bytes<br />See above for the interesting bytes from this.</p> EclaireXL - Feature #65: Implement ATA to SPI bridgehttp://www.64kib.com/redmine/issues/65?journal_id=5502018-06-11T19:09:25Zfoft
<ul></ul><p>What is used in set features?</p>
<p>0xef set features, then set feature 1 + lba mode?</p>
<p>Think this can probably be ignored.</p>