Skip to content

Commit

Permalink
39 :: added missing smartport technotes
Browse files Browse the repository at this point in the history
  • Loading branch information
DevoKun committed Jan 15, 2022
1 parent 17d18ed commit 5a8cce6
Show file tree
Hide file tree
Showing 32 changed files with 505 additions and 68 deletions.
2 changes: 1 addition & 1 deletion _pages/docs/technote/ftn08.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: 'page'
title: 'File Type Note $08 (8) - Auxiliary Types $0000-$3FFF'
description: 'Apple II Graphics File'
permalink: '/docs/technote/ftn08/'
permalink: '/docs/technote/ftn/08/'
---


Expand Down
2 changes: 1 addition & 1 deletion _pages/docs/technote/ftn19.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: 'page'
title: 'File Type $19 (25) - All Auxiliary Types'
description: 'AppleWorks Data Base File'
permalink: '/docs/technote/ftn19/'
permalink: '/docs/technote/ftn/19/'
---


Expand Down
2 changes: 1 addition & 1 deletion _pages/docs/technote/ftn1a.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: 'page'
title: 'File Type $1A (26) - All Auxiliary Types'
description: 'AppleWorks Word Processor File'
permalink: '/docs/technote/ftn1a/'
permalink: '/docs/technote/ftn/1a/'
---

<h2>Full Name: AppleWorks Word Processor File<br>Short Name: AppleWorks
Expand Down
2 changes: 1 addition & 1 deletion _pages/docs/technote/ftn1b.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: 'page'
title: 'File Type $1B (27) - All Auxiliary Types'
description: 'AppleWorks Spreadsheet File'
permalink: '/docs/technote/ftn1b/'
permalink: '/docs/technote/ftn/1b/'
---


Expand Down
7 changes: 7 additions & 0 deletions _pages/docs/technote/ftn8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: 'redirect'
title: ''
description: ''
permalink: '/docs/technote/ftn/8'
target_url: '/docs/technote/ftn/08/'
---
4 changes: 2 additions & 2 deletions _pages/docs/technote/iigs017.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
layout: 'redirect'
title: ''
description: ''
permalink: '/docs/technote/iigs017/'
target_url: '/docs/technote/iigs17/'
permalink: '/docs/technote/iigs/017/'
target_url: '/docs/technote/iigs/17/'
---
2 changes: 1 addition & 1 deletion _pages/docs/technote/iigs17.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: 'page'
title: 'Apple IIgs Technical Note #17'
description: 'Apple IIgs #17 - Application Memory Management and the MMStartUp User ID'
permalink: '/docs/technote/iigs17/'
permalink: '/docs/technote/iigs/17/'
---


Expand Down
6 changes: 3 additions & 3 deletions _pages/docs/technote/misc02.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: 'page'
title: 'Apple II Miscellaneous Technical Note #2'
description: 'Apple II Family Identification Routines 2.2'
permalink: '/docs/technote/misc02/'
permalink: '/docs/technote/misc/02/'
---


Expand Down Expand Up @@ -32,7 +32,7 @@ I got it off of the archives online. <em>-- AH</em></blockquote>
<h2>Why Identification Routines?</h2>

<p>Although we present the Apple II family identification bytes in <a
href="/docs/technote/misc07/">Apple II Miscellaneous Technical Note #7</a>, many
href="/docs/technote/misc/07/">Apple II Miscellaneous Technical Note #7</a>, many
people would prefer a routine they can simply plug into their own program
and call. In addition, this routine serves as a small piece of sample
code, and there is no reason for you to reinvent the wheel.</p>
Expand Down Expand Up @@ -550,7 +550,7 @@ release)
<h2>Further Reference</h2>

<ul>
<li><a href="/docs/technote/misc07/">Apple II Miscellaneous Technical Note #7</a>, Apple II Family Identification</li>
<li><a href="/docs/technote/misc/07/">Apple II Miscellaneous Technical Note #7</a>, Apple II Family Identification</li>
</ul>

<hr>
Expand Down
4 changes: 2 additions & 2 deletions _pages/docs/technote/misc07.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: 'page'
title: 'Apple II Miscellaneous Technical Note #7'
description: 'Apple II Family Identification'
permalink: '/docs/technote/misc07/'
permalink: '/docs/technote/misc/07/'
---


Expand Down Expand Up @@ -118,7 +118,7 @@ correctly before returning from this call.</p>
<h2>Further Reference</h2>

