home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / Geneve / 9640news / CAT18 / NEWDISK.ARK < prev    next >
Text File  |  2006-10-19  |  7KB  |  235 lines

  1. ?
  2. ; P O O R   M A N S   D O U B L E
  3. ;
  4. ;     D E N S I T Y   D I S K
  5. ;
  6. ;       C O N T R O L L E R
  7. ;
  8. ; or how to get 360K bytes per drive
  9. ; using the TI Disk Controller Card
  10. ; and 96 tpi double side drives.
  11. ; (eg TEAC 55f, TANDON TM100-4
  12. ;
  13. ;
  14. ;**************************************
  15. ;*
  16. ;* This code, when substituted for the
  17. ;* existing DSR code, converts disk #4
  18. ;* and disk #5 into 40/80 track inter-
  19. ;* lace mode and disk #9 to 40/80 track
  20. ;* non-interlace (single side). The
  21. ;* modification has been completely
  22. ;* compatable with all software tested
  23. ;* including P-System, Disk Manager,
  24. ;* Editor Assembler and Basic. Note
  25. ;* however that files can only be
  26. ;* exchanged with "normal" format disks
  27. ;* using the disk copy routines or dsk3
  28. ;* (disk #9).
  29. ;*
  30. ;* This code is placed into the public
  31. ;* domain by the author for non comm-
  32. ;* ercial use.
  33. ;*
  34. ;* Any questions may be directed to the
  35. ;* author at
  36. ;*              Andy Cooper
  37. ;*              121 Clearview Drive
  38. ;*              Downingtown Pa 19335
  39. ;*
  40. ;*
  41. ;**************************************
  42. ;
  43.         .absolute
  44.         .proc newdsk
  45.         .org 4116h
  46.         clr     r7                      ; existing code
  47.         ci      r1,     1440            ; 1440 is max sector #
  48.         jhe     $+152                   ; jump to error if greater
  49.         ci      r1,     1               ; check for sector = 0
  50.         jh      $5                      ; jump if not
  51.         bl      @4524h                  ; if sector = 0 then restore
  52. $5      clr     r0
  53.         cb      @004Ch(r9),@4BA6h       ; compare drive # to 3
  54.         jl      $10                     ; jump if 1 or 2
  55.         div     @441Eh, r0              ; If drive = 3 use 9 sectors per track
  56.         jmp     $20
  57. $10     div     @547Ch, r0              ; if drive < 3 use 18 sectors per track
  58. $20     swpb    r0
  59.         inv     r0                      ; R0 msb contains inverted track #
  60.         bl      @4614h                  ; set up vdp write
  61.         movb    r0,     @0FFFEh(r15)    ; Store new (calc) track #
  62.         movb    r0,     @5FFEh          ; write trk # to 1771 disk controller
  63.         ci      r1,     9               ; check for sector > 8 (side two)
  64.         jl      $30
  65.         ai      r1,     -9              ; If >9 subtract nine and....
  66.         sbo     7                       ; select side two (head 2)
  67.         li      r7,     0100h
  68. $30     swpb    r1
  69.         inv     r1                      ; R1 msb contains inverted sector #
  70.         movb    r1,     @5FFCh          ; write to 1771 sector register
  71.         jmp     $40                     ; waste a word !!!!!!
  72. $40     cb      r0,     @5FF2h          ; Back to original code.
  73.  
  74.         .end
  75.  
  76. ;**************************************
  77. ;*
  78. ;* To install a 2732 or 2732A prom on
  79. ;* the TI Disk controller card with the
  80. ;* above changes perform the following
  81. ;* steps.
  82. ;*
  83. ;* Remove the ROM at location U26.
  84. ;*
  85. ;* On the back (non component) of the
  86. ;* board cut the wide (+5v) etch between
  87. ;* U26 pins 21 and 24.
  88. ;*
  89. ;* On the front of the board cut the
  90. ;* wide etch going to U26 pin 21.
  91. ;*
  92. ;* On the front (component side) of the
  93. ;* board cut the etch going to U26
  94. ;* pin 18.
  95. ;*
  96. ;* NOTE: to ensure that the etch is cut
  97. ;* I recommend that two cuts 1/16 inch
  98. ;* apart be made and the copper trace
  99. ;* be removed between the two cuts.
  100. ;*
  101. ;* Install a 24 pin socket at U26
  102. ;*
  103. ;* On the back (non component) side of
  104. ;* the board add the following wires:
  105. ;*
  106. ;* U26 pin 18 to U26 pin 20.
  107. ;*
  108. ;* U27 pin 18 to U26 pin 21.
  109. ;*
  110. ;* Via hole in center of chip area
  111. ;* between U26 pin 21,22 to junction
  112. ;* of C26 and U36 pin 24 (+5v).
  113. ;*
  114. ;* Install prom in socket and.....
  115. ;*
  116. ;* thats all!
  117. ;*
  118. ;**************************************
  119.  
  120. ;**************************************
  121. ;*
  122. ;* The following is an Editor Assembler
  123. ;* program that may be used to convert
  124. ;* normal disks to interlace format
  125. ;* prior to changing the Disk DSR. If
  126. ;* you wish drive 3 can be used to copy
  127. ;* single side disks to drives 1 and 2
  128. ;* using the P-System filer or Disk
  129. ;* Manager. (adapted from sector RW
  130. ;* tutorial writen by Todd Kaplan).
  131. ;
  132. MYREG   BSS 32
  133.         DEF START
  134.         REF DSRLNK,VSBW,VMBW
  135.         REF VMBR,KSCAN
  136. START
  137.         LWPI MYREG
  138. LOOP    CLR @>8374
  139.         BLWP @KSCAN
  140.         CB   @KKEY,@SPACE
  141.         JNE  LOOP
  142.         CLR  R4
  143.         CLR  R5
  144.         CLR  R6
  145. LOOP1   CI   R4,360     ;720 FOR DOUBLE SIDE
  146.         JL   LOOP2
  147.         LIMI 0
  148.         LIMI 2          ;WAIT FOR QUIT
  149.         JMP  LOOP1
  150. LOOP2   MOV  R4,@SECTOR ;SECTOR TO PROCESS
  151.         BL   @RSECT     ;READ SECTOR
  152.         MOV  R5,@SECTOR ;SECTOR TO WRITE
  153.         BL   @WSECT     ;WRITE SECTOR
  154.         INC  R4         ;INCREMENT READ SECTOR (LINEAR)
  155.         MOV  R4,R1
  156.         CLR  R0
  157.         DIV  @NINE,R0   ;CALC TRACK
  158.         MOV  R0,R2      ;TRK TO R2
  159.         ANDI R2,1
  160.         JEQ  EVEN       ;JMP IF EVEN TRACK
  161. ODD
  162.         CLR  R2
  163.         MOV  R0,R3      ;TRK TO R3
  164.         DIV  @TWO,R2    ;DIVIDE IT BY 2
  165.         CLR  R3
  166.         MPY  @NINE,R2
  167.         LI   R2,711
  168.         S    R3,R2
  169.         A    R1,R2
  170.         MOV  R2,R5      ;INTERLACE (SIDE 2) TRK/SECTOR
  171.         JMP  LOOP1
  172. EVEN
  173.         CLR  R2
  174.         MOV  R0,R3      ;TRACK TO R3
  175.         DIV  @TWO,R2    ;DIVIDE TRACK BY 2
  176.         CLR  R3
  177.         MPY  @NINE,R2
  178.         A    R1,R3
  179.         MOV  R3,R5      ;SIDE 1 TRACK
  180.         JMP  LOOP1
  181.  
  182. **************************************
  183. * READ SECTOR ROUTINE
  184. *
  185. RSECT
  186.         MOV  @DUMPAB,R0
  187.         LI   R1,DUMDAT
  188.         LI   R2,2
  189.         BLWP @VMBW
  190.         MOV  @KD1RD,@DRVFLG ;READ FROM DRIVE 1
  191.         MOV  @DUMBUF,@BUFADD
  192.         MOV  @DUMPAB,@PABADD
  193.         BLWP @DSRLNK
  194.         DATA 10
  195.         RT
  196. **************************************
  197. * WRITE SECTOR ROUTINE
  198. *
  199. WSECT
  200.         MOV  @DUMPAB,R0
  201.         LI   R1,DUMDAT
  202.         LI   R2,2
  203.         BLWP @VMBW
  204.         MOV  @KD2WR,@DRVFLG  ;WRITE TO DRIVE 2
  205.         MOV  @DUMBUF,@BUFADD
  206.         MOV  @DUMPAB,@PABADD
  207.         BLWP @DSRLNK
  208.         DATA 10
  209.         RT
  210. *************************************
  211. * DEFINES AND DATA
  212. *
  213. NINE    DATA 9
  214. TWO     DATA 2
  215. KKEY    EQU >8375
  216. PABADD  EQU >8356
  217. BUFADD  EQU >834E
  218. SECTOR  EQU >8350
  219. DRVFLG  EQU >834C
  220. SPACE   DATA >2020
  221. DUMPAB  DATA >1500
  222. KD1RD   DATA >0101
  223. KD1WR   DATA >0100
  224. KD2WR   DATA >0200
  225. KD3WR   DATA >0300
  226. DUMDAT  DATA >0110
  227. DUMBUF  DATA >1000
  228.  
  229.         END
  230.  
  231.  
  232. Download complete.  Turn off Capture File.
  233.  
  234.  
  235.