Documentation Archive Developer
Search

ADC Home > Reference Library > Technical Notes > Legacy Documents > Apple Applications >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Apple File Exchange Q&As

CONTENTS

This Technical Note contains a collection of archived Q&As relating to a specific topic--questions sent the Developer Support Center (DSC) along with answers from the DSC engineers. Current Q&A's can be found on the Macintosh Technical Q&A's web site.

[Oct 01 1990]






Apple File Exchange (AFE) translator documentation

Information on how to write an Apple File Exchange (AFE) translator is available through APDA as "Apple File Exchange Technical Reference Package v.1.1." The package includes an 800K disk and 184 pages of documentation.

Apple File Exchange (AFE) Apple II 'pdos' creator type

Date Written: 6/18/90

Last reviewed: 8/30/91

Could you give me a description (or where to find it) of the 'pdos' resource created by Apple File Exchange when bringing over files from an Apple ][?

___

Apple File Exchange (AFE) makes a 'pdos' creator type for Apple II files it creates on the Macintosh. The format of the file depends upon the type of file it was on the Apple II, but the creator is always 'pdos', with the file type differentiating between different Apple II file types.

The way files are supposed to be translated is found on page 141 of "The AppleShare Programmer's Guide for the Apple II," available through APDA. In the case of AppleShare, it must perform the translations on the fly, and AFE follows the same basic rules. In case you don't currently have this manual, I'll include the relevant parts of it below for your reference.

Equivalence of Macintosh and GS/OS file types

Apple II files are distinguished by a Macintosh creator of 'pdos'. The Apple II filetype SYS (=$FF) has a Macintosh filetype of 'PSYS'. The Apple II filetype S16 (=$B3) has a Macintosh filetype of 'PS16'. The Apple II unknown filetype (=$00) has Macintosh filetype 'BINA'. Apple II text files (TXT = $04) with auxtype of $0000 (i.e., normal ASCII text, no records) has Macintosh filetype 'TEXT'. These special cases allow Macintosh to display unique icons for these filetypes.

Macintosh files with creator 'pdos' and a filetype of the form 'XY ' (two hex digits followed by two spaces) will get Apple II filetype $XY and auxtype $0000. Macintosh files with creator 'pdos' and a filetype of the form $70uvwxyz ($70 is the lower-case "p") have ProDOS filetype $uv and auxtype $wxyz (note the order of the bytes: on the Macintosh, they are stored high-low instead of low-high).

APW source files (ProDOS filetype $B0) are given Macintosh filetype 'TEXT' so that they can be edited more easily.

The conversion rules are summarized in the following tables. If more than one rule applies, the one closest to the top of the table is used.

ProDOS -> Macintosh conversion

ProDOS             Macintosh
Filetype    Auxtype    Creator    Filetype
$00          $0000     'pdos'     'BINA'
$B0 (SRC)    (any)     'pdos'     'TEXT'
$04 (TXT)    $0000     'pdos'     'TEXT'
$FF (SYS)    (any)     'pdos'     'PSYS'
$B3 (S16)    (any)     'pdos'     'PS16'
$uv          $wxyz     'pdos'     'p' $uv $wx $yz

Macintosh -> ProDOS conversion

Macintosh              ProDOS
Creator     Filetype   Filetype         Auxtype
(any)        'BINA'    $00              $0000
(any)        'TEXT'    $04 (TXT)        $0000
'pdos'       'PSYS'    $FF (SYS)        $0000
'pdos'       'PS16'    $B3 (S16)        $0000
'pdos'       'XY[[Delta]][[Delta]]'*   $XY              $0000
'pdos'       'p'       $uv $wx $yz $uv  $wxyz
(any)        (any)     $00              $0000

Translating Macintosh extended ASCII set to 7-bit ASCII

Date Written: 1/28/91

Last reviewed: 2/15/91

What is the best way to convert text created using the standard Macintosh character set to 7-bit ASCII for display on a terminal? Is there a standard call or table that will give me what I want?

___

The Macintosh uses an extended ASCII character set. The first 128 (0-127) characters are standard ASCII, but the next 128 (128-255) are unique to the Macintosh.

There are problems when converting from a large set to a smaller set. I am including two samples (there is no ONE correct way) of how to do the conversion from Macintosh to ASCII.

One way is to simplify the character to the closest ASCII character. This unfortunately loses information that distinguished the original character, but still maintains the same data size (it actually shrinks from 8 bits to 7 bits). Another way is to approximate the original character with multiple ASCII characters. This retains more information, but increases the size of the data.

You will have to choose the best approach for your situation.

We created the files by converting a Text file with the complete set of Char values with the Apple File Exchange utility (included with each set of System disks). We chose the Mac-ProDOS option (Text Translation...) and generated both single and multiple character conversions. I then combined the results with Excel.

You can get the Apple File Exchange Technical Reference package from APDA (M7051) and possibly use some of the routines from there. (I am not sure if the results are useful only with AFE or if you can link them into your own application.)

If the AFE tools are inappropriate for your situation, then it would be easy to take the following data and just do a table conversion. You will need to use a font like Courier to see the complete Macintosh character set.

ASCII        Mac        Single     Multiple
128           Ä          A          A"
129           Å          A          AA
130           Ç          C          C,
131           É          E          E'
132           Ñ          N          N~
133           Ö          O          O"
134           Ü          U          U"
135           Á          a          a'
136           À          a          a'
137           Â          a          a^
138           Ä          a          a"
139           Ã          a          a~
140           Å          a          aa
141           Ç          c          c,
142           É          e          e'
143           È          e          e'
144           Ê          e          e^
145           Ë          e          e"
146           Í          i          i'
147           Ì          i          i'
148           Î          i          i^
149           Ï          i          i"
150           Ñ          n          n~
151           Ó          o          o'
152           Ò          o          o'
153           Ô          o          o^
154           Ö          o          o"
155           õ          o          o~
156           Ú          u          u'
157           Ù          u          u'
158           Û          u          u^
159           Ü          u          u"
160           +          t          t
special character table 1

special character table 2


Back to top

Downloadables

Acrobat gif

Acrobat version of this Note (91K).

Download