<ul>
<li><a href="/docs/technote/misc02/">Apple II Miscellaneous Technical Note #2</a>, Apple II Family Identification Routines 2.2</li>
<li><a href="/docs/technote/misc/02/">Apple II Miscellaneous Technical Note #2</a>, Apple II Family Identification Routines 2.2</li>
</ul>

<hr>
Expand Down
26 changes: 26 additions & 0 deletions _pages/docs/technote/smpt01.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
layout: 'page'
title: 'SmartPort Technical Note #1'
description: 'SmartPort Introduction'
permalink: '/docs/technote/smartport/01/'
---

<h2>Revised by Matt Deatherage (November 1988)
<br />Written by Mike Askins (November 1985)</h2>

<p>This Technical Note formerly introduced the SmartPort firmware interface.</p>

<hr />

<p>This Note formerly contained a general introduction to the SmartPort
firmware interface. Information on SmartPort as found in the Apple IIe
and IIc is now found in the Apple IIc Technical Reference Manual, Second
Edition.</p>

<p>For a more complete reference on SmartPort, including information on
Extended SmartPort (for peripherals which can address more than one 64K
bank of memory) and its parameters, please see chapter 7 of the Apple
IIGS Firmware Reference.</p>


{% include technote_credit.html %}
95 changes: 95 additions & 0 deletions _pages/docs/technote/smpt02.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
layout: 'page'
title: 'SmartPort Technical Note #2'
description: 'SmartPort Calls Updated'
permalink: '/docs/technote/smartport/02/'
---

<h2>Revised by Llew Roberts (September 1989)
<br />Written by Mike Askins (May 1985)</h2>

<p>This Technical Note documents SmartPort call information which is notfound in the descriptions of SmartPort in the Apple IIGS FirmwareReference and the Apple IIc Technical Reference Manual, Second Edition. The device-specific information which had been included in this Note isnow found in these manuals.</p>

<p>Changes since November 1988: Added diagram and information on vendor ID numbers.</p>

<hr>


<h2>STATUS Calls</h2>

<p>A STATUS call with unit number = $00 and status code = $00 is a request to return the status of the SmartPort host, as opposed to unit numbers greater than zero which return the status of individual devices. The number of devices as well as the current interrupt status is returned. The format of the status list returned is illustrated in Figure 1.</p>

<pre>

+------------------+
Byte 0 | Device Count |
+------------------+
Byte 1 | Interrupt Status |
+------------------+
Byte 2 | Vendor | $0000 Vendor unknown
+ +---$0001 Apple Computer, Inc.
Byte 3 | ID | $0002-$FFFF Third-Party Vendor
+------------------+
Byte 4 | Interface | _____|___________________|_____
+ +--|F|E|D|C|B|A|9|8|7|6|5|4|3|2|1|0|
Byte 5 | Version | |_______|_______________|_______|
+------------------+ | | |
Byte 6 | Reserved | |Major | Minor |$A=Alpha
+------------------+ |Release| Release |$B=Beta
Byte 7 | Reserved | |$E=Experimental
+------------------+ |$0=Final

Figure 1 - Host General Status Return Information

</pre>

<h3>Stat_list</h3>

<dl>
<dt>byte 0</dt><dd>Number of devices</dd>
<dt>byte 1</dt><dd>Interrupt Status (If bit 6 is set, then no interrupt)</dd>
<dt>bytes 2-3</dt><dd>Driver manufacturer (were Reserved prior to May 1988):
<br>$0000: Undetermined
<br>$0001: Apple
<br>$0002-$FFFF: Third-party driver</dd>
<dt>bytes 4-5</dt><dd>Interface Version</dd>
<dt>bytes 6-7</dt><dd>Reserved (must be $0000)</dd>
</dl>

<p>The Number of devices byte tells the caller the total number of devices hooked to this slot or port.</p>

<p>The Interrupt Status byte is used by programs which try to determine if the SmartPort was the source of an interrupt. If bit 6 of this byte is clear, there is a device (or devices) in the chain that require interrupt service.

You cannot use this value to determine which device in the chain is actually interrupting. Your interrupt handler, having determined that a SmartPort interrupt has occurred, must poll each device on the chain to find out which device requires service. The UniDisk 3.5 and Memory Expansion Card do not generate interrupts, so in these cases, this byte has bit 6 set.</p>

<p>The vendor ID number may be used to determine the manufacturer of a specific SmartPort peripheral interface card, a useful piece of information when dealing with device-specific calls. Contact Apple Developer Technical Support if you require a specific vendor ID number. The version word follows the
SmartPort Interface Version definition described later in this Note.</p>


<h2>CONTROL Codes</h2>

