home *** CD-ROM | disk | FTP | other *** search
/ The AGA Experience 2 / agavol2.iso / software / utilities / emulation / appleii / apple2000_utilities / afid.doc < prev    next >
Text File  |  1992-07-27  |  4KB  |  79 lines

  1. This file describes version 1.0 of afid.
  2. The latest version should be available for anonymous FTP from
  3. cs.ubc.ca in /ftp/local/src/afid.
  4.  
  5. afid is a utility which allows you to manipulate an Apple ][ DOS 3.3
  6. disk image.  It currently doesn't handle Prodos disk images and only
  7. reads and writes 35 track, 16 sector diskette images.
  8.  
  9. afid provides a simple command line interface.  You start it up
  10. by giving it the name of a disk image:
  11.  
  12.     afid file.dsk
  13.  
  14. It then reads the disk image into memory, does a few sanity checks and
  15. gives you the "] " prompt.  You can use the following commands:
  16.  
  17. catalog - show a list of the files on the disk image
  18. free - display a map of free sectors and the number of free sectors
  19. quit, exit - leave afid
  20. binary - no translation of file data is done during copies (this is the default)
  21. text - CR <-> LF and Apple <-> ASCII translations are done to file data
  22. reorder - switch disk sector order between DOS 3.3 (default) and Prodos
  23. read file - copy the given file from the disk image to a UNIX file
  24. write file - copy the given UNIX file onto the disk image
  25. save file-image - save the in-memory disk image to the given UNIX file
  26.  
  27. Notes:
  28.  
  29. "save" is important, and changes made with "write" will not be permanent
  30. until you save the disk image.  File names are translated to all uppercase
  31. on the Apple disk and to all lowercase on the UNIX end.  This is convenient,
  32. but could be annoying.  I'm not sure that the text translation is done
  33. correctly.  I just empirically judged that twiddling the top bit was
  34. the right thing to do.  Binary file copy is a little hokey; pay no mind
  35. to the extra stuff it spits out at you.  Disk block ordering can be a
  36. little tricky.  Basically, if you make the disk image on a machine running
  37. Prodos, you'll have to re-order the sectors.  This means that probably
  38. anything extracted from a Shrinkit archive will need to be reordered.
  39. It can be hard to tell since the most obvious symptom is a shortened
  40. catalog which is not a lot different from a normally short catalog.
  41.  
  42. The free command spits out some crap about the sector mask.  You can
  43. ignore it, but knowledgable folks could help me out.  I gather that
  44. the mask allows you to specify sectors which cannot be used, but
  45. I've never seen a mask that was usable.  What's wrong?
  46.  
  47. I've compiled afid on a Sun sparcstation with gcc and on a PC with
  48. Turbo-C 2.0.  It should be fairly portable if your machine has enough
  49. memory.  I hope this inspires someone to create a Prodos version.
  50.  
  51. Things to do:
  52.  
  53. The most obvious extension is file operations such as type changing
  54. and deletion.  If the disk fills up, you're left with a partial file
  55. on the disk.  The file system is still stable at that point, but
  56. not deleting the failed file is pretty messy.  File reads should
  57. do something smart like paying attention to the file type.
  58. A warning that the disk blocks are out of order could be put in.
  59. Options to switch the file-name mapping on and off would be nice.
  60. A file-duplicating mechanism could be useful if you ever should run
  61. into files with holes.  Sector allocation is not done in the same
  62. way as DOS 3.3 (not so bad) and may not be very efficient at times
  63. (not so good).
  64.  
  65. The code could use some cleaning up, for sure.  I'd try and completely
  66. localize things like the VTOC accesses and come up with a few
  67. master directory scanning and file scanning loops instead of duplicating
  68. the code here and there.
  69.  
  70. I'm looking towards getting a Deluxe Option Board for my PC.  I know
  71. it can read apple ][ disks into bit images.  Should I get the board
  72. and can figure out the format of those bit images, you can bet afid
  73. will be enhanced.  This should provide a very nice file transfer path:
  74. diskette -> bit file image -> afid -> bit file image -> diskette.
  75. This is pretty plausible, but real pie in the sky would be a program
  76. that could work directly with the apple ][ disk on your PC with the
  77. option board.  Probably won't happen as I doubt programming information
  78. on the option board will be easy to find.
  79.