<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Floppy Drive Commands?</title>
	<atom:link href="http://www.coco3.com/community/2007/11/floppy-drive-commands/feed" rel="self" type="application/rss+xml" />
	<link>http://www.coco3.com/community/2007/11/floppy-drive-commands</link>
	<description>A Rainbow 30 Years Wide!  Long Live The CoCo</description>
	<lastBuildDate>Thu, 29 Jul 2010 10:52:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: HJR</title>
		<link>http://www.coco3.com/community/2007/11/floppy-drive-commands/comment-page-1#comment-35441</link>
		<dc:creator>HJR</dc:creator>
		<pubDate>Tue, 27 Nov 2007 19:09:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.coco3.com/community/2007/11/floppy-drive-commands/#comment-35441</guid>
		<description>You know what, it&#039;s looking like it was 1986 when I got this thing. Hard to believe it&#039;s been over 20 years. Dang, suddenly I feel old.  8O</description>
		<content:encoded><![CDATA[<p>You know what, it&#8217;s looking like it was 1986 when I got this thing. Hard to believe it&#8217;s been over 20 years. Dang, suddenly I feel old.  <img src='http://www.coco3.com/community/wp-includes/images/smilies/icon_eek.gif' alt='8O' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HJR</title>
		<link>http://www.coco3.com/community/2007/11/floppy-drive-commands/comment-page-1#comment-35440</link>
		<dc:creator>HJR</dc:creator>
		<pubDate>Sat, 17 Nov 2007 07:19:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.coco3.com/community/2007/11/floppy-drive-commands/#comment-35440</guid>
		<description>You guys are awesome, thanks for all the input! [img:4d4047ac7c]http://i38.photobucket.com/albums/e104/ToughOldFord/Smilies/thumbsupwink.gif[/img:4d4047ac7c]</description>
		<content:encoded><![CDATA[<p>You guys are awesome, thanks for all the input! [img:4d4047ac7c]http://i38.photobucket.com/albums/e104/ToughOldFord/Smilies/thumbsupwink.gif[/img:4d4047ac7c]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RobertGault</title>
		<link>http://www.coco3.com/community/2007/11/floppy-drive-commands/comment-page-1#comment-35439</link>
		<dc:creator>RobertGault</dc:creator>
		<pubDate>Sat, 17 Nov 2007 04:41:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.coco3.com/community/2007/11/floppy-drive-commands/#comment-35439</guid>
		<description>The motor on/off bit at $FF40 is bit-3.&lt;br&gt;&lt;br&gt;[code:1:07be22c134]&lt;br&gt;Bit at $FF40         Function&lt;br&gt;   0                     drive select 0&lt;br&gt;   1                           &quot;          1&lt;br&gt;   2                           &quot;          2&lt;br&gt;   3                     motor enable: 0=off, 1=on&lt;br&gt;   4                     write precomp: 0=off, 1=on&lt;br&gt;   5                     density flag: 0=single, 1=double (normal Coco)&lt;br&gt;   6                     drive select 3&lt;br&gt;   7                     halt flag: 0=disabled, 1=enabled[/code:1:07be22c134]</description>
		<content:encoded><![CDATA[<p>The motor on/off bit at $FF40 is bit-3.</p>
<p>[code:1:07be22c134]<br />Bit at $FF40         Function<br />   0                     drive select 0<br />   1                           "          1<br />   2                           "          2<br />   3                     motor enable: 0=off, 1=on<br />   4                     write precomp: 0=off, 1=on<br />   5                     density flag: 0=single, 1=double (normal Coco)<br />   6                     drive select 3<br />   7                     halt flag: 0=disabled, 1=enabled[/code:1:07be22c134]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: navydave</title>
		<link>http://www.coco3.com/community/2007/11/floppy-drive-commands/comment-page-1#comment-35438</link>
		<dc:creator>navydave</dc:creator>
		<pubDate>Sat, 17 Nov 2007 03:49:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.coco3.com/community/2007/11/floppy-drive-commands/#comment-35438</guid>
		<description>Manual can be found here....&lt;br&gt;http://goyim.dyndns.org:8080/coco/doc/manuals/Hardware/Color%20Computer%20Disk%20System.pdf&lt;br&gt;&lt;br&gt;If this is not ok to post, let me know, I will delete it.&lt;br&gt;Dave</description>
		<content:encoded><![CDATA[<p>Manual can be found here&#8230;.<br /><a href="http://goyim.dyndns.org:8080/coco/doc/manuals/Hardware/Color%20Computer%20Disk%20System.pdf" rel="nofollow">http://goyim.dyndns.org:8080/coco/doc/manuals/Hardware/Color%20Computer%20Disk%20System.pdf</a></p>
<p>If this is not ok to post, let me know, I will delete it.<br />Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mrnukem</title>
		<link>http://www.coco3.com/community/2007/11/floppy-drive-commands/comment-page-1#comment-35437</link>
		<dc:creator>mrnukem</dc:creator>
		<pubDate>Fri, 16 Nov 2007 21:13:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.coco3.com/community/2007/11/floppy-drive-commands/#comment-35437</guid>
		<description>Here are the disk basic commands&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Disk Basic Summary&lt;br&gt;  ------------------------------------------------------------------------&lt;br&gt;Disk management commands&lt;br&gt;&lt;br&gt;   BACKUP n TO m            Copy all files from one disk to another&lt;br&gt;&lt;br&gt;   BACKUP n                 BACKUP a disk using only a single disk drive&lt;br&gt;&lt;br&gt;   COPY file1 TO file2      Make a duplicate of a file&lt;br&gt;&lt;br&gt;   DIR n                    List the files that are on the disk&lt;br&gt;&lt;br&gt;   DRIVE n                  Use drive n as the default&lt;br&gt;&lt;br&gt;   DSKINIn                  Initialize (format) a disk&lt;br&gt;&lt;br&gt;   KILL file                Delete a file from the disk&lt;br&gt;&lt;br&gt;   LOAD file,R              Load a program, and optionally start it running&lt;br&gt;&lt;br&gt;   LOADM file,offset        Load a machine-code program, shifting by offset&lt;br&gt;&lt;br&gt;   MERGE file,R             Load an ASCII program without clearing the old one&lt;br&gt;&lt;br&gt;   RENAME file1 TO file2    Change the name of a file&lt;br&gt;&lt;br&gt;   RUN file,R               Load a program, and optionally start it running&lt;br&gt;&lt;br&gt;   SAVE file,A              Save a program, optionally in ASCII&lt;br&gt;&lt;br&gt;   SAVEM file,a1,a2,ax      Save a machine-code program, from a1 to a2, exec at ax&lt;br&gt;&lt;br&gt;   VERIFY ON                Double-check all writes to the disk&lt;br&gt;&lt;br&gt;   VERIFY OFF               Don&#039;t double-check&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Programming commands&lt;br&gt;&lt;br&gt;   FILES max_f,size         Reserve buffers for open files&lt;br&gt;&lt;br&gt;   FREE(n)                  Returns the number of free granules (2304 bytes each)&lt;br&gt;&lt;br&gt;   UNLOAD n                 Close all open files on drive n&lt;br&gt;&lt;br&gt;   DSKI$ n,t,s,v1$,v2$      Read track t sector s into v1$ and v2$&lt;br&gt;&lt;br&gt;   DSKO$ n,t,s,v1$,v2$      Write track t sector s from v1$ and v2$&lt;br&gt;&lt;br&gt;   OPEN &quot;I&quot;,f,file          Open a file for sequential input (ie: INPUT)&lt;br&gt;&lt;br&gt;   OPEN &quot;O&quot;,f,file          Open a file for sequential output (ie: PRINT/WRITE)&lt;br&gt;&lt;br&gt;   OPEN &quot;D&quot;,f,file,len      Open a file for direct access; (ie: GET/PUT);&lt;br&gt;&lt;br&gt;                              record length len is optional&lt;br&gt;&lt;br&gt;   CLOSE #f                 Close a file&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Sequential file commands&lt;br&gt;&lt;br&gt;   EOF(f)                   Returns true if file f has been read to the end&lt;br&gt;&lt;br&gt;   INPUT #f, var,...        Read variables from a file&lt;br&gt;&lt;br&gt;   LINE INPUT #f,var$       Read an entire line from a file into a string variable&lt;br&gt;&lt;br&gt;   WRITE #f,values          Write values to file, with commas, strings in quotes,...&lt;br&gt;&lt;br&gt;   PRINT #f,values          Write values to file, just as PRINT would display them&lt;br&gt;&lt;br&gt;   PRINT #f,USING f$;values Formatted printing; many options for f$&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Direct-access file commands&lt;br&gt;&lt;br&gt;   FIELD #f, size AS v$,... Give variable names to parts of the file buffer&lt;br&gt;&lt;br&gt;   RSET v$ = value$         Fill in a named part of the file buffer, right-justified&lt;br&gt;&lt;br&gt;   LSET v$ = value$         Fill in ..., left justified&lt;br&gt;&lt;br&gt;   PUT #f,r                 Write the buffer to record r&lt;br&gt;&lt;br&gt;   GET #f,r                 Read record r into the buffer&lt;br&gt;&lt;br&gt;   CVN(var$)                Make a number out of a binary string&lt;br&gt;&lt;br&gt;   MKN$(num)                Make a binary string out of a number&lt;br&gt;&lt;br&gt;   LOC(f)                   Return the current record number in the buffer&lt;br&gt;&lt;br&gt;   LOF(f)                   Return the highest record number in the file&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;In all cases, f is a file number, n and m are drive numbers, file is a&lt;br&gt;&lt;br&gt;filename, and dollar signs signify variables that must be string-variables.&lt;br&gt;&lt;br&gt;Note that filenames must be either string variables or string constants in&lt;br&gt;&lt;br&gt;quotes. Upper-case words are keywords, lower-case words are supplied by the&lt;br&gt;&lt;br&gt;user.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Special file numbers are -2=printer -1=cassette and 0=screen&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;  ------------------------------------------------------------------------&lt;br&gt;&lt;br&gt;Syntax for a filename, in BNF. (Things in square brackets are optional, the&lt;br&gt;&lt;br&gt;vertical bar separates alternatives, angle brackets surround nonterminals,&lt;br&gt;&lt;br&gt;and uppercase words denote single-letter constants.)&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;filename&gt; ::= &lt;name&gt; [(DOT&#124;SLASH) &lt;extension&gt;] [COLON &lt;drivenum&gt;]&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;The name can be up to eight characters long, and cannot include a dot,&lt;br&gt;&lt;br&gt;slash, colon, or zero. The extension can be up to three characters long,&lt;br&gt;&lt;br&gt;and also cannot include those four characters. The drive number is a single&lt;br&gt;&lt;br&gt;digit, from zero up to the highest drive on your system.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;  ------------------------------------------------------------------------&lt;br&gt;&lt;br&gt;There is one documented subroutine in the Disk BASIC ROM that you can use&lt;br&gt;&lt;br&gt;to access the disk. Its address is stored at $C004 and $C005, so you jump&lt;br&gt;&lt;br&gt;to it using indirection: JSR [$C004] .&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Before calling that, you should load the X register with the address of a&lt;br&gt;&lt;br&gt;data structure that describes what you want to do. The examples in the&lt;br&gt;&lt;br&gt;manual always load this address from locations $C006 and $C007. I have not&lt;br&gt;&lt;br&gt;tried using this, so I don&#039;t know it will work if you put your structure&lt;br&gt;&lt;br&gt;anyplace else. This data structure is seven bytes long:&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;        1 byte    op code (0 - 3)&lt;br&gt;&lt;br&gt;        1 byte    drive number (0 - 3)&lt;br&gt;&lt;br&gt;        1 byte    track number (0 - 34)&lt;br&gt;&lt;br&gt;        1 byte    sector number (1 - 18)&lt;br&gt;&lt;br&gt;        2 bytes   address of 128-byte data buffer&lt;br&gt;&lt;br&gt;        1 byte    error code&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Op codes are either 0 (restore to track 0), 1 (no op), 2 (read sector), or&lt;br&gt;&lt;br&gt;3 (write sector).&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Bits in the error code are defined as follows (since the labels match those&lt;br&gt;&lt;br&gt;in the 1771 data sheet, I assume it is just the 1771 status code being&lt;br&gt;&lt;br&gt;returned, and have taken the much more complete descriptions from that data&lt;br&gt;&lt;br&gt;sheet). Note that some of the bits have different meanings based on which&lt;br&gt;&lt;br&gt;command caused them to be set.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;        7   Not Ready&lt;br&gt;&lt;br&gt;                This bit, when set, indicates that the disk drive is&lt;br&gt;&lt;br&gt;                not ready to perform a read or write operation.  When&lt;br&gt;&lt;br&gt;                reset it indicates that the drive is ready.  Thus,&lt;br&gt;&lt;br&gt;                this bit is an inverted copy of the READY input signal&lt;br&gt;&lt;br&gt;                to the 1771 from the disk drive, and is logically ORed&lt;br&gt;&lt;br&gt;                with the *MR signal&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;        6   Record Type/Write Protect&lt;br&gt;&lt;br&gt;                On a Read command, this bit is used in conjunction with&lt;br&gt;&lt;br&gt;                Bit 5 to indicate the type of data address mark that&lt;br&gt;&lt;br&gt;                was read.  On a Write command, this bit indicates that&lt;br&gt;&lt;br&gt;                the diskette was write protected.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;        5   Record Type/Write Fault/Head Loaded&lt;br&gt;&lt;br&gt;                On a Read command, this bit in conjunction with Bit 6&lt;br&gt;&lt;br&gt;                indicates the type of data address mark that was read.&lt;br&gt;&lt;br&gt;                On a Write command, this bit indicates that the write&lt;br&gt;&lt;br&gt;                fault input from the disk drive was detected: it is&lt;br&gt;&lt;br&gt;                thus an inverted copy of the *WF input signal.&lt;br&gt;&lt;br&gt;                On a Restore command, this bit indicates that the&lt;br&gt;&lt;br&gt;                read/write head is loaded against the diskette surface.&lt;br&gt;&lt;br&gt;                This bit is thus the logical AND of the HLD and HLT&lt;br&gt;&lt;br&gt;                signals.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;        4   Record Not Found/Seek Error&lt;br&gt;&lt;br&gt;                On Read or Write command, this bit indicates that the&lt;br&gt;&lt;br&gt;                desired track and sector were not found.&lt;br&gt;&lt;br&gt;                On a Restore command, this bit indicates that the&lt;br&gt;&lt;br&gt;                designated track could not be verified.  This bit is&lt;br&gt;&lt;br&gt;                reset to 0 whenever a new command is loaded.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;        3   CRC error&lt;br&gt;&lt;br&gt;                On a Read or Write command, if Bit 4 is also set, then&lt;br&gt;&lt;br&gt;                this bit indicates that an error was found in one or&lt;br&gt;&lt;br&gt;                more ID fields; otherwise, it indicates an error in a&lt;br&gt;&lt;br&gt;                data
field.&lt;br&gt;&lt;br&gt;                On a Restore command, this bit indicates that one or&lt;br&gt;&lt;br&gt;                more CRC errors were encountered on a track verification&lt;br&gt;&lt;br&gt;                operation.  This bit is reset to 0 whenever a new&lt;br&gt;&lt;br&gt;                command is loaded.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;        2   Lost Data/Track 00&lt;br&gt;&lt;br&gt;                On a Read or Write command, this bit indicates that&lt;br&gt;&lt;br&gt;                the microprocessor did not respond to the Data Request&lt;br&gt;&lt;br&gt;                (DRQ) within one byte time and that a byte of data was&lt;br&gt;&lt;br&gt;                subsequently lost.&lt;br&gt;&lt;br&gt;                On a Restore command, this bit indicates that the read/&lt;br&gt;&lt;br&gt;                write head is positioned over track 0.  This bit is&lt;br&gt;&lt;br&gt;                thus an inverted copy of the *TR00 input to the 1771.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;        1   Data Request/Index&lt;br&gt;&lt;br&gt;                On a Read or Write command, this bit is a copy of the&lt;br&gt;&lt;br&gt;                DRQ output signal.  When set, it indicates that the&lt;br&gt;&lt;br&gt;                Data register is full on a read operation or empty on&lt;br&gt;&lt;br&gt;                a write operation.&lt;br&gt;&lt;br&gt;                On a Restore command, this bit indicates that an index&lt;br&gt;&lt;br&gt;                mark was detected on the diskette.  This bit is thus&lt;br&gt;&lt;br&gt;                an inverted copy of the *IP input to the 1771.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;        0   Busy&lt;br&gt;&lt;br&gt;                When set, this bit indicates that a command is currently&lt;br&gt;&lt;br&gt;                being executed.  This bit is reset when a command is&lt;br&gt;&lt;br&gt;                completed and thus indicates that the 1771 is available&lt;br&gt;&lt;br&gt;                to execute another command.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;The disk control routine modifies the contents of only the condition code&lt;br&gt;&lt;br&gt;register.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Finally, note that you can force the drive motor to turn off by writing a&lt;br&gt;&lt;br&gt;zero into address $FF40. This probably also means you could force the motor&lt;br&gt;&lt;br&gt;on by writing non-zero there, but the documentation doesn&#039;t explain which&lt;br&gt;&lt;br&gt;bits to what.</description>
		<content:encoded><![CDATA[<p>Here are the disk basic commands</p>
<p>Disk Basic Summary<br />  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />Disk management commands</p>
<p>   BACKUP n TO m            Copy all files from one disk to another</p>
<p>   BACKUP n                 BACKUP a disk using only a single disk drive</p>
<p>   COPY file1 TO file2      Make a duplicate of a file</p>
<p>   DIR n                    List the files that are on the disk</p>
<p>   DRIVE n                  Use drive n as the default</p>
<p>   DSKINIn                  Initialize (format) a disk</p>
<p>   KILL file                Delete a file from the disk</p>
<p>   LOAD file,R              Load a program, and optionally start it running</p>
<p>   LOADM file,offset        Load a machine-code program, shifting by offset</p>
<p>   MERGE file,R             Load an ASCII program without clearing the old one</p>
<p>   RENAME file1 TO file2    Change the name of a file</p>
<p>   RUN file,R               Load a program, and optionally start it running</p>
<p>   SAVE file,A              Save a program, optionally in ASCII</p>
<p>   SAVEM file,a1,a2,ax      Save a machine-code program, from a1 to a2, exec at ax</p>
<p>   VERIFY ON                Double-check all writes to the disk</p>
<p>   VERIFY OFF               Don&#8217;t double-check</p>
<p>Programming commands</p>
<p>   FILES max_f,size         Reserve buffers for open files</p>
<p>   FREE(n)                  Returns the number of free granules (2304 bytes each)</p>
<p>   UNLOAD n                 Close all open files on drive n</p>
<p>   DSKI$ n,t,s,v1$,v2$      Read track t sector s into v1$ and v2$</p>
<p>   DSKO$ n,t,s,v1$,v2$      Write track t sector s from v1$ and v2$</p>
<p>   OPEN &#8220;I&#8221;,f,file          Open a file for sequential input (ie: INPUT)</p>
<p>   OPEN &#8220;O&#8221;,f,file          Open a file for sequential output (ie: PRINT/WRITE)</p>
<p>   OPEN &#8220;D&#8221;,f,file,len      Open a file for direct access; (ie: GET/PUT);</p>
<p>                              record length len is optional</p>
<p>   CLOSE #f                 Close a file</p>
<p>Sequential file commands</p>
<p>   EOF(f)                   Returns true if file f has been read to the end</p>
<p>   INPUT #f, var,&#8230;        Read variables from a file</p>
<p>   LINE INPUT #f,var$       Read an entire line from a file into a string variable</p>
<p>   WRITE #f,values          Write values to file, with commas, strings in quotes,&#8230;</p>
<p>   PRINT #f,values          Write values to file, just as PRINT would display them</p>
<p>   PRINT #f,USING f$;values Formatted printing; many options for f$</p>
<p>Direct-access file commands</p>
<p>   FIELD #f, size AS v$,&#8230; Give variable names to parts of the file buffer</p>
<p>   RSET v$ = value$         Fill in a named part of the file buffer, right-justified</p>
<p>   LSET v$ = value$         Fill in &#8230;, left justified</p>
<p>   PUT #f,r                 Write the buffer to record r</p>
<p>   GET #f,r                 Read record r into the buffer</p>
<p>   CVN(var$)                Make a number out of a binary string</p>
<p>   MKN$(num)                Make a binary string out of a number</p>
<p>   LOC(f)                   Return the current record number in the buffer</p>
<p>   LOF(f)                   Return the highest record number in the file</p>
<p>In all cases, f is a file number, n and m are drive numbers, file is a</p>
<p>filename, and dollar signs signify variables that must be string-variables.</p>
<p>Note that filenames must be either string variables or string constants in</p>
<p>quotes. Upper-case words are keywords, lower-case words are supplied by the</p>
<p>user.</p>
<p>Special file numbers are -2=printer -1=cassette and 0=screen</p>
<p>  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Syntax for a filename, in BNF. (Things in square brackets are optional, the</p>
<p>vertical bar separates alternatives, angle brackets surround nonterminals,</p>
<p>and uppercase words denote single-letter constants.)</p>
<p><filename> ::= <name> [(DOT|SLASH) <extension>] [COLON <drivenum>]</p>
<p>The name can be up to eight characters long, and cannot include a dot,</p>
<p>slash, colon, or zero. The extension can be up to three characters long,</p>
<p>and also cannot include those four characters. The drive number is a single</p>
<p>digit, from zero up to the highest drive on your system.</p>
<p>  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>There is one documented subroutine in the Disk BASIC ROM that you can use</p>
<p>to access the disk. Its address is stored at $C004 and $C005, so you jump</p>
<p>to it using indirection: JSR [$C004] .</p>
<p>Before calling that, you should load the X register with the address of a</p>
<p>data structure that describes what you want to do. The examples in the</p>
<p>manual always load this address from locations $C006 and $C007. I have not</p>
<p>tried using this, so I don&#8217;t know it will work if you put your structure</p>
<p>anyplace else. This data structure is seven bytes long:</p>
<p>        1 byte    op code (0 &#8211; 3)</p>
<p>        1 byte    drive number (0 &#8211; 3)</p>
<p>        1 byte    track number (0 &#8211; 34)</p>
<p>        1 byte    sector number (1 &#8211; 18)</p>
<p>        2 bytes   address of 128-byte data buffer</p>
<p>        1 byte    error code</p>
<p>Op codes are either 0 (restore to track 0), 1 (no op), 2 (read sector), or</p>
<p>3 (write sector).</p>
<p>Bits in the error code are defined as follows (since the labels match those</p>
<p>in the 1771 data sheet, I assume it is just the 1771 status code being</p>
<p>returned, and have taken the much more complete descriptions from that data</p>
<p>sheet). Note that some of the bits have different meanings based on which</p>
<p>command caused them to be set.</p>
<p>        7   Not Ready</p>
<p>                This bit, when set, indicates that the disk drive is</p>
<p>                not ready to perform a read or write operation.  When</p>
<p>                reset it indicates that the drive is ready.  Thus,</p>
<p>                this bit is an inverted copy of the READY input signal</p>
<p>                to the 1771 from the disk drive, and is logically ORed</p>
<p>                with the *MR signal</p>
<p>        6   Record Type/Write Protect</p>
<p>                On a Read command, this bit is used in conjunction with</p>
<p>                Bit 5 to indicate the type of data address mark that</p>
<p>                was read.  On a Write command, this bit indicates that</p>
<p>                the diskette was write protected.</p>
<p>        5   Record Type/Write Fault/Head Loaded</p>
<p>                On a Read command, this bit in conjunction with Bit 6</p>
<p>                indicates the type of data address mark that was read.</p>
<p>                On a Write command, this bit indicates that the write</p>
<p>                fault input from the disk drive was detected: it is</p>
<p>                thus an inverted copy of the *WF input signal.</p>
<p>                On a Restore command, this bit indicates that the</p>
<p>                read/write head is loaded against the diskette surface.</p>
<p>                This bit is thus the logical AND of the HLD and HLT</p>
<p>                signals.</p>
<p>        4   Record Not Found/Seek Error</p>
<p>                On Read or Write command, this bit indicates that the</p>
<p>                desired track and sector were not found.</p>
<p>                On a Restore command, this bit indicates that the</p>
<p>                designated track could not be verified.  This bit is</p>
<p>                reset to 0 whenever a new command is loaded.</p>
<p>        3   CRC error</p>
<p>                On a Read or Write command, if Bit 4 is also set, then</p>
<p>                this bit indicates that an error was found in one or</p>
<p>                more ID fields; otherwise, it indicates an error in a</p>
<p>                data<br />
field.</p>
<p>                On a Restore command, this bit indicates that one or</p>
<p>                more CRC errors were encountered on a track verification</p>
<p>                operation.  This bit is reset to 0 whenever a new</p>
<p>                command is loaded.</p>
<p>        2   Lost Data/Track 00</p>
<p>                On a Read or Write command, this bit indicates that</p>
<p>                the microprocessor did not respond to the Data Request</p>
<p>                (DRQ) within one byte time and that a byte of data was</p>
<p>                subsequently lost.</p>
<p>                On a Restore command, this bit indicates that the read/</p>
<p>                write head is positioned over track 0.  This bit is</p>
<p>                thus an inverted copy of the *TR00 input to the 1771.</p>
<p>        1   Data Request/Index</p>
<p>                On a Read or Write command, this bit is a copy of the</p>
<p>                DRQ output signal.  When set, it indicates that the</p>
<p>                Data register is full on a read operation or empty on</p>
<p>                a write operation.</p>
<p>                On a Restore command, this bit indicates that an index</p>
<p>                mark was detected on the diskette.  This bit is thus</p>
<p>                an inverted copy of the *IP input to the 1771.</p>
<p>        0   Busy</p>
<p>                When set, this bit indicates that a command is currently</p>
<p>                being executed.  This bit is reset when a command is</p>
<p>                completed and thus indicates that the 1771 is available</p>
<p>                to execute another command.</p>
<p>The disk control routine modifies the contents of only the condition code</p>
<p>register.</p>
<p>Finally, note that you can force the drive motor to turn off by writing a</p>
<p>zero into address $FF40. This probably also means you could force the motor</p>
<p>on by writing non-zero there, but the documentation doesn&#8217;t explain which</p>
<p>bits to what.</drivenum></extension></name></filename></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: navydave</title>
		<link>http://www.coco3.com/community/2007/11/floppy-drive-commands/comment-page-1#comment-35436</link>
		<dc:creator>navydave</dc:creator>
		<pubDate>Fri, 16 Nov 2007 19:49:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.coco3.com/community/2007/11/floppy-drive-commands/#comment-35436</guid>
		<description>Well,. I&#039;m sure some of the disk manuals are posted for download in pdf form on the sites listed by Ed. But some of the basic ones to get you started... DIR for disk directory, DOS to boot OS-9 or OS-9 games, etc. LOAD&quot;???.BAS&quot; and then RUN for basic games, LOADM&quot;???.BIN&quot; and then EXEC for machine language games. That will at least get you going to get some files loaded and running from disk.</description>
		<content:encoded><![CDATA[<p>Well,. I&#8217;m sure some of the disk manuals are posted for download in pdf form on the sites listed by Ed. But some of the basic ones to get you started&#8230; DIR for disk directory, DOS to boot OS-9 or OS-9 games, etc. LOAD&#8221;???.BAS&#8221; and then RUN for basic games, LOADM&#8221;???.BIN&#8221; and then EXEC for machine language games. That will at least get you going to get some files loaded and running from disk.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eorbea</title>
		<link>http://www.coco3.com/community/2007/11/floppy-drive-commands/comment-page-1#comment-35435</link>
		<dc:creator>eorbea</dc:creator>
		<pubDate>Fri, 16 Nov 2007 06:41:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.coco3.com/community/2007/11/floppy-drive-commands/#comment-35435</guid>
		<description>Welcome back to the CoCo world. I, like you and re-visiting my CoCo past and have found the assistance from this list to be very helpful. As I read the messages and the responses posted here, I have noted several sites that I &quot;visit&quot; to obtain information regarding my CoCo, RS-DOS and OS-9 (now NitrOS9).&lt;br&gt;&lt;br&gt;Try visiting:&lt;br&gt;http://www.rtsi.com/ftparchive.html&lt;br&gt;ftp://os9archive.rtsi.com/&lt;br&gt;ftp://maltedmedia.com/coco/&lt;br&gt;http://www.cloud9tech.com/&lt;br&gt;http://www.cs.unc.edu/~yakowenk/coco/text/history.html&lt;br&gt;http://www.vavasour.ca/jeff/trs80.html#coco2&lt;br&gt;http://vcc6809.bravehost.com/&lt;br&gt;http://coco.clubltdstudios.com/&lt;br&gt;&lt;br&gt;There is also a CoCo Web Ring that you should visit&lt;br&gt;http://m.webring.com/t/TRS-80-Tandy-Color-Computer&lt;br&gt;&lt;br&gt;Good Luck&lt;br&gt;&lt;br&gt;Ed</description>
		<content:encoded><![CDATA[<p>Welcome back to the CoCo world. I, like you and re-visiting my CoCo past and have found the assistance from this list to be very helpful. As I read the messages and the responses posted here, I have noted several sites that I &#8220;visit&#8221; to obtain information regarding my CoCo, RS-DOS and OS-9 (now NitrOS9).</p>
<p>Try visiting:<br /><a href="http://www.rtsi.com/ftparchive.html" rel="nofollow">http://www.rtsi.com/ftparchive.html</a><br /><a href="ftp://os9archive.rtsi.com/" rel="nofollow">ftp://os9archive.rtsi.com/</a><br /><a href="ftp://maltedmedia.com/coco/" rel="nofollow">ftp://maltedmedia.com/coco/</a><br /><a href="http://www.cloud9tech.com/" rel="nofollow">http://www.cloud9tech.com/</a><br /><a href="http://www.cs.unc.edu/~yakowenk/coco/text/history.html" rel="nofollow">http://www.cs.unc.edu/~yakowenk/coco/text/history.html</a><br /><a href="http://www.vavasour.ca/jeff/trs80.html#coco2" rel="nofollow">http://www.vavasour.ca/jeff/trs80.html#coco2</a><br /><a href="http://vcc6809.bravehost.com/" rel="nofollow">http://vcc6809.bravehost.com/</a><br /><a href="http://coco.clubltdstudios.com/" rel="nofollow">http://coco.clubltdstudios.com/</a></p>
<p>There is also a CoCo Web Ring that you should visit<br /><a href="http://m.webring.com/t/TRS-80-Tandy-Color-Computer" rel="nofollow">http://m.webring.com/t/TRS-80-Tandy-Color-Computer</a></p>
<p>Good Luck</p>
<p>Ed</p>
]]></content:encoded>
	</item>
</channel>
</rss>