<p>Before May 1988, control code $04 was defined as device-specific. It is now defined as EJECT, and all SmartPort devices which support removable media must support this call. If a device does not support removable media, it should simply return from this call without an error.</p>

<p>Note that the Apple II SCSI card firmware was revised in early 1988 to support this change.</p>


<h2>INIT</h2>

<p>An application should never make an INIT call (SmartPort code $05), since doing so is likely to destroy operating system integrity and may cause media damage as well.</p>

<p>If you are writing your own operating system (not encouraged) and need to reset all SmartPort devices, the INIT call with unit number = $00 will do just that. Note that SmartPort devices cannot be selectively reset, and INIT must never be made at all with any unit number other than $00.</p>


<h2>SmartPort Interface Version Definition</h2>

<p>The SmartPort Interface Version definition uses the most significant nibble of the word as the major version number, the next two most significant nibbles as the minor version number, and the least significant nibble as a release indicator:</p>

<pre>

$0 = Final $A = Alpha $B = Beta $E = Experimental

</pre>

<p>Therefore, the interface version word for an experimental SmartPort interface 1.15 would be $115E while the interface version word for SmartPort interface 2.0 would be $2000. GS/OS driver version numbers also follow this definition.</p>

{% include technote_credit.html %}
19 changes: 19 additions & 0 deletions _pages/docs/technote/smpt03.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
layout: 'page'
title: 'SmartPort Technical Note #3'
description: 'SmartPort Bus Architecture'
permalink: '/docs/technote/smartport/03/'
---

<h2>Revised by Matt Deatherage (November 1988)
<br />Written by Mike Askins (March 1985)</h2>

<p>This Technical Note formerly described the SmartPort Bus architecture, but this information is now documented in the Apple IIGS Firmware Reference.</p>

<hr />

