home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
Geneve
/
9640news
/
CAT18
/
NEWDISK.ARK
< prev
next >
Wrap
Text File
|
2006-10-19
|
7KB
|
235 lines
?
; P O O R M A N S D O U B L E
;
; D E N S I T Y D I S K
;
; C O N T R O L L E R
;
; or how to get 360K bytes per drive
; using the TI Disk Controller Card
; and 96 tpi double side drives.
; (eg TEAC 55f, TANDON TM100-4
;
;
;**************************************
;*
;* This code, when substituted for the
;* existing DSR code, converts disk #4
;* and disk #5 into 40/80 track inter-
;* lace mode and disk #9 to 40/80 track
;* non-interlace (single side). The
;* modification has been completely
;* compatable with all software tested
;* including P-System, Disk Manager,
;* Editor Assembler and Basic. Note
;* however that files can only be
;* exchanged with "normal" format disks
;* using the disk copy routines or dsk3
;* (disk #9).
;*
;* This code is placed into the public
;* domain by the author for non comm-
;* ercial use.
;*
;* Any questions may be directed to the
;* author at
;* Andy Cooper
;* 121 Clearview Drive
;* Downingtown Pa 19335
;*
;*
;**************************************
;
.absolute
.proc newdsk
.org 4116h
clr r7 ; existing code
ci r1, 1440 ; 1440 is max sector #
jhe $+152 ; jump to error if greater
ci r1, 1 ; check for sector = 0
jh $5 ; jump if not
bl @4524h ; if sector = 0 then restore
$5 clr r0
cb @004Ch(r9),@4BA6h ; compare drive # to 3
jl $10 ; jump if 1 or 2
div @441Eh, r0 ; If drive = 3 use 9 sectors per track
jmp $20
$10 div @547Ch, r0 ; if drive < 3 use 18 sectors per track
$20 swpb r0
inv r0 ; R0 msb contains inverted track #
bl @4614h ; set up vdp write
movb r0, @0FFFEh(r15) ; Store new (calc) track #
movb r0, @5FFEh ; write trk # to 1771 disk controller
ci r1, 9 ; check for sector > 8 (side two)
jl $30
ai r1, -9 ; If >9 subtract nine and....
sbo 7 ; select side two (head 2)
li r7, 0100h
$30 swpb r1
inv r1 ; R1 msb contains inverted sector #
movb r1, @5FFCh ; write to 1771 sector register
jmp $40 ; waste a word !!!!!!
$40 cb r0, @5FF2h ; Back to original code.
.end
;**************************************
;*
;* To install a 2732 or 2732A prom on
;* the TI Disk controller card with the
;* above changes perform the following
;* steps.
;*
;* Remove the ROM at location U26.
;*
;* On the back (non component) of the
;* board cut the wide (+5v) etch between
;* U26 pins 21 and 24.
;*
;* On the front of the board cut the
;* wide etch going to U26 pin 21.
;*
;* On the front (component side) of the
;* board cut the etch going to U26
;* pin 18.
;*
;* NOTE: to ensure that the etch is cut
;* I recommend that two cuts 1/16 inch
;* apart be made and the copper trace
;* be removed between the two cuts.
;*
;* Install a 24 pin socket at U26
;*
;* On the back (non component) side of
;* the board add the following wires:
;*
;* U26 pin 18 to U26 pin 20.
;*
;* U27 pin 18 to U26 pin 21.
;*
;* Via hole in center of chip area
;* between U26 pin 21,22 to junction
;* of C26 and U36 pin 24 (+5v).
;*
;* Install prom in socket and.....
;*
;* thats all!
;*
;**************************************
;**************************************
;*
;* The following is an Editor Assembler
;* program that may be used to convert
;* normal disks to interlace format
;* prior to changing the Disk DSR. If
;* you wish drive 3 can be used to copy
;* single side disks to drives 1 and 2
;* using the P-System filer or Disk
;* Manager. (adapted from sector RW
;* tutorial writen by Todd Kaplan).
;
MYREG BSS 32
DEF START
REF DSRLNK,VSBW,VMBW
REF VMBR,KSCAN
START
LWPI MYREG
LOOP CLR @>8374
BLWP @KSCAN
CB @KKEY,@SPACE
JNE LOOP
CLR R4
CLR R5
CLR R6
LOOP1 CI R4,360 ;720 FOR DOUBLE SIDE
JL LOOP2
LIMI 0
LIMI 2 ;WAIT FOR QUIT
JMP LOOP1
LOOP2 MOV R4,@SECTOR ;SECTOR TO PROCESS
BL @RSECT ;READ SECTOR
MOV R5,@SECTOR ;SECTOR TO WRITE
BL @WSECT ;WRITE SECTOR
INC R4 ;INCREMENT READ SECTOR (LINEAR)
MOV R4,R1
CLR R0
DIV @NINE,R0 ;CALC TRACK
MOV R0,R2 ;TRK TO R2
ANDI R2,1
JEQ EVEN ;JMP IF EVEN TRACK
ODD
CLR R2
MOV R0,R3 ;TRK TO R3
DIV @TWO,R2 ;DIVIDE IT BY 2
CLR R3
MPY @NINE,R2
LI R2,711
S R3,R2
A R1,R2
MOV R2,R5 ;INTERLACE (SIDE 2) TRK/SECTOR
JMP LOOP1
EVEN
CLR R2
MOV R0,R3 ;TRACK TO R3
DIV @TWO,R2 ;DIVIDE TRACK BY 2
CLR R3
MPY @NINE,R2
A R1,R3
MOV R3,R5 ;SIDE 1 TRACK
JMP LOOP1
**************************************
* READ SECTOR ROUTINE
*
RSECT
MOV @DUMPAB,R0
LI R1,DUMDAT
LI R2,2
BLWP @VMBW
MOV @KD1RD,@DRVFLG ;READ FROM DRIVE 1
MOV @DUMBUF,@BUFADD
MOV @DUMPAB,@PABADD
BLWP @DSRLNK
DATA 10
RT
**************************************
* WRITE SECTOR ROUTINE
*
WSECT
MOV @DUMPAB,R0
LI R1,DUMDAT
LI R2,2
BLWP @VMBW
MOV @KD2WR,@DRVFLG ;WRITE TO DRIVE 2
MOV @DUMBUF,@BUFADD
MOV @DUMPAB,@PABADD
BLWP @DSRLNK
DATA 10
RT
*************************************
* DEFINES AND DATA
*
NINE DATA 9
TWO DATA 2
KKEY EQU >8375
PABADD EQU >8356
BUFADD EQU >834E
SECTOR EQU >8350
DRVFLG EQU >834C
SPACE DATA >2020
DUMPAB DATA >1500
KD1RD DATA >0101
KD1WR DATA >0100
KD2WR DATA >0200
KD3WR DATA >0300
DUMDAT DATA >0110
DUMBUF DATA >1000
END
Download complete. Turn off Capture File.