home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ENTERPRS
/
CPM
/
UTILS
/
F
/
RDMS232.ARK
/
RDMS.DOC
next >
Wrap
Text File
|
1989-09-27
|
10KB
|
250 lines
Notes on RDMS23 - a program to read MS-DOS disks under CP/M.
John Hastwell-Batten
SYSOP
Tesseract RCPM+
P.O. Box 242
Dural, NSW 2158
AUSTRALIA
RDMS23 i≤ ß prograφ whicΦ use≤ thσ CP/═ BIO╙ t∩ reaΣ file≤ froφ ì
MS-DO╙ diskette≤ anΣ thσ CP/═ BDO╙ t∩ writσ thσ file≤ t∩ ß CP/═ ì
disk«ì
RDMS23 i≤ deriveΣ froφ RDMSDOS.├ whicΦ wa≤ writteε b∙ BoΓ ì
Alverson« Thσ versioε releaseΣ int∩ thσ publiπ domaiε wa≤ 1.▒ ì
writteε fo≥ compilatioε witΦ small-├ anΣ fo≥ operatioε unde≥ CP/═ ì
2.2.
Sincσ theε ╔ havσ donσ ß lo⌠ oµ worδ oε thi≤ program« Apar⌠ froφ ì
fixinτ ß fe≈ significan⌠ bugs¼ thσ majo≥ change≤ havσ beeε t∩ ì
makσ i⌠ ruε unde≥ CP/═ versioε 3.▒ whicΦ i≤ thσ operatinτ systeφ ì
tha⌠ ╔ no≈ use« ╔ als∩ addeΣ ß stacδ oµ comment≤ includinτ somσ ì
note≤ oε implementation« Hopefully¼ thσ lates⌠ revisioε caε als∩ ì
ruε unde≥ CP/═ 2.2.
RDMS23 i≤ writteε iε Hi-TecΦ ├ bu⌠ jus⌠ abou⌠ an∙ "K&Ró ├ ì
compile≥ caε bσ useΣ providinτ i⌠ support≤ thσ malloc(⌐ functioε ì
o≥ equivalent« Eveε tha⌠ i≤ n∩ rea∞ obstacle╗ yo⌡ coulΣ makσ thσ ì
dynamicall∙ allocateΣ memor∙ statiπ insteaΣ a⌠ thσ cos⌠ oµ ì
increaseΣ prograφ size« (Thσ prograφ wa≤ originall∙ writteε tha⌠ ì
way.)
Thσ operatioε oµ thσ prograφ i≤ somewha⌠ dependen⌠ oε thσ wa∙ ì
tha⌠ thσ BIO╙ oµ thσ hos⌠ CP/═ systeφ handle≤ double-sideΣ ì
diskettes« AlthougΦ ╔ havσ trieΣ t∩ cate≥ fo≥ somσ oµ thσ morσ ì
commonl∙ useΣ method≤ yo⌡ ma∙ havσ t∩ modif∙ thσ program« Iε ì
somσ case≤ yo⌡ ma∙ havσ t∩ modif∙ you≥ BIO╙ iµ yo⌡ reall∙ wan⌠ t∩ ì
usσ thi≤ program« Somσ note≤ oε adaptinτ thσ prograφ appea≥ ì
late≥ iε thi≤ documentation.
Pre-requisites:
--------------
Therσ arσ somσ absolutσ requirement≤ whicΦ mus⌠ bσ me⌠ beforσ yo⌡ ì
can use this program:
1. You≥ systeφ mus⌠ havσ ß 40-tracδ 5.25ó disδ drivσ whicΦ caε ì
áááááreaΣ double-sided¼ double-densit∙ diskettes.
2. Thσ BIO╙ mus⌠ bσ capablσ oµ readinτ a⌠ leas⌠ ninσ 512-bytσ ì
ááááásector≤ from each track.
Future development:
------------------
èv2.x Preserve CRC integrity (maybe).
v3.x Allow writing to MS-DOS disks.
=================================================================
How to use RDMS23
=================
Activating the program
----------------------
Parδ RDMS23.CO═ oε an∙ convenien⌠ disk« Oε m∙ systeφ ╔ pu⌠ i⌠ oε ì
drivσ A║ iε use≥ areß ░ anΣ madσ i⌠ ß systeφ filσ s∩ tha⌠ ╔ caε ì
ruε i⌠ froφ an∙ disδ ª use≥ area« ZCP╥ user≤ wil∞ bσ ablσ t∩ d∩ ì
the same trick.
I⌠ i≤ probabl∙ worthwhilσ renaminτ thσ prograφ t∩ somethinτ likσ ì
RDMS.CO═ t∩ savσ unnecesar∙ typing« Thesσ note≤ assumσ tha⌠ namσ ì
froφ no≈ on.
No≈ loτ int∩ thσ disk/use≥ wherσ yo⌡ wan⌠ t∩ pu⌠ thσ file≤ whicΦ ì
you are going to copy from the MS-DOS disk.
Activatσ thσ prograφ b∙ typinτ it≤ name« RDMS need≤ t∩ bσ tolΣ ì
thσ disδ drivσ wherσ thσ MS-DO╙ diskettσ i≤ loaded« Yo⌡ caε ì
includσ thσ drivσ lette≥ oε thσ commanΣ linσ iµ yo⌡ wish¼ ì
otherwise RDMS will prompt for it. The command-line forms are:
rdms -or- rdms d
where 'd' is the MS-DOS drive letter.
[Other command-line options are discussed later.]
RDMS wil∞ reaΣ thσ Filσ Allocatioε Tablσ anΣ thσ roo⌠ director∙ ì
froφ thσ MS-DO╙ disδ anΣ wil∞ displa∙ thσ roo⌠ directory« Yo⌡ ì
arσ theε iε ß positioε t∩ cop∙ file≤ froφ thσ MS-DO╙ diskettσ t∩ ì
ß CP/═ disk.
Copying files
-------------
Al∞ tha⌠ i≤ requireΣ t∩ cop∙ ß filσ froφ thσ MS-DO╙ diskettσ t∩ ì
thσ logged-iε CP/═ disk/use≥ i≤ t∩ typσ thσ namσ oµ onσ oµ thσ ì
file≤ displayeΣ froφ thσ MS-DO╙ directory« Multiplσ file≤ caε bσ ì
copied by using the usual "wildcard" naming conventions.
A⌠ an∙ timσ yo⌡ ma∙ ge⌠ ß ne≈ director∙ displa∙ b∙ supplyinτ n∩ ì
file name at all, i.e. by just pressing the <CR> key.
Subdirectories
--------------
Iε thσ director∙ listing¼ subdirector∙ file≤ arσ identifieΣ witΦ ì
ß "typeó oµ ".dir"« Iµ yo⌡ typσ thσ namσ oµ ß subdirector∙ ìè(withou⌠ thσ ".dir"⌐ theε insteaΣ oµ copyinτ thσ file¼ RDM╙ ì
switche≤ t∩ tha⌠ subdirector∙ anΣ display≤ it≤ contents« Yo⌡ caε ì
theε continuσ copyinτ files¼ bu⌠ bσ ß littlσ bi⌠ carefu∞ becausσ ì
therσ migh⌠ bσ tw∩ differen⌠ file≤ oε thσ MS-DO╙ diskettσ witΦ ì
thσ samσ namσ iε differen⌠ directories« Iµ yo⌡ cop∙ ß seconΣ ì
filσ i⌠ wil∞ overwritσ thσ first.
Iε an∙ subdirector∙ thσ firs⌠ tw∩ entrie≤ wil∞ themselve≤ bσ ì
directories« Onσ wil∞ bσ identifieΣ witΦ ß singlσ dot¼ anothe≥ ì
witΦ tw∩ dots« Thσ double-do⌠ entr∙ i≤ thσ onl∙ interestinτ one« ì
Iµ yo⌡ ente≥ "..ó a≤ ß filσ namσ theε RDM╙ wil∞ switcΦ bacδ t∩ ì
thσ previou≤ MS-DO╙ director∙ level« Thi≤ give≤ yo⌡ thσ abilit∙ ì
t∩ traversσ thσ entirσ MS-DO╙ director∙ heirarchy.
Ending the program
------------------
B∙ fa≥ thσ cleanes⌠ wa∙ t∩ enΣ thσ prograφ i≤ t∩ responΣ t∩ aε ì
"Ente≥ filename║ ó promp⌠ witΦ ^Z<cr╛ (i.e« control-┌ anΣ ì
carriagσ return)« Iµ yo⌡ d∩ tha⌠ theε thσ prograφ wil∞ properl∙ ì
re-loτ thσ CP/═ disk.
Oε somσ system≤ i⌠ MAY bσ O╦ t∩ terminatσ thσ prograφ witΦ ì
control-├ bu⌠ don'⌠ complaiε t∩ mσ iµ yo⌡ havσ t∩ cold-boo⌠ you≥ ì
computer after doing that.
=================================================================
Technical notes
===============
MS-DO╙ disk≤ comσ iε fou≥ flavours╗ single- anΣ double-sideΣ ì
disk≤ witΦ eithe≥ eigh⌠ o≥ ninσ sector≤ oµ 51▓ byte≤ eacΦ pe≥ ì
track« Double-sideΣ MS-DO╙ disk≤ arσ recordeΣ iε "cylinderó ì
mode« Sector≤ ▒ t∩ 8/╣ arσ writteε oε sidσ 0¼ theε sector≤ ▒ t∩ ì
8/╣ arσ writteε oε sidσ ▒ beforσ steppinτ t∩ thσ nex⌠ track« ì
Therσ i≤ n∩ standarΣ wa∙ t∩ tel∞ ß CP/═ BIO╙ whicΦ sidσ oµ thσ ì
disδ shoulΣ bσ accessed« Al∞ yo⌡ caε d∩ i≤ t∩ se⌠ thσ tracδ anΣ ì
secto≥ number≤ beforσ doinτ ß disδ I/╧ operation« Yo⌡ havσ t∩ ì
makσ thσ prograφ calculatσ thσ tracδ anΣ secto≥ sucΦ tha⌠ you≥ ì
BIO╙ wil∞ acces≤ thσ righ⌠ par⌠ oµ thσ disk« Yo⌡ ma∙ eveε havσ ì
to modify your BIOS!
Iε thσ simples⌠ case¼ you≥ BIO╙ ma∙ als∩ assume/usσ "cylinderó ì
modσ recordinτ anΣ decodσ thσ sidσ numbe≥ froφ thσ low-orde≥ bi⌠ ì
oµ thσ tracδ number«ì
BIOS TRACK CYLINDER SIDE
0 0 0
1 0 1
2 1 0
3 1 1
4 2 0
. . .
77 38 1è 78 39 0
79 39 1
Anothe≥ commoε methoΣ oµ tellinτ thσ BIO╙ whicΦ sidσ oµ thσ disδ ì
t∩ acces≤ i≤ tha⌠ oµ settinτ thσ high-orde≥ bi⌠ oµ thσ secto≥ ì
numbe≥ s∩ tha⌠ requestinτ ß secto≥ iε thσ rangσ ▒ t∩ 8/╣ ì
accesse≤ sidσ 0¼ requestinτ ß secto≥ iε thσ rangσ 12╣ t∩ 136/13╖ ì
accesse≤ sidσ 1« Thσ prograφ i≤ currentl∙ se⌠ u≡ t∩ usσ thi≤ ì
method.
Somσ BIOS'≤ assumσ tha⌠ al∞ track≤ belo≈ thσ numbe≥ oµ cylinder≤ ì
oε thσ disδ arσ oε sidσ 0¼ al∞ higher-numbereΣ track≤ arσ oε sidσ ì
1.
Nonσ oµ thσ abovσ present≤ an∙ rea∞ problem« Iµ you≥ BIO╙ use≤ ì
an∙ oµ thosσ method≤ theε yo⌡ caε modif∙ thσ prograφ t∩ cope« ì
Yo⌡ wil∞ bσ iε rea∞ troublσ iµ you≥ BIO╙ use≤ thσ "lonτ trackó ì
methoΣ oµ handlinτ double-sideΣ disk≤ wherσ sector≤ 1-8/╣ are¼ a≤ ì
usual¼ oε sidσ ░ bu⌠ wherσ thσ sector≤ oε sidσ ▒ arσ assumeΣ t∩ ì
bσ physicall∙ recordeΣ witΦ differen⌠ number≤ froφ thσ corresì
pondinτ sector≤ oε sidσ 0« Therσ i≤ N╧ WA┘ OU╘ excep⌠ t∩ changσ ì
you≥ BIOSí Likewise¼ you≥ BIO╙ mus⌠ eithe≥ expec⌠ thσ secto≥ iΣ ì
byte≤ oε sidσ ▒ t∩ actuall∙ havσ sidσ ▒ encoded¼ o≥ NO╘ actioε ß ì
side-select-verify when seeking to a sector on side 1.
I hope all that makes sense.
Therσ arσ somσ command-linσ option≤ whicΦ actuall∙ tel∞ RDMS23 ì
whicΦ methoΣ t∩ usσ oε two-sideΣ diskettes« Yo⌡ migh⌠ likσ t∩ ì
try these before attempting to recompile the program.
-h (fo≥ "higΦ bit⌐ tell≤ RDMS23 tha⌠ you≥ BIO╙ use≤ thσ ì
ááááááááááhigh-orde≥ bi⌠ oµ thσ secto≥ numbe≥ t∩ signa∞ ß reaΣ ì
ááááááááááfroφ sidσ 1.
-c (fo≥ "cylinde≥ mode"⌐ tell≤ RDMS23 tha⌠ you≥ BIO╙ ì
ááááááááááregard≤ al∞ even-numbereΣ track≤ oµ ß double-sideΣ ì
áááááááááádiskettσ a≤ beinτ oε sidσ ░ anΣ al∞ odd-numbereΣ track≤ ì
ááááááááááa≤ beinτ oε sidσ 1.
-x (fo≥ "extendeΣ surface"⌐ tell≤ RDMS23 tha⌠ you≥ BIO╙ ì
ááááááááááregard≤ track≤ 0-3╣ a≤ beinτ oε sidσ ░ anΣ track≤ 40-7╣ ì
ááááááááááa≤ beinτ oε sidσ 1.
Jus⌠ includσ thσ appropriatσ optioε somewherσ oε thσ commanΣ linσ ì
if your BIOS uses one of the above methods, e.g.
rdms23 d -x -or- rdms23 -x d
Remember¼ iµ yo⌡ don'⌠ tel∞ RDMS whicΦ methoΣ t∩ use¼ i⌠ ì
assume≤ "-c"« Yo⌡ ma∙ wisΦ t∩ changσ tha⌠ assumptioε oncσ yo⌡ ì
kno≈ whicΦ methoΣ i≤ useΣ b∙ you≥ owε BIO╙ s∩ tha⌠ yo⌡ don'⌠ havσ ì
t∩ kee≡ tellinτ RDMS thσ samσ thinτ ever∙ timσ yo⌡ ruε it« Yo⌡ ì
caε recompilσ thσ prograφ iµ yo⌡ havσ aε appropriatσ ├ compile≥ ì
bu⌠ yo⌡ caε als∩ patcΦ RDMS.CO═ witΦ DDT¼ ZSI─ o≥ whatever« T∩ ìèd∩ that¼ loaΣ RDMS.CO═ unde≥ ZSI─ anΣ usσ thσ ASCII/HE╪ "dumpó ì
commanΣ t∩ scaε througΦ thσ program« Looδ fo≥ thσ strinτ oµ ì
character≤ "Method=H"¼ changσ thσ "Hó t∩ "Có o≥ "Xó anΣ savσ thσ ì
modifieΣ program« Thσ strinτ wil∞ bσ ß fai≥ wa∙ int∩ thσ prograφ ì
and to save time I suggest you start looking at around 3000h.
=================================================================
Known bugs
----------
┴ CR├ calculateΣ unde≥ MS-DO╙ wil∞ no⌠ bσ thσ samσ a≤ thσ CR├ ì
calculateΣ fo≥ thσ filσ oncσ i⌠ ha≤ beeε copieΣ t∩ CP/M« Thσ ì
filσ itselµ i≤ O╦ anΣ ╔ thinδ thσ differencσ arise≤ froφ thσ ì
mechanism≤ fo≥ detectinτ end-of-filσ unde≥ thσ tw∩ operatinτ ì
systems.
Under CP/M+ and CCP/M there is a mechanism for saving the exact
file length so this problem may yet be solved.
=================================================================
Copyright
---------
(C)1984 Bob Alverson
(C)1985 John Hastwell-Batten
Thi≤ i≤ ß PUBLI├ DOMAI╬ program« Yo⌡ arσ freσ t∩ distribute¼ ì
cop∙ anΣ usσ thi≤ prograφ fo≥ non-commercia∞ purposes« Wσ didn'⌠ ì
chargσ yo⌡ anythinτ fo≥ it« I⌠ i≤ no⌠ fai≥ fo≥ yo⌡ t∩ makσ mone∙ ì
or to steal the credit for our efforts.ì
Iµ yo⌡ fi° an∙ bug≤ o≥ makσ an∙ enhancement≤ pleasσ re-submi⌠ thσ ì
modified SOURCE code to the public domain.