<p>Do not be confused by the name "SmartPort Bus" architecture. The information in the Apple IIGS Firmware Reference describes the mechanics of how devices interface with the disk port on a IIGS or IIc and with the UniDisk 3.5 Interface card on a ][+ or IIe. It is not necessary to understand this information to use SmartPort firmware calls, nor do all devices which have SmartPort firmware necessarily have to connect mechanically through the disk port or UniDisk 3.5 Interface card.</p>

<p>The physical or electrical side of the hardware is called the "SmartPort Bus," while the firmware protocols are called the "SmartPort Interface." Although the term "SmartPort" can refer to either or both parts, it is most often used to refer to the SmartPort Interface. Only those developers who are designing products which will attach to either the IIGS or IIc disk port or to the UniDisk 3.5 Interface card need be concerned with the SmartPort Bus architecture. Software developers need not learn about the SmartPort Bus architecture to use the SmartPort Interface firmware.</p>

{% include technote_credit.html %}
38 changes: 38 additions & 0 deletions _pages/docs/technote/smpt04.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
layout: 'page'
title: 'SmartPort Technical Note #4'
description: 'SmartPort Device Types'
permalink: '/docs/technote/smartport/04/'
---

<h2>Revised by Matt Deatherage (November 1988)
<br />Written by Rilla Reynolds (June 1987)</h2>

<p>This Technical Note documents additional device types which the SmartPort firmware recognizes, but which may not be currently documented in the technical reference manuals which cover SmartPort.</p>

<hr />

<p>The following is an updated list of possible SmartPort device types, extended to support an increasing variety of third-party peripheral products. A device type byte is returned as part of the Device Information Block (DIB) from a SmartPort STATUS call ($03).</p>

<ul>
<li><em>Type: Device</em></li>
<li><b>$00</b>: Memory Expansion Card (RAM disk)</li>
<li><b>$01</b>: 3.5" disk</li>
<li><b>$02</b>: ProFile-type hard disk</li>
<li><b>$03</b>: Generic SCSI</li>
<li><b>$04</b>: ROM disk</li>
<li><b>$05</b>: SCSI CD-ROM</li>
<li><b>$06</b>: SCSI tape or other SCSI sequential device</li>
<li><b>$07</b>: SCSI hard disk</li>
<li><b>$08</b>: Reserved</li>
<li><b>$09</b>: SCSI printer</li>
<li><b>$0A</b>: 5-1/4" disk</li>
<li><b>$0B</b>: Reserved</li>
<li><b>$0C</b>: Reserved</li>
<li><b>$0D</b>: Printer</li>
<li><b>$0E</b>: Clock</li>
<li><b>$0F</b>: Modem</li>
</ul>


{% include technote_credit.html %}
59 changes: 59 additions & 0 deletions _pages/docs/technote/smpt05.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
layout: 'page'
title: 'SmartPort Technical Note #5'
description: 'SCSI SmartPort Call Changes'
permalink: '/docs/technote/smartport/05/'
---

<h2>Revised by Matt Deatherage and Llew Roberts (November 1990)
<br />Written by Rilla Reynolds and Matt Deatherage (May 1988)</h2>

<p>This Technical Note describes two CONTROL codes which have changed in
revision C of the Apple II SCSI card firmware.</p>

<p><em>Changes since January 1989:</em> Added notes about the Apple II
High-Speed SCSI Card.</p>

<hr />

<p>Revision C of the Apple II SCSI card firmware includes two CONTROL code changes.</p>

<p>CONTROL code $04, previously defined as FORMAT, is now defined as
EJECT. This change reflects the revised SmartPort requirement that all
devices maintain CONTROL code $04 as EJECT. See <a
href="tn.smpt.2.html">SmartPort Technical Note #2</a>, SmartPort Calls
Updated, for more information. CONTROL code $15 is now defined as FORMAT
instead of RESERVED. Note that there are two EJECT calls in this version,
as CONTROL code $26 is still defined as EJECT.</p>

<p>To determine which version of the SCSI ROM is on any particular Apple
II SCSI Interface Card, issue a $03 SmartPort STATUS call. The revision C
SCSI ROM returns the word $0200. This does not follow the SmartPort
Interface Version scheme described in <a href="tn.smpt.2.html">SmartPort
Technical Note #2</a>. However, future revisions of the Apple II SCSI
card will follow this scheme. Therefore, applications should expect any
SmartPort SCSI firmware to behave as described in this Note if the version
number is $0200 or if it is greater than or equal to $2000. The Apple II
High-Speed SCSI Card returns version $3000 (3.0).

<p>To maintain compatibility with the Apple II High-Speed SCSI Card and future
SCSI products, you should use the following guidelines when programming with
the revision C card:</p>

<ul>
<li>Avoid access to the hardware or any RAM locations on the SCSI card.</li>
<li>Do not use the Patch1Call, SetNewSDAT, or SetBlockSize control calls.</li>

<li>For devices with a block size other than 512 bytes, use the SmartPort Read
and Write calls. Do not use ReadBlock and WriteBlock calls for these devices,
since they only read or write the first 512 bytes of a block. The Read and
Write calls may also be used for devices with a 512-byte block size.</li>

<li>Never Reset the SCSI bus.</li>
</ul>

<p>The Apple II SCSI Card firmware was designed to operate with SCSI CD-ROM and
disk drives only; however, the Apple II High-Speed SCSI Card works with most
SCSI devices, including removable drives, scanners, and tape backup units.</p>

{% include technote_credit.html %}
27 changes: 27 additions & 0 deletions _pages/docs/technote/smpt06.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
layout: 'page'
title: 'SmartPort Technical Note #6'
description: 'Apple IIgs SmartPort Errata'
permalink: '/docs/technote/smartport/06/'
---

<h2>Revised by Matt Deatherage (November 1990)
<br>Written by Matt Deatherage (November 1988)</h2>

<p>This Technical Note documents two bugs in the Apple IIgs SmartPort firmware.</p>

<p><em>Changes since November 1988:</em> Documented corrections in ROM 03 and an additional ROM 03 bug.</p>

<hr>

<p>Developers should be aware of the following two bugs in the Apple IIgs ROM 01 SmartPort firmware:</p>

<ol>
<li>SmartPort accidentally uses locations $57 through $5A on the zero page without saving and restoring them first. There is some confusion as to whether these bytes are used on the absolute zero page or on the caller's direct page. This is a moot point -- SmartPort calls are required to be made from full-emulation mode. This requirement means the emulation bit must be set and the data bank and direct page registers must both be set to zero. The bytes are used on the absolute zero page, as that should be the direct page when SmartPort is called.</li>

<li>If an extended SmartPort CONTROL call is made, the CONTROL list must not start at $FFFE or $FFFF of any bank. The IIgs SmartPort interface does not increment the bank pointer when moving past the two-byte CONTROL list length. If a CONTROL list starts one or two bytes before a bank boundary, SmartPort will incorrectly read the list from the beginning of that bank, instead of the beginning of the next bank.</li>
</ul>

<p>The ROM 03 firmware fixes these bugs; however, it has a bug in the ResetHook device-specific CONTROL call for the Apple 3.5" Drive. With this bug, hook numbers of nine or greater crash the machine. At present, hook numbers in this range are invalid, so this bug should not be a problem.</p>

{% include technote_credit.html %}
Loading

0 comments on commit 5a8cce6

Please sign in to comment.