home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / bbs / ff870.lha / SoftProtect / SoftProtect.ReadMe < prev    next >
Text File  |  1991-03-10  |  4KB  |  97 lines

  1.  
  2. Program name:  SoftProtect. an update from the program AskFirst
  3.  
  4. Written with:  Profimat Assembler
  5.  
  6. Machine:       Standard Amiga 500 with OS1.3, One floppy drive,1 MByte RAM
  7.  
  8. Author:        Kamran Karimi
  9.  
  10. Source:        Included
  11.  
  12. What it does:  A software disk write protection. Optionally disables writes
  13. to a write-enabled floppy.  
  14.  
  15. Program status:The program can be used freely but I retain the Copyright to
  16. both the source and the executable forms of the program.
  17.  
  18. Directory contents:
  19.  SoftProtect      1296 Bytes
  20.  SoftProtect.s
  21.  SoftProtect.ReadMe
  22.  
  23.  
  24.  This program is intended as a substitute for the write disable tab
  25. on the 3.5" disks. My intention was to force the system to believe that the 
  26. disk is write protected eventhough it is in the write enable state. This may
  27. prove useful to those users who don't want to always worry if their disks
  28. are write disabled or not, for the fear of viruses or an accidental write.
  29.  
  30.  It opens a small window  with a gadget which can be toggled to "OK" and "NO" 
  31. states. OK means you want to write to disks which are write enabled but NO 
  32. means you want writes to be disabled even on write enabled disks.
  33.  
  34.  When run from the shell, you can enter an optional 'no' (not case sensetive)
  35. after the program name, Then the gadget will be set to NO and writes are
  36. disabled. 
  37.  
  38.  The previous version of the program used a software method but SoftProtect
  39. uses the CIA hardware to fool the system in believing that the disk in drive
  40. is write protected. The story follows.
  41.  
  42.  
  43.  One of the things we study at the university (I am an undergraduate 
  44. Telecommunications student) is the programming of 8086 and the related chips
  45. like parallel ,serial or interrupt controllers ( let me assure you that IBM 
  46. assembly language is a joke when compared with the flexibility and power of
  47. 68000 assembly). The course emphasizes on using the 8086 as a controlling 
  48. device ,and not much is said about writing software for MS-DOS, But that is
  49. what one expects from an electrical class.
  50.  
  51. When preparing myself for the final exams, I became curious about the Amiga 
  52. CIAs and read a few pages about them. Then the idea of this program came to
  53. my mind :
  54.  
  55.  It is possible to define the direction of signal propagation in the 8520s in 
  56. an arbitrary manner bit for bit. the signal showing that the disk is write 
  57. protected or not, and the disk change signal are available in one of the 
  58. CIA-A registers.
  59.  
  60.  The program does the following when it is requested by the user to protect 
  61. the disk from writing: first the direction of CHNG and WPRO lines are changed 
  62. so that the actual signals from the drive does not affect them. Then the WPRO
  63. line is activated to fool the system into believing that the disk is write
  64. protected. So as to enforce this, the CHNG line is activated for half a second
  65. and then deactivated. This makes the system believe that a disk change has
  66. occured and it will gather information about the 'new' disk, among them write
  67. protection information. By now the system won't let any writes to the floppy.
  68. After this the CHNG's direction is set to its original state.
  69.  
  70.  As the hardware registers are changed, even viruses may fail, but don't rely
  71. on that.
  72.  
  73.  When the user allows writes to the write enabled disks (that is, the gadget
  74. shows OK) the same procedure as above is taken but this time, before the
  75. artificial disk change occurs, WPRO line's direction is set to the original
  76. state.  
  77.  
  78.  That was all.
  79.  
  80.  
  81.  I have not tested the program under any other OS version, processor or with
  82. more than one floppy and don't know the effects of it on floppy drives other 
  83. than df0: .
  84.  
  85.  
  86.  Send any bugs you find or any suggestions to
  87.  
  88.                Kamran Karimi
  89.                2,Hassanabad
  90.                Haghshenas  str.
  91.                Navab       str.
  92.                13599 - Tehran
  93.                Iran
  94.  
  95.  
  96.  
  97.