136
Dis k C o-p roc ess or Car d Version 3.2a March, 1999 Appl ix 16 16 P rojec t Appl ix Pty Ltd

Dis k C Card - Eric Lindsay's domain. Contents of ... · Dis k C o-p roc ess or Car d Version 3.2a March, 1999 Appl ... /HEX. Sim-ply burn this file into a suitably ... ersion A.4e

Embed Size (px)

Citation preview

Disk Co-processor

Card

Version3.2a

March, 1999

Applix 1616 Projec

tAppl

ixPtyLtd

1read.me -very inviting filetoread.The purposeof this file isto tell you toPLEASE,PLEASE,PLEASEreadDC.DOC. Itcontains lotsof informa-tion that youNEED toknow aboutmy SSDCCsoftware.My versionis lots moreintelligentthanApplix’s.The Applixversion that Ihave is cur-rentlyV1.4a; Anyreferences Imake willrelate to thatversion.You mayhave to re-strap yourdrives towork bestwith myversion; youmay alsoneed tomodify yourcontrollercard slightly(to stop"motor on"from gating"driveselect").

read. 1-me - 1very invitingfile toread.

Your systemshould stillwork withApplix’sversion withthese mods.It’s allexplained inDC.DOC.

Have a lookat LOADDC.SHELLfor anexample ofhow to loadDC.CMDinto theSSDCC.

Please pro-ceed toDC.DOC!!!

Greyham:-)

(happy diskdriving)

1- read.2 me -

very invitingfile toread.

2dc.doc- InfoaboutGreyham’sssdcccontroller software. VersionA.4e 12-1-89The soft-waredescribedbelow is COPYRIGHT,but FREElydistributable. See copyright.doc.

Greyhammight poss-ibly maybebe able to bereached as:[email protected]

The wholething waswritten intime I didn’thave.

dc.doc 2-- Info 1aboutGreyham’sssdcc controller software. VersionA.4e 12-1-89

2.1 Terminology‘unit’ and‘drive’ are synonymous.‘block’ and‘sector’ aresynonymous. ‘drive characteristics’and ‘driveparameters’are synonymous. ‘sec-tor per track’considersone side ofthe diskonly.‘tracks’ isnot affectedby thenumber ofsides.

2.2 IntroductionThis versionof the ssdcccontrollersoftwarewas writtenentirely inZ-80machinecode byGreyham.The code isavailable inEPROM, oras a core-image filethat you canburn intoEPROM ifyou have a programmer

2- dc.doc2 - Info

aboutGreyha

m’sssdcc controller softw

are. VersionA.4e

12-1-89

available.You can alsoload thecodetemporarilyinto Z-80RAM. Thisis handybecause youcan then runFORMAT.EXEC, DOSINIT.EXECand DOSPUT.EXEC towrite theEPROMcore-imageonto anMSDOSdisk forEPROM programming.

2.3 EPROMVersionAn EPROMimage of thesoftware iscontained in/HEX. Sim-ply burn thisfile into asuitablysizedEPROM andreplace theEPROM U3on theSSDCC cardwith it. TheEPROMshould be200ns atleast. 250nsseems veryunreliable.

dc.doc 2-- Info 3aboutGreyham’sssdcc controller software. VersionA.4e 12-1-89

Note that theEPROMsize must beselected by aDIP switchon theSSDCC.See the 1616manual fordetails.

If theSSDCC evercrashes(never!) theLED flashesvigourously.Just like theoriginal.

When thesystem isstarted upwith theEPROMinstalled,units 0 and 1are /F0 and/F1 (asusual); units2 and 3 are/H0 and /H1.SS/OSactuallythinks theseare hard-disks, sowhenbooting youwill experi-ence a longdelay afterthe Controller-Card ver-sion numberis displayedon a level 0reset as theSS/OSthinks it iswaiting for ahard-disk tospin up.Don’t bealarmed.

2- dc.doc4 - Info

aboutGreyha

m’sssdcc controller softw

are. VersionA.4e

12-1-89

Booting willbe muchfaster if youput a boot-able disk inone of thedrives.

There are 2EPROMVersions: DC___.HEXand HD___.HEX. TheHD versionsupportsSCSI Harddisks;though ituses a dif-ferent mess-age numberthan theROMs or theoriginalSCSIEPROMdid. TheHDDVR.Cprogram in/MRD is anMRD thatreplaces /H0and /H1 andprovides/H2, /H3....for as manypartitions asyou have.More detailson SCSIwhen I knowwhat it’sdoing.

2.4CMDFile VersionTheprogramis also avail-able as a

dc.doc 2-- Info 5aboutGreyham’sssdcc controller software. VersionA.4e 12-1-89

TRSDOS.CMD filethat must beloaded intothe Z80 afterEVERYreset, sincethe SSDCCwill go backto its ROMprogramonareset.

PLEASENOTE:Alt-Ctrl-Ror RESETwill result inthe loss ofeverythingin the writecache!. Ifyou havewrite cach-ing on, youMUST waitfor the auto-matic ’sync’to occur(either that,or run ’sync’yourself)before anylevel ofreset, elseyou willcorrupt yourfile system!.The auto-sync willupdates thedisk after theSSDCC isgiven noth-ing to do forabout 1second. Inparticular,DON’TRESETDURINGDISK I/O!!

2- dc.doc6 - Info

aboutGreyha

m’sssdcc controller softw

are. VersionA.4e

12-1-89

.CMD filescan beloaded intothe Z80’sRAM spacevia RECVCMD.EXEC.The shell fileLOADDC.SHELL,which runsLOADDC2.SHELL, willload theprogram foryou.

Duringloading ofthe program,NO DISKI/O canoccur;because Ihave no ideawhichregions oftheSSDCC’sRAM areused by it innormaloperation. AVERYlimited ver-sion of thediskcontrollersoftware,thatrespondsONLY to"read Z-80RAM","write Z-80RAM" and"call Z-80program"commandscalled DCLIM.CMDloads intoZ-80 RAMand executesto "boot-

dc.doc 2-- Info 7aboutGreyham’sssdcc controller software. VersionA.4e 12-1-89

strap" themain codeinto RAM.Note that allthis down-load busi-ness must bedone fromthe RAMdisk, to pre-vent DiskI/O.

The .CMDfile versionis not neededonce theEPROM isprogrammed, and doesnot supportthe "Fast-Copy" or"ReadSector ID"commands.

2.5RAMUsageThe currentversion automaticallydetects howmuch RAMyourSSDCC hasinstalled;certainlyyou musthave at least8K, and thenmore RAMmeans abiggercache. Youcan installany amountof RAMfrom 8k to64k. So long

2- dc.doc8 - Info

aboutGreyha

m’sssdcc controller softw

are. VersionA.4e

12-1-89

asyouhave aRAM chip inU1, theSSDCCshould findthe RAMOK. Withonly 8k,fastcopymight notwork; it willreturn an"Out ofCacheMemory"error when itruns out.

2.6ErrorRetriesCertaintypes of diskerrors are automaticallyretried, andthe 68000notified onlyif the retries)fail. Only afew errorsare con-sideredretriable, onthe basis thatmost of themaren’t fixedby simplytrying again.

Error retriesare as fol-lows: Seekerror: thedrive isrestored, andthe seekretriedtwice. CRCerror: thesector

dc.doc 2-- Info 9aboutGreyham’sssdcc controller software. VersionA.4e 12-1-89

transfer isretried fourtimes. RNFerror: If thedrive is ontrack 0, erroris declared immediatelysince the1772 onlyreports theerror after 5disk revol-utions any-how. If noton track 0,the drive isrestored, andthe transferretried once.RNF errorsare usuallysome sort ofseek error,which willoften bedeclared as aseek errorduring theseek afterbeingrestored.

All othererrors aredeclared immediatelythat theyoccur.

2.7DriveCharacteristicsNine logicaldrives aresupportedbyallowingunit codes 0to 8. How-

2- dc.doc1 - Info0 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

ever, thetrouble isconvincing1616 OS topass such aunit code.By changingthe driveselect bit-map, youcan have onephysicaldriverespond tomore thanone logicalunit, andgive eachdifferent characteristics.Disk drive characteristics may bemodified viathe "setdrivecharacteristics" message.Any pro-gram thatchangesdrive characteristicsshould readthe current characteristics with "showdrive characteristics",change thedesired onesand writethem backwith "setdrive characteristics"."disk changemethod" inparticular ishardwaredependant,and shouldnot normallybe altered.

dc.doc 2-- Info 1about 1Greyham’sssdcc controller software. VersionA.4e 12-1-89

Variable characteristicsare:

* step rate *double orsingle stepp-ing betweendrive tracks.*driveselectLATCH bit-map. * sec-tor size. *sectors pertrack. *number oftracks. *sides/heads* cachinglevel. * diskchangemethod.

Each drivehas its ownset of characteristics, sothat any mixof differentdrivetypes isallowed.

2.8StepRate:This definesthe "steprate" fieldthat isincludedinto all "typeI" (seek, stepand restore)commandsto theFD1772.Defaults to6ms.

2- dc.doc1 - Info2 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

2.9 Double/SingleStep BetweenTracks:Normally, asingle stepp-ing pulse isissued tostep thedrivebetweentracks. Thisoptionallows a double-steppingpulse toallow 40trackdisks tobe read in an80 trackdrive. Somecare shouldexercisedhere; thetracks on a40 trackdrive (48tpi)are logicallytwice aswide as thetracks on an80 trackdrive(96tpi). Thiscan lead toproblems -reading the40 track diskin the 80track drive isok;but if youwrite back tothe disk, youmay not beable to readit in the 40

dc.doc 2-- Info 1about 3Greyham’sssdcc controller software. VersionA.4e 12-1-89

track driveagain. Thisvaries a LOTdependingon differentdrives; evendrives of thesametype. Ifyou havetwo drives,youmay findthat oneworks betterthan theother. Also,formattingseems a lotmore criticalthan normalwriting; ifyou can getthe disk for-matted in a40 trackdrive you’llprobablyhave lessproblems.

Anotherthing; for-matting nor-mallydestroys allinformationon the disk,but bear inmind that ifyou reformata disk thatwas for-matted at 80tracks to be40 tracks onan 80 trackdrive, onlythe evennumberedtracks willbe rewritten.This is noreal prob-lem, unlessyour diskcontained

2- dc.doc1 - Info4 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

very privateinformation(half ofwhich willstill be there,on the oddtracks); butkeep it inmindbecause itcan explainsome veryodd results.For instance,if you acci-dentally putyour "40track" diskin the 80track driveand forget totell theSSDCC tostep twiceyou’ll findthat sectorreads to oddtracks won’tgive seekerrors, butcould beaccessing allsorts ofweird data.Of course,an error willbe thrownout when ittries to readan eventrack.

One otherthing; track0is alwaystrack 0; soyou can’t immediatelytell if youhave doublestepping setcorrectlyjust by look-ing at thedirectory

dc.doc 2-- Info 1about 5Greyham’sssdcc controller software. VersionA.4e 12-1-89

(which isnormallyonly on track0).

2.10DriveSelectLATCH bitmap:This definesthe bitmapused toselect agiven drive.This bitmapis ORed intothe latch toselect thedrive, and itscomplementis ANDed tothe latch todeselect thedrive. Thisallows dif-ferent physi-cal units tobe assignedto differentlogicaldrives. Eg:have unit 1as /F0. Alsoallows extradrives to beselected ifyou havesome sort ofLATCH bitpattern toselect morethan 2drives. Besupercarefulthough; hav-ing morethan one

2- dc.doc1 - Info6 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

logical driveselect asingle unitmay corruptdisks if youhave cach-ing enabledfor eitherlogicaldrive!

The SSDCCnever readsfrom thehardwarelatch; itstores thecurrent sett-ing in soft-ware. Particularly, youcan rewireyourSSDCC touse EJECTand INUSEas driveselects, eventhough theZ80 can’tread theircurrent sett-ing.

2.11SectorSize:The con-troller CANread sectorsof differentsizes. TheFD1772supports128, 256,512 or 1024byte sectors,and must beinformed ofwhat thesector size is

dc.doc 2-- Info 1about 7Greyham’sssdcc controller software. VersionA.4e 12-1-89

on the drive.If more orless than thisnumber ofbytes arerequested ona datatransfer,you’ll get asector sizeerror mess-age - thisshould notbe relied onhowever; inthe case of awrite, yourdisk will becorruptedsince thecontrollercan’t deter-mine theactual sectorsize until thedata hasbeenwritten.Note that1616 OSONLYallows1024bytesectors!!!.Thestandard"block read"and "blockwrite" com-mands areused withany sectorsize, the dif-ferencebeing thenumber ofbytes passed(which the68000MUSTknow). Sowhat does itall mean?Well, DONOT tell

2- dc.doc1 - Info8 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

1616 OS totry to read orwrite a logi-cal drivewhosesectorsize is any-thing otherthan 1024bytes!!!.ALLtransfers ofdifferentblocklengthsMUST do itby talking tothe SSDCCdirectly.

2.12 Sectorspertrack:The con-troller isonly everpassed blocknumbers,not sector,track andsidenumbers, soit has toknow howmany sec-tors are oneach track.This isdefined asthe numberof sectors ona single sideof the disk.Eg: for nor-mal1616 OSdisks, it’s 5.The actualtracknumber isfound asfollows:

dc.doc 2-- Info 1about 9Greyham’sssdcc controller software. VersionA.4e 12-1-89

blocknumbertracknumber = -number ofsectors pertrack *number ofsides

1616 OScould theoretically workwith otherthan 10 sec-tors pertrack; but theformat com-mand wouldspewbecauseSSDDUTILpasses a 10byte sectorskew table.The formatcommandSHOULDonly bepassed therightnumberof sectorskew bytes;but of course1616 OSassumes 10per track.

2.13 Tracks:The con-troller limitsall diskrequests towithin thevalid trackrange toavoid seek-ing a trackwhich isphysicallybeyond the

2- dc.doc2 - Info0 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

drive’s capabilities. Thisvalue is alsoused by the’fastcopy’command towork outhow manytracks tocopy.

2.14 Sides/Heads:Defines thenumber ofsides orheads on thedrive. Theonly sen-sible valuesare 1 (singlesided) or 2(doublesided).

2.15 Cachinglevel:Yes, that’sright; thecontrollerdoes diskcaching.The cachinglevel setshow muchcaching isdone. Cach-ing can cor-rupt yourdisksREALLYefficiently ifyou aren’t

dc.doc 2-- Info 2about 1Greyham’sssdcc controller software. VersionA.4e 12-1-89

just a littleextra care-ful.

No Caching:This is thedefault. Nocachingoccurs whatsoever. Thisis most defi-nitely thesafest mode.It is also theslowest.

Read Cach-ing: (writethrough)Blocks govia a cachewhen theyare read. Ifthat block isread again, itis sent fromthe cache,rather thanbotheringwith the diskdrive. Whenwriting,blocks gointo thecache andare immediately writtenonto thedisk, withany errorcode beingreturned tothe 1616,which mustwait for theerror code.

Write Cach-ing: Blocksgo via thecache for allreads andwrites.Write errorscan neveroccur in this

2- dc.doc2 - Info2 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

mode, as theblocksimplygoes into thecache andthe 68000 istold that noerroroccurred; ittrundles offand doeswhatever itlikes, and thecache can beflushed todisk later.This has aproblem inthat if a per-sistent erroroccurs whenthe sector iseventuallywritten todisk, there isno way totell the68000, andthe block issimplyexpelledfrom thecache. Iguess that’sthe price youpay for theextra speed -personally,I’ve NEVERyet had adata errorthat wasn’tcaused bysomething Idid wrong soit isn’t as biga problem asyou mightthink.

After diskchange isdetected(either automatically, orby issuing a

dc.doc 2-- Info 2about 3Greyham’sssdcc controller software. VersionA.4e 12-1-89

"sync") thefirst block tobe written todisk isalwaysflushed ontothe disk andthe errorcodereturned. Ifthe disk wasnot writeprotected,then thewrite cache(if enabled)can be usedfrom thenon, until thedisk changesagain.

The cachingalgorithmkeeps trackof how ofteneach blockfrom anydrive isaccessed bykeeping anarray of 800entries.When ablock has tobe expelledfrom thecache tomake roomfor anotherone, the leastused block isthe first oneto go.Maximumcache sizewith 64k isstill less than10% of theaveragedisk, soknowingwhichblocks tokeep in the

2- dc.doc2 - Info4 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

cache isprettyimportant.Blocks thatneed to beflushed todisk arealwayshigher prior-ity thanblocks thathave merelybeen read,since theSSDCC canwrite blocksat its leisure.

All blocksthat have tobe written todisk arewritten justbefore theSSDCCturns thedrive motorsoff. Hence,it is nowessential thatyou do notremoveANY diskfrom ANYdrive whilstthe motorsare on. Also,you have torun a ’sync’to flush theread cachewheneveryou changedisks, unlessyour drivecan detectdiskremoval.

Specialnote:Setting drivecharacteristics (in par-ticular, dis-abling

dc.doc 2-- Info 2about 5Greyham’sssdcc controller software. VersionA.4e 12-1-89

caching) AUTOMATICALLYruns a ’sync’for that unit.

2.16Disk ChangeMethod/RDYSignal:The SSDCCcan detectwhen thedisk in anydrive haschanged,and flush thecache accordingly.Some drivescan detectdisk change,some can’t.Three dif-ferentmethods areallowed: bya specialRDY mode,by the DISKCHANGEsignal, andby DISKCHANGEon the RDYsignal.There is alsoa specialbootingmode whichdoes not relyon the RDYsignal andallows thesystem toboot withdrives set up

2- dc.doc2 - Info6 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

for any diskchangemethod.

0 : Detectionnot possible,and themeaning ofthe RDYsignal isunknown.This is thedefault, andshould onlyreally beused forbooting. Ifyour drivescan’t dodisk-changeby anymethod,your auto-exec fileshould set tomethod 1,since it’sslightlyfaster. Itbecomesnecessary to’sync’ thedrive beforeremovingit’s disk IFyou useREAD orWRITEcaching. Nocachingdoesn’trequire thesync. Thereason forthis mode isthat RDYwon’t bevalid if it’sactuallyconnected toDISK-CHANGE formethod 4.

dc.doc 2-- Info 2about 7Greyham’sssdcc controller software. VersionA.4e 12-1-89

1 : Detectionnot possible,and RDYsignal indi-cates drivereadiness.As withmethod 0,disk changedetectioncan’t bedone. YouMUST syncwhenswappingdisksif usingthe caching.The onlydifference isthat sinceRDY isknown toindicatedrive readi-ness, thecontrollerdoesn’t needto do a speedtest everytime thedrives areturned on.

2 : Detectionby RDYsignal. TheRDY signalgoes activewhen thedrive isFIRSTselected,then staysactive untilthe disk isremoved(even whilethe motor isoff!). Notethat this isNOT thenormal useof RDY, andwill prob-ably require

2- dc.doc2 - Info8 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

restrappingof the drive(if the driveis capable ofit!). Thismeans thatthe RDYsignal nolonger indi-cates that thedrive is up tospeed - RDYcan be activeeven if thedrive motoris off, so thecontrollerwill do arotation tim-ing test tofind whenthe drive isup to speed.

3 : Detectionby DiskChange.The DISKCHANGEsignal indi-cates achange ofdisk. This isthe usualmethod. TheDISKCHANGEsignal fromthe drivegoes active(low) whenthe disk isejected, andremainsactive until a’Step’instruction isissued to thedrive.

4 : Detectionby DiskChange onRDY signal.The RDY

dc.doc 2-- Info 2about 9Greyham’sssdcc controller software. VersionA.4e 12-1-89

signal actsexactly likeDISKCHANGE,as describedabove. Aswith detec-tion by RDYsignal, arotation tim-ing test isdone to findwhen thedrive is up tospeed.

All outputsfrom thedrives areenabled onlywhen thatdrive isselected, andthe SSDCCmust scan allof the driveswhile it isn’tbusy, to seeif any diskchangeshaveoccurred.Normally,the DRIVESELECToutputs fromthe card aregated byMOTORON. UsingANY diskchangemethodrequires youto modifythe card sothat the driveselect signalcan beassertedwithout themotor beingturned on.Otherwise,you’d have

2- dc.doc3 - Info0 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

to turn thedrives onand off sev-eral times asecond. Thisis not nice.Note that ifyour driveshave "headload" ability,this shouldbe done onthe MOTORON signal,and NOTON THEDRIVESELECTSIGNALALONE;otherwiseyour poorheadloadsolenoid willgo on verybriefly everytime theSSDCCscans thedrive.

Unless yourdrive’s datasays that thedrive can dodisk changeby thespecial RDYsignal, or viaDISKCHANGE,you’ll justhave to usemode 1, andrun ’sync’when youremove thedisk if youwant to usecaching.

dc.doc 2-- Info 3about 1Greyham’sssdcc controller software. VersionA.4e 12-1-89

If theSSDCCdetects adisk changewhile stuff isstill in thedrive’s writecache, it willflash thedrive LEDand waituntil you putthe disk backin, then writeeverythingto disk.NOTE: Thisis a SAFEGUARD thatshould NOTbe reliedupon!!!.Obviously,if yourdrives can’tdo diskchangedetection,this willrarely occur.Also, thecontrollercan’t poss-ibly checkthat the diskyou put in ISactually theone that itwanted.

The SSDCCmay miss aHold-RDYtype disk-change sig-nal if thedisk ischangedwhile thecontroller isbusy servic-ing anotherdrive. YoushouldNEVER

2- dc.doc3 - Info2 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

remove adiskfrom thedrive whileANY drivemotors areon, or whilethe 68000 isaccessingdisk blockscached in theZ80!

2.17ErrorMessagesThe errormessagesproduced area lot more comprehensive than nor-mal. Errormessagesthat corre-spond tothose listedin the man-ual usuallyhave thesamenumbers,but thisshould notbe reliedupon. Whenanerror codeis produced,the "errormessage"commandshould berun to get atextualdescriptionof the errormessage,whichshould thenbe displayed

dc.doc 2-- Info 3about 3Greyham’sssdcc controller software. VersionA.4e 12-1-89

to the user.This is how1616 OSworks, so itwill nor-mally dis-play theexpandederror mess-ages. Theerrormessage textoften con-tainsnumbersrelating towhat actua-lly happened(Eg: driveand sectornumbers).Thesenumbers areconverted toASCIIby theZ80, so the68000doesn’t needto worryabout them;it merelydisplays thestring to theuser. Errormessagesshould besought immediatelyafter receiv-ing an errorcode; onlythe errorcode thatwas returnedwill give asensibleerror mess-age. Theparametersreturned bymany errormessagesare stored inthe same

2- dc.doc3 - Info4 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

place by theSSDCC, so interrogatingan incorrecterror mess-age willyieldmisleadingresults.

Error codenumbersmay changeany time, sothey aren’tgiven here.They shouldnever bedisplayed tothe usereither, sincethey are notvery mean-ingful.

Bad errornumber:

The errornumberpassed to"error mess-age" com-mand wasinvalid.

Seek FailureOn Unit xTrack y Sidez:

The con-troller couldnot find adata recordmatching thecorrect tracknumber fol-lowing aseek, despiteretrying.Probablyeither yourdrives can’thandle the

dc.doc 2-- Info 3about 5Greyham’sssdcc controller software. VersionA.4e 12-1-89

step rateyou’vespecified, orthe disk is 40track and thedrive is setup for 80track.

ControllerJammed,But Inter-rupted OK:

The FD1772latched upfor somereason, anddidn’t returnto NOTBUSY state.A "ForceInterrupt"commandfixed theproblem.This willoccur if theFD1772hangs up forsome rea-son, such asthe drivedoor beingopened mid-way througha datatransfer.

ControllerJammed,And WillNotRespond:

The FD1772latched upfor somereason, anddidn’t returnto NOTBUSY state.A "ForceInterrupt"

2- dc.doc3 - Info6 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

commandfailed to fixthe problem;the FD1772controllerhas failedcompletelyfor somereason. Thisis likely tobedue to afaulty con-troller chip.

ReadRecordNot FoundOn Unit x,Track y,Sector z:WriteRecord NotFound OnUnit x,Track y,Sector z:

The drivecontrollercould notfind a validdata recordfor sector zon track ywhenattemptingto read orwrite despiteretrying.The control-ler’s impres-sion of howmanysectors areoneachtrackis probablywrong.

Read CRCError OnUnit x,Track y,Sector z:Write CRCError On

dc.doc 2-- Info 3about 7Greyham’sssdcc controller software. VersionA.4e 12-1-89

Unit x,Track y,Sector z:

The FD1772found thatthe com-puted CRCdid notmatch thatwritten onthe disk,despiteretrying. Adata error;bits havebeen dropp-ing off yourdisk. I don’tthink it’sactuallypossible toget a writeCRC error,as the con-troller doesnot do verifyreads; the1772 maydeclare oneif the IDfield CRC iswrongthough - I’mnot sure.

FormatTrack TooSmall OnUnit x Tracky Side z:

The tracksimplydoesn’t haveenoughspace toholdthe requirednumber ofsectorsof therequiredsize. Eithersectors per

2- dc.doc3 - Info8 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

track or sec-tor size iswrong.

No RDYSignal FromUnit x:

The RDYsignal fromthe selecteddrive did notbecomeactive whenthedrivewasselected.The driveselectstrapping isprobablywrong, orthe drivedoor simplyisn’t closed.

Unit x IsWrite Pro-tected:

A write wasattempted tothe drivewhilst it waswrite pro-tected.

Bad UnitNumber:

The unitnumberpassed to theSSDCC wasinvalid.

Read SectorToo SmallOn Unit x,Track y,Sector z:Write SectorToo Small

dc.doc 2-- Info 3about 9Greyham’sssdcc controller software. VersionA.4e 12-1-89

On Unit x,Track y,Sector z:

The sectoron the diskwas found tobe smallerthan theSSDCCexpected.The error isdetectedwhen theFD1772asks for orprovides lessbytes thanwereexpected. Inthe case ofthe writeerror, datahas alreadybeen writtenon the diskbefore theerror isdeclared.

Read SectorToo Big OnUnit x,Track y,Sector z:Write SectorToo Big OnUnit x,Track y,Sector z:

The sectoron the diskwas found tobe largerthan theSSDCCexpected.The error isdetectedwhen theFD1772asks for orprovidesmore bytes

2- dc.doc4 - Info0 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

than wereexpected. Inthe case ofthe writeerror, datahas alreadybeen writtenon the diskbefore theerror isdeclared.

RotationalFailure OnUnit x:

The disk inthedrivewaseither notrotating atall, or wasrotatingFAR tooslowly;around100RPM.Normalrotationspeed is300RPM.

Unit x TooSlow: Unit xToo Fast:

The drivewas found tobe rotatingtooslow/fast.Rotationspeed testsare onlydone whenthe drivemotors areturned on,and thenonly if theRDY signaldoes notindicate thatthe drive isup to speed.

dc.doc 2-- Info 4about 1Greyham’sssdcc controller software. VersionA.4e 12-1-89

SSDCCInternalStack Fail-ure!:

I justcouldn’tresist - this isto makeMSDOSusers feel athome. (Bethankful itdoesn’t print"systemhalted"too!). No,seriously;stack over-and under-flowis testedfor in thecode fordebuggingpurposes.This isextremelymajor; Ihope youdon’t everexperienceit. If it doesoccur, theSSDCC willreset itself(but still berunning mysoftware;not the ROMcode.) Allcacheentriesand driv-parm’s willbe lost.PLEASEcontact me!.

Source AndDestinationDiskette CharacteristicsNot Ident-ical:

2- dc.doc4 - Info2 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

A fastcopywasattemptedwhereby atleast one ofthe tracks,sectors pertrackorsidescharacteristics for thesource anddestinationunits werenot ident-ical. Thismakes amirrorimage copyimpossible.

Bad BlockNumber:

The calcu-lated tracknumber forthe specifiedblock wasgreater thanthe numberof tracks onthe disk.Eitheryou’veblown itpretty badly,or youhaven’t toldthe SSDCChow manytracks areactually onthedisk. TheSSDCCwon’t evenattempt toseek totracks thatare greaterthan thenumber oftracks speci-fied in thedrive charac

dc.doc 2-- Info 4about 3Greyham’sssdcc controller software. VersionA.4e 12-1-89

teristics.This erroroften occursunder 1616OS if yourboot block iscorrupted.

Lost Data!:

The Z80didn’t feeddata to orfrom theWD1772fast enough.A programming error(ie: one ofmine!) thatshouldNEVERoccur.

Format InProgress OnUnit x:

A back-ground for-mat on unit’x’ preventsyour requestfrom beingserviced.Only onedrive may beformattingatany giventime.

InvalidDrive Characteristics ForUnit x:

Drive characteristicspassed to thesetcharcommandwereinvalid.

2- dc.doc4 - Info4 about

Greyham’s

ssdcc controller softw

are. VersionA.4e

12-1-89

Out OfCacheMemory:

You haven’tinstalledsufficientRAM forfastcopy tooperate.Install somemore!.

dc.doc 2-- Info 4about 5Greyham’sssdcc controller software. VersionA.4e 12-1-89

3Interprocessor CommunicationAll mess-ages in the1616 OSmanual are implemented. The firstbyte of everycommanddetermineswhat thecommand is,and is sent asa COMMANDbyte. Allother bytesare sent asDATAbytes. If thecontrollergets thewrong sortof byte atany time, itmay getconfused. Inserious cases(such asgetting badparametersto a ’format’command),it will dese-lect alldrives andturns themotor on forabout 2 sec-onds, beforeresetting.The syn-taxes belowMUST befollowed -do not evenTHINKabout tryingto abort acommand inmid-messag

3- Interp1 rocesso

r Communica

tion

e!!! If youreallyMUST aborta command,complete themessagethen send an"Abort"command(command00). Alsonote thatinterruptscan occur onthe 68000 inmid-message; so Inter-rupt routinesmay NOTsend mess-ages to/fromthe Z80!!!!

3.1Abortcommand: 00The com-mand cur-rently inprogress isaborted.This can beused to halt’format’ and’fastcopy’commandsprematurelyif somethingtotally dis-astrous goeswrong, orthe operatorwants out.Won’t aborta back-ground for-mat.

3.2Blockread command: 01

Interpr 3-ocessor 2Communication

unit blockhigh blocklow <errorcode or0><data>Blocks of alldifferentsizes areread withthis singlecommand.The numberof data bytesreturned isdeterminedby the sectorsize, and the68000MUST beready toacceptexactly thecorrectnumber ofbytes. If1616 OStries to read adisk of adifferentsector size, itwill expect1024 bytes,but not getthem, andtimeout.Data isreturnedONLY if a 0errorcode isreturned.

The blocknumber is anumberfrom 0 towhatever,which spec-ifies whichblock toread. TheSSDCCcalculateswhich actualtrack andsector it

3- Interp3 rocesso

r Communica

tion

correspondsto; so unlessthe SSDCCknows cor-rectly howmanysectors areon a disk,you wont gettheright one.

3.3Blockwrite command: 02unit blockhigh blocklowdata <errorcode>The logicalcomplementto the blockread. The1616 waitsfor an errorcode beforeproceeding;however, ifwrite cach-ing isenabled, thiscommandwillALWAYSreturn a zeroerror code,except forthe first sec-tor written todisk, tocheck thatthe drive isok and notwrite pro-tected. (It’snot possibleto have anerror writingthe blockinto the

Interpr 3-ocessor 4Communication

cache!). Ifan erroroccurs whenthe block iseventuallywritten todisk, there isno way tonotify the68000, so itsbad luck. Ifwrite cach-ing is notenable (ie:no cachingor readcachingonly), thenblock writewill wait forthe write tocomplete,and actuallyreturn theerror codeindicating ifan erroroccurred.

3.4Errormessage command:03 errorcode<string> <0>Converts thearbitraryerror codesreturned byvariouscommandsinto ASCIIerror mess-ages. Do notinterpretSSDCCerror codesyourself, asthey are verylikely tochange. Usethis com-mand!

3- Interp5 rocesso

r Communica

tion

3.5 Format command: 04unit$B5$7E ntracks skewtable <errorcodeor 0>Writes for-mat infor-mation toevery trackon the drive.Note thatthis is notwhat it saysin the Applixmanual; theygot "unit" inthe wrongplace. Theorganisationof the disk isdependanton the drivecharacteristics, allowinga very widevariety ofdisk formatsto be used.The numberof bytes inthe skewt-able will bethe numberof sectorsper track,times thenumber ofsides on thedrive.Because ofthis, BLOCKDEV canonly copewith thiscommand ifthe drive characteristicsare as per a

Interpr 3-ocessor 6Communication

normal 1616OS disk.The characteristics forthe specifiedunit will bemodified tohave ntrackstracks.

There aretwo maindisk formatsthat theSSDCC willgenerate:IBM andSONY. Theonly appar-ent differ-ence is thatthe IBMformat hasan IndexAddressMark (IAM)just after theindex hole,whilst theSONY doesnot (itdoesn’t fitwith 5 x1024bytesectors pertrack -Applix usesthe SONYformat). AllSONY com-patible hard-ware willread IBMformat, butIBM hard-ware won’tnecessarilyread SONYformat (theNECuPD765used in IBMPCs is oneexample).Formatattempts toinclude theIAM: If anerror occurs,it tries theformat againwithout theIAM - if the

3- Interp7 rocesso

r Communica

tion

error stillpersists, it isdeclared. Itis theoretically possiblefor the IAMto fit on track0, but not fiton anothertrack (itwould haveto be veryborderline!)- the entiredisk will bereformattedwithout theIAM.

If write-caching isenabled, theformat willproceed inthe background. TheZ-80 waitsfor the for-mat of track0, side 0 tocompleteand returnsanerror codeaccordingly;if no erroroccurs, theformat con-tinues in thebackground.Normal diskI/O is notpreventedduring therest of theformat.Note thatduring abackgroundformat, NOautomaticsync’ing isdone (on anydrive; exceptfor the nor-mal flushingof one blockwhenanother isneeded andthe cache isfull) andmanuallysyncing the

Interpr 3-ocessor 8Communication

drive to beformattedwill yield anerror. In thisway, BLOCKDEV mayformat andinitialise adiskette - theinitialisationinfo will sitin the cacheuntil the for-mat com-pletes.

3.6TypeII Format command: 05unit$B5$7Etrackside doIAM skewtable <errorcodeor 0>Applix haveofficiallyabandonedthis com-mand, soI’ve definedit my way. Itformats asingleside ofasingle trackin the sameway that theFormatcommanddoes.doIAM is aflag thatindicateswhether an

3- Interp9 rocesso

r Communica

tion

IAM shouldbe writtenafter theindex hole.This is gen-erally a goodidea,although itmight notalways fit.Type II For-mat doesn’tretrywithoutit if it doesn’tfit (like TypeI Formatdoes).

The size ofthe skewt-able will bethe numberof sectorsper track.Note thatthis is dif-ferent to typeI format,where theskew tablecovers allsides.

Note thatduring typeII format,there is noway of thecontrollerreally beingcertain thatthe drivehead iswhere itthinks it is,since it can’tdo a verifyon a trackthat has yetto be for-matted.Track 0 is anexception,since arestore isdone; guaranteeing track0. Thisshould veryrarely be aproblem, butit means youmust becareful if

Interpr 3-ocessor 1Comm 0unication

switchingthe 2stepsetting on adrive - takeextra care toget it right.

3.7ReadZ80RAM command: 07Z80addrh Z80addrllengthh lengthl<data>Reads Z80RAM. Justlike in themanual.

3.8WriteZ80RAM command: 08Z80addrh Z80addrllengthh lengthl dataWrites Z80RAM.

3- Interp1 rocesso1 r Com

munication

3.9CallZ80 program:09 Z80addrhZ80addrlCalls a pro-gram in Z80RAM. Not agood idea, asthere isn’tany freeRAM in theZ80’s space.Not withcachingenabled,anyhow.This can beuseful forresetting theSSDCC (go-ing back tothe ROMversion)withoutresetting the1616, bybranching tolocation$0000.

3.10ReadZ80ROMversioncommand: 0A<ROMversion>My SSDCCsoftwareversionsstarted atversion A.0

Interpr 3-ocessor 1Comm 2unication

to distin-guish it fromApplix’s.

3.11 Announce 1616-O/S version:0B SSOSversionTells theSSDCCwhat versionof 1616 O/Sis running onthe 68000.This isignored bythe SSDCCat present.

3.12Setfloppydisksteprate:0CunitrateThis isincluded forcompatibility with thenormalSSDCCROM.Floppy diskstep rate canalso be setwith the "setdrive characteristics"command.Eithermethod hasthe same

3- Interp1 rocesso3 r Com

munication

effect. Thedefault isstill 6ms, asper the man-ual.

3.13 Enable/DisableZ80 Interrupts: 0DflagThe Z80 canbe made tointerrupt the68000 aftercompletionof any oper-ation; whichis useful forrunning multitaskingO/S on the68000.SSO/Sdoesn’t usethis at all;but if flag isnon-zero,the Z80 willassertEIRQ1EVERYtime it has anerror code(zero ornon-zero) tosend to the68000; thissignals thecompletionof therequestedoperation.

Interpr 3-ocessor 1Comm 4unication

3.14Set LATCHbits: 12bitmapThe Z80hardwareLATCH bitsthat corre-spond to thebits inbitmap areset. In par-ticular, thisprovidesaccess toBANK,allowingZMDB todumpbankedRAM.

3.15ResetLATCH bits:13 bit-mapThe Z80hardwareLATCH bitsthat corre-spond to thebits inbitmap arereset.

3.16InputLATCH bits:14 <bitmap>The value inthe Z80hardware

3- Interp1 rocesso5 r Com

munication

latch is sentback to the68000.

3.17ReadSectorID: 15unittrackside <errorcode> <sectornum>The numberof the firstsector pas-sing thedrive headon unit,track, side isreturned, iferrorcodeequals zero.This is use-ful fordeterminingoptimumsector skew-ing whenused immediately after adisk oper-ation. If thehead wasstepped toreach track,sectornumwill be thesector thatthe seekverify isnormallydone on. Inthis case, theNEXT sec-tor (physi-cally, notnumerically- do anotherread ID) willbe the firstone avail-

Interpr 3-ocessor 1Comm 6unication

able fortransferduring anormal I/Ooperation.

3.18Setdrive characteristics: 16unitstepr2step bitmap sizecodesecpertraktrackssides cachlevcngmethod <errorcode or0>Sets thedrive characteristics.This alsoinstructs thecontroller tosync thecache for’unit’, andact as if thedisk hasphysicallychanged.(See "Drivecharacteristics" above).Values are:

3- Interp1 rocesso7 r Com

munication

stepr - steprate. 0 =2ms, 1 =3ms, 2 =6ms, 3 =12ms. Steprate can alsobe set with"set steprate" com-mand.

2step - do wedouble stepbetweentracks? 0 =No, 1 = Yes

bitmap -latch bitmapthat selectsthis drive.

sizecode -sector sizecode. 0 =128b, 1 =256b, 2 =512b, 3 =1024b

secpertrak -number ofsectors pertrack.

tracks -number oftracks on thedrive.

sides -number ofsides. 1 =SingleSided, 2 =Doublesided.

cachlev -cachinglevel. 0 =None, 1 =Read Cache,2 Read +Readahead,3 = WriteCache, 4 =Write + Readahead.

cngmet -disk changedetectionmethod. 0 =None, 1 =special

Interpr 3-ocessor 1Comm 8unication

HOLDRDY, 2 = byDISKCNGsignal,3=byDISKCNGsignal con-neced toRDY.

A non-zeroerror code isreturned ifsomethingreally nastyhappened;mainly thedrive para-meters beinginvalid forsome rea-son. (Eg:specifying adrive to havezero sides).

3.19Showdrive characteristics: 17unit <errorcode or0> <stepr> <2step> <bitmap> <sizecode><secpertrak><tracks> <sides> <cachlev><cngmethod>

3- Interp1 rocesso9 r Com

munication

Reads backthe drive characteristics,if the unitnumber wasvalid. If not,errorcode isnon-zeroand no otherdata isreturned.Bytesreturned arethe sameones that arepassed to"set drive characteristics". If youwant tochange onlyone characteristic, readthem all intoa buffer,change theone youwant, andwrite themback outagain with"Set DriveCharacteristics".

3.20 Fastcopy:18 srcunit destunit <errcode>Makes amirrorimage copyof the disk insrcunit, ontothe disk indestunit.You MUSThave twodrives forthis. Tocopy an800k diskwith onedrive would

Interpr 3-ocessor 2Comm 0unication

require over30 diskswaps, evenif the con-troller hadthe full 64kof RAM forbuffering.This com-mand allowsthe fastestpossiblemirrorimaging of adisk. A’sync’ isdone at thebeginning,to ensurethat the dataon the disksis up to date,and to pro-vide enoughRAM spaceto buffer thetrack.

The unit characteristicsof ’size-code’, ’secpertrak’,’tracks’ and’sides’ mustbe the sameon srcunitand destunit.Providedthese para-meters areset to matchthe diskettein the drive,the com-mand shouldcopy any double-densitydisk, in anyformat - itneedn’t be a1616OSdisk.

Before thecopy, track 0of both thesource anddestinationdiskettes arescanned forDataAddressMarks

3- Interp2 rocesso1 r Com

munication

(DAM’s)and a sectorskew table(like the onepassed to"format") isbuilt inter-nally foreach drive.Disk sectorsare then readand writtenfrom eachtrackaccording tothe skewt-ables toensure thatreading thetrack takesonly onerevolutionno matterwhat skew.One side at atime is buf-fered.

Destinationsectors arewritten withthe sameDAM type(DAM vsDeletedDAM) thatthe sourcesectors had.This maysome day beimportant tosomeonesomewhere -DeletedDAMs arevery rarelyused thesedays.

3.21DriveRevolution Timing:19 unit<errocode> <

Interpr 3-ocessor 2Comm 2unication

timehigh> <timelow>Activatesthe selectedunit and, ifno errorsoccur, does adrive revol-ution timing.The countervalue thatwas reachedis returnedasa 16bit valuein timehighand time-low. Thiswill beinversely proportional tothe speed ofthe driveselected.The com-mand doesnotwait for aRDY signal,or wait forthe drive toreach speed;the first fewvalues willindicate howlong yourdrives taketo spin up. Ittakes twofull revol-utionsbetweenreturningtimingvalues.

3.22Sync:(FlushCache)1A

3- Interp2 rocesso3 r Com

munication

unit <errorcode>All entries inthe cacheassociatedwith thespecifiedunit areflushed todisk. If unit= FF, allcacheentriesare flushed.This meansthat both theRead andWrite cacheare empty.This isimportant toensure thatthe disks areupdatedbefore beingremoved,and to tellthe systemthat a disk isABOUT tochange, ifthe drivecan’t do diskchangedetection.PLEASE, dothe syncBEFOREremovingthe disk!.(It’s SYNC,not LOG!).

If a back-ground for-mat isproceeding,that drivecannot besync’d.

Interpr 3-ocessor 2Comm 4unication

3.23NewDisk:40 unitThis isintended toindicate tothe SSDCCthat the diskhaschanged;but since theSSDCC candetect diskchangebetter thanSSOS can,it’s ignored.

Level 0Reset: 41

Tells theSSDCC thata level 0reset hasoccurred.Runs aSYNC automatically,then rein-itialiseseverything.All drivparmsettings arelost. SSOSsends one ofthese; youdon’t haveto.

3.24Level 1Reset:42The SSDCCattempts torun a SYNC,then carrieson as before.

3- Interp2 rocesso5 r Com

munication

3.25Level 2Reset:43The SSDCCattempts torun a SYNC,then carrieson as before.

3.26 HardwareMods:I tried tokeeprequiredhardwaremods to aminimum.Here are theones youhave to do:

IncreaseRAM size:It’s all prettypointlesshaving diskcaching butno RAM.Still, itDOES workwithonly 8k.It usen’t to.

EnableDrive SelectOutputswithMotor Off:This isessential forDiskChangedetection towork. Dis-connect thetracks at IC19 pins 2 and4. Connectpin 2 to pin 1and pin 4 topin 5. Notethat the nor-

Interpr 3-ocessor 2Comm 6unication

mal SSDCCROMdoesn’tdeselect thelast driveonce thismod is done;but that isn’taproblem - itjust looksodd becauseit leaves thedrive’s LEDon.

IncreaseDrive Selec-tion ability:If you wantmore than 2drives, Isuggest yourewire theEJECT andINUSE sig-nals as driveselects DS2and DS3.Rememberto cut DS3sconnectionto DS1 (whydid they dothat?) Notethat the traceyou have tocut is underthe 34pinconnectoronthe compo-nent side ofthe board (convenient!).Drives 2 and3 can beaccessedwith theappropriatedrive selectbitmaps.

3- Interp2 rocesso7 r Com

munication

4drives.doc -Infoonhowtostrappopular drives.The use ofGreyham’sSSDCCcode allowsspecial fea-tures of yourdrives to beused. Theseare oftenenabled bystrappingplugs thatmay need tobe movedfrom thedefaultvalues.Thesechangesgenerallyinvolvedisk-changedetectionwhich isdone byvariousmethods.The strapp-ing infolisted belowshould allowfull writecachingwithout theneed to run"sync"whenever adisk ischanged.

drives. 4-doc - 1Info onhow tostrap populardrives.

One thing tonote: 5 1/4"drivesusually (al-ways?) haveaterminationresistor packwhichshould beinstalledonly in thedrive that isfurthestfrom theSSDCC onthe daisy-chain cable.Theterminationresistorpacksshouldbe removedfrom theother dri-ve(s). (TheyareALWAYSin a socket;you shouldnot have toattack thedrive with asolderingiron!).

If the drivesyou havearen’t listedbelow, itmerelymeans that Ihaven’t beenable to tryone out. Ifyou get itworking,please con-tact me andtell me so Ican includeit in this list.

4.1 CommonDrive

4- drives2 .doc -

Info onhow tostrap populardrives.

StrapNames:There’s asmallamount of standardisation amongdrive strapp-ing names;and if thedrives youhave aren’texplicitlymentionedbelow, youmight findbe able tomatch simi-lar namesand come upwithsomethingthat works.Not alldrives willhave alljumpers, andthe namesmay vary.

DS0, DS1,DS2, DS3 orDX0, DX1,DX2, DX3Theseare thedrive selectjumpers.Only ONEof the fourshould beinstalled at atime, andselects thatdriveaccording tothe driveselect bit-map; usuallyas unit 0, 1,2, 3.

MX Thisjumper setsthe drive toALWAYSbe selected;

drives. 4-doc - 3Info onhow tostrap populardrives.

which rulesout theuse ofthe daisy-chain selec-tion mechanism. ThisshouldNEVER beinstalled;even if youonly haveone drive.

HS, HM,HC, HLThese areHead-Loadjumpers;they won’tbe present ifyour driveshead isalwaysloadedagainst thedisk, as is thecase withmost (all?) 31/2" drives.Their mean-ings are: HS- Load headon DRIVE-SELECTsignal. HM -Load headfrom MOTOR-ON. HC- Alwayshead-load.HL - Head-load fromIN-USE.Only one ofthe fourshould beinstalled atany time.Head-loadshould notbe done viaDRIVE-SELECT, sincethe SSDCCpolls thedrives con-tinually, andyou willwear outyour head-

4- drives4 .doc -

Info onhow tostrap populardrives.

load mech-anism veryfast if HS isinstalled.The IN-USEsignal is notgenerallysupported,so don’t useHL either.You have achoice ofinstallingeither HM orHC. HMwill causethe drivehead to loadevery timethe motorsgo on; whichinevitablywears thedrive out alittle faster(but then,they AREbuilt for thissort ofthing). HCleaves thehead in con-tact with thedisk all thetime, whichwill wear thedisk andhead outfaster (butthen, this isthe case withmost (all?) 31/2" drivesanyhow).So, depend-ing on yourpersonalpreference,installEITHERHM or HC.

MS, MMThese areMotor-Onjumpers;they controlunder whatconditionsthe motor is

drives. 4-doc - 5Info onhow tostrap populardrives.

turned on.The idea is toleave themotor OFFunless anydrive isbeingaccessed, toreduce wearon the drive.MS and MMwork as fol-lows: MSonly- MotorOn by DRIVE-SELECT signal.MM only-Motor On byMOTOR-ON signal.MM & MS-Motor On byeither MOTOR-ON orDRIVE-SELECT.

As is thecase with drive-select,we don’twant themotors turn-ing on everytime thedrive ispolled fordisk-changewhile it isidle. So,Motor Onshould becontrolledONLY bythe MOTOR-ON signal.Installjumper MMONLY.

DC, 2SDon’t askme wherethey get thenames; Iwould havethought 2Swould havebeen

4- drives6 .doc -

Info onhow tostrap populardrives.

something todo with double-sided orsomething,but nooooo.I’ve onlyseentheseonMitsubishidrives. Theyalter themeaning ofthe RDYsignal,allowing it todo disk-changedetection(which isn’tcommon on5 1/4" drivesapparently).Jumper DCshould neverbe installed,and jumper2S thenselects:Installed - HOLD-RDYmode. Not-Installed -StandardRDY mode.

Hold-RDYmode is aspecialmodewhereby theRDY signalgoes activewhen thedrive isready, andremainsactive evenwhen themotors turnoff; until thedisk isremovedfrom thedrives.

IU Controlsthe selectionof the front-panel LED.Wheninstalled, the

drives. 4-doc - 7Info onhow tostrap populardrives.

IS-USE sig-nal willilluminatethe LED.This is notsupportedbythe SSDCC;so don’tinstall thejumper.

MitsubishiM4853-1 51/4"

Themanual Ihave forthese drivesis wrong inthat itreverses thetreatment ofthe MM andMS jumpers.The drivesact asdescribedabove.

Install jumpers:HM, 2S,MM, IU,DSnRemove Jumpers:HH,HL, HC, HS,DC, MS,MX

Set disk-changemethod indrivparm to2 (Hold-Ready).

NEC FD-1036A 31/2"

As far as Ican tell, thedisk-changesignal fromthese drivesis broken;even thoughit’s sup-posed towork.Luckily it

4- drives8 .doc -

Info onhow tostrap populardrives.

can be jum-pered to theRDY signal,where itDOES work.

The jumperlabelled"DCG 2"near theedgeconnectorshould beinstalled atthe end withthe "2". Adrive selectjumpershould alsobe installed.

Set disk-changemethod indrivparm to4 (Diskchange on RDYsignal).

MitsubishiMF351 31/2" Single-Sided

This drivecan’t do Disk-Change,but can doHold-RDY.

Install jum-pers:2S,MM, DSnRemove Jumpers:DC,MS, MX

Set disk-changemethod indrivparm to2 (Hold-Ready).

Pertec FD-20051/4"40Track Single-Sided

drives. 4-doc - 9Info onhow tostrap populardrives.

Hardly apopulardrive, itcan’t copeeven with12ms steprate, whichis theslowest theSSDCC canproduce. Double-density is probablypushing itfor thesedrives any-way.

4- drives1 .doc -0 Info on

how tostrap populardrives.

5files.lst -List offilesonthisdisk

Device: /F1Volumename:/SSDCCDirectory:/F1

AUTOEXEC0.SHELL-run by bootsector atlevel 0 reset.AUTOEXEC1.SHELL -run by bootsector atlevel 1 reset.AUTOEXEC2.SHELL-run by bootsector atlevel 2 reset.FILES.LST-this list offile descriptions. LOADDC.SHELL-auto-loadsthe softwareversion (the.cmd file)READ.ME-brief intro to.doc files.

Device: /F1Volumename:/SSDCCDirectory:/F1/BIN

files.ls 5-t - List 1of fileson thisdisk

DOSDIR.EXEC- listdirectory ofan MSDOSdisk. DOSGET.EXEC- get filefrom anMSDOSdisk. DOSINIT.XREL-initialise anMSDOSdiskette;used afterformat andbefore doswrite/dosput.Needs thefile bootsector.fmt in thecurrentdirectory. DOSPUT.EXEC-put a fileonto anMSDOSdisk. DOSREAD.EXEC- read a filefrom anMSDOSdisk ontostdout. DOSSTAT.EXEC- displaystatisticsfrom anMSDOSdisk. DOSWRITE.EXEC- write afile onto anMSDOSdisk fromstdin. DRIVETIME.XREL- primi-tive drivespeedindicator. DRIVPARM.XREL- setdrive anddiskette parameters. FASTCOPY.XREL- fastdisk copier.FORMAT.XREL-intelligent

5-2 files.lst

- Listof fileson this

disk

disk for-matter. GOZ80.XREL-sendSSDCC an"executeZ-80 code"command.GREYBOOTV3.EXEC-My bootprogram thatruns AUTOEXEC[0|1|2].SHELL HDCONFIG.XREL- newversion of HDCONFIGthat workswith the newEPROM. ILATCH.XREL- Readinput fromZ-80 Latch.MAKECMD.XREL-Build aTRSDOS.CMD filefrom Z-80memoryaddressspace. READVER.XREL- DisplaySSDCC ver-sionnumber. RECVCMD.XREL- Load aTRSDOS.CMD fileinto Z-80memoryaddressspace. RLATCH.XREL- Reset bitsin Z-80 out-put Latch.SETSTEP.XREL- Setstep rate fora givendrive. SLATCH.XREL- Set bits inZ-80 outputLatch. SSDCCERR.XREL- Interro-

files.ls 5-t - List 3of fileson thisdisk

gate SSDCCerrors. SYNC.XREL-Indicate thatdisk is beingchanged;flushbuffers.Necessaryevery diskchange ifyou usecaching andyour drivescan’t sup-port disk-changesignals oryou don’t dothe SSDCCcard mod tooutput driveselect sig-nals. ZMAC.XREL-Z80 macro cross-assembler. "yacc"source isn’tincluded. ZMDB.EXEC- MDB forZ-80Addressspace. Thesource tothisgot deleted.ZMFB.XREL- MFB forZ-80Addressspace. ZMWB.XREL -MWB forZ-80Addressspace.

Device: /F1Volumename:/SSDCCDirectory:/F1/CMD

DC___.CMD- Downloadable ver-sion of newdiskcontroller.Doesn’t

5-4 files.lst

- Listof fileson this

disk

support fast-copy, andSSO/Swon’t allowuse of /H0and /H1(unless youhave a SCSIROM). DCLIM.CMD-Very limitedversion ofthe code forbootstrapping it in.

Device: /F1Volumename:/SSDCCDirectory:/F1/DOC

CHANGES.DOC- Bor-ing file list-inghistoricalchanges tothe code. COPYRIGHT.DOC- Evenmore boringfile includedfor legalreasons.DC.DOC-All you everwanted toknow aboutthe drivecontrollercode. DRIVES.DOC-Info on howto strap spe-cific drivesfordisk-changeuse. UTILITYS.DOC-Descriptionof some ofthe utilitys.ZMAC.DOC- Fairlypathetic infoabout theZ80assembler.

files.ls 5-t - List 5of fileson thisdisk

Device: /F1Volumename:/SSDCCDirectory: /F1/DOSREAD

DOSREAD.C- Source tothe ’C’ por-tion of DOSREAD, DOSWRITE,DOSDIR,DOSGET,DOSPUTand DOSSTAT. MAKE.SHELL-Shell file torecompileDOSxxxxfromscratch. RDWR512.AS-68kassemblerroutines tolink to DOSREAD.C SSDD.HITECH- Hitechassemblerformatinclude fileequivalent toSSDD.H

Device: /F1Volumename:/SSDCCDirectory:/F1/FMT

BOOTSECTOR.FMT-PrototypeMSDOSboot sectorused byDOSINIT.

Device: /F1Volumename:/SSDCCDirectory: /F1/HARDDISK

5-6 files.lst

- Listof fileson this

disk

ADAPTEC.C- MarkHarvey’sinit programfor adaptecusers. HARDDISK.DOC- Infoexplainingthe story onthe hard diskutilities. HDCONFIG.C- MarkHarvey’shard disk configurationprogram. MAKEADAPTEC.SHELL - Shell fileto remake ADAPTEC.XREL MAKEHDCONFIG.SHELL -Shell file toremake HDCONFIG.XREL

Device: /F1Volumename:/SSDCCDirectory: /F1/HD_LIB

Sources tothe Hard-Disk library,writtenmainly byMarkHarvey.

MAKE.SHELL- Shellfile toremake anylibrary mod-ule. MAKELIB.SHELL- Shell file torebuild thelibrary. HDISK.LIB-The Hard-Disk library.

files.ls 5-t - List 7of fileson thisdisk

Device: /F1Volumename:/SSDCCDirectory:/F1/HEX

DC___.HEX- EPROMbinaryimage. (In-tel HEX for-mat) HD___.HEX-EPROMbinaryimage withSCSI sup-port. (IntelHEXformat)

Device: /F1Volumename:/SSDCCDirectory:/F1/INC

CHECKVER.INC-Routine tocheckSSDCC ver-sionnumber. LWRXRDY.INC- Routineto wait along time forstuff fromZ-80. READ1024.INC-Routine toread a1024byteblock fromthe Z-80. SENDHL.INC- Routineto send a16bit valueto the Z80.SETCHAR.INC- Rou-tine to setdrive parameters. SHOCHAR.INC-Routine toread backdrive param

5-8 files.lst

- Listof fileson this

disk

eters.SSDD.H-SSDCCheader filewith extrafloppy stuff.SSDD.INC-Commoninclude filefor SSDCCprograms. SSDCCERR.INC- Rou-tine to inter-rogate errorcodes. SYSCALLS.MAC- Syscallsinterfacefrom O/S3.WRITE1024.INC- Rou-tine to writea 1024byteblock to theZ-80. WRITE512.INC-Routine towrite a512byteblock to theZ-80. WRXRDY.INC-Routine towait for stufffromt theZ-80. WTXRDY.INC-Routine towait for theZ-80 toaccept stuff.

Device: /F1Volumename:/SSDCCDirectory:/F1/MRD

FDDVR.C-Source toextra floppydevicesMRD. FDDVR.MRD-Extra floppydriverMRD;MAXUNIT= 2. FDMRDRIVERS-MRDRIVERS file with

files.ls 5-t - List 9of fileson thisdisk

the extrafloppydrivesMRD.HDDVR.C-Source tohard diskdriver MRD.HDDVR.MRD- Harddisk driverMRD. Auto-configuring; MAXU-NIT = 2. HDMRDRIVERS- MRDRIVERS filewith the harddisk MRD.MAKEFD.SHELL-Shellfile to makeFDDVR.MRD MAKEHD.SHELL- Shell file tomake DDVR.MRD

Device: /F1Volumename:/SSDCCDirectory:/F1/SRC

DOSINIT.S- SSASMsource to DOSINIT.XREL DRIVETIME.S-SSASMsource to DRIVETIME.XREL DRIVPARM.S-SSASMsource to DRIVPARM.XREL FASTCOPY.S-SSASMsource to FASTCOPY.XREL FORMAT.S-SSASMsource to FORMAT.XREL

5-1 files.lst0 - List

of fileson this

disk

GOZ80.S-SSASMsource to GOZ80.XREL GREYBOOTV3.S-SSASMsource to GREYBOOT.EXECILATCH.S-SSASMsource to ILATCH.XREL MAKE.SHELL-Shellscript toremake.XREL stufffrom .S files.MAKECMD.S-SSASMsource to MAKECMD.XREL READVER.S-SSASMsource to READVER.XREL RECVCMD.S-SSASMsource to RECVCMD.XREL RLATCH.S-SSASMsource to RLATCH.XREL SETSTEP.S-SSASMsource to SETSTEP.XREL SLATCH.S-SSASMsource to SLATCH.XREL SSDCCERR.S-SSASMsource to SSDCCERR.XRELSYNC.S-SSASMsource to SYNC.XRELZMFB.S-SSASMsource to Z

files.ls 5-t - List 1of files 1on thisdisk

MFB.XRELZMWB.S -SSASMsource to ZMWB.XREL

5-1 files.lst2 - List

of fileson this

disk

6harddisk.doc -Infoon theharddisk initialisationprograms.These pro-grams areexact copiesof thosewritten byMarkHarvey, andare includedhere for completeness.The disklibrary theylink with ISdifferent,however;since SCSIblocks arenowread/writtenwith a dif-ferent mess-age numberto the floppydrives.

Hence whenusing thenew Floppy/SCSIEPROM, thehdconfig.xrel and adaptec.xrel pro-grams in the/BINdirectory on

harddi 6-sk.doc 1- Infoon theharddisk initialisation programs.

THIS diskMUST beused; NOTthe orig-inals. Theones on thisdisk areNOT com-patible withthe originalSCSIEPROMseither.

6- harddi2 sk.doc -

Info onthe

harddisk initialisation prog

rams.

7utilitys.doc -descriptionof1616 utilitysby Greyham. 13-1-89

The soft-waredescribedbelow is COPYRIGHT;but with alicence per-mittingcopies to bemade, ifdone so for*FREE*.See copyright.doc.

<*>

This is adescriptionof the uti-lities pro-vided withmy versionof theSSDCCsoftware.You shouldread’dc.doc’before read-ing this, or it

utilitys 7-.doc - d 1escription of1616utilitysby Greyham.13-1-89

won’t makea whole lostof sense.

Most of theutilities wereneeded todevelop anddebug theSSDCCsoftwareprogram.They aredivided intotwo sec-tions; firstlythose thatwork witheither theoriginalSSDCCfirmware, ormy SSDCCsoftware -and sec-ondly thosethat workonlywithmySSDCCsoftware.All utilitiesproduce ausage mess-age if badparametersare offered.Try using a’?’. Eg:recvcmd ?

7.1 RECVCMD [+|-][filename.cmd] -Allows thedownloading ofTRSDOSformat.CMD filesinto the

7- utility2 s.doc -

description of1616

utilitysby Greyham.

13-1-89

Z80’s RAM.TRSDOSformat.CMD filescontainloader con-trol infor-mation tospecifywhere in theRAM spaceto load the information,and RECVCMD con-verts thisinto "WriteZ-80 RAM"commands.A .CMD filemust beinput re-di-rected intothecommand.This allowsfiles to be downloadeddirectly tothe Z80from, say, aserial port.RECVCMDdisplaysinformationabout wherethe inputprogramloads, andstops read-ing when itdetects theend of the.CMD filefrom thecontrolinformationin the file.

If filename.cmd isspecified, acopy of the.CMD file iswritten to filename.cmd.If ’-’ is

utilitys 7-.doc - d 3escription of1616utilitysby Greyham.13-1-89

specified,the code isactually downloadedinto theZ80’s RAM.If ’+’ isspecified,the code is downloadedinto the Z80,and the Z80is instructedto branch tothe entryaddressspecified inthe .CMDfile once theprogram isloaded intomemory.

Althoughthis com-mand CANberun from aphysicaldisk drive, itshould nor-mally be runonly fromthe RAMdisk tominimise thecorruptingeffects of theSSDCCsoftware.

Examples:

RD>recvcmd - <file.cmd

Loadfile.cmd intothe Z80’sRAM space.

RD>recvcmd -outfile.cmd <in-file.cmd

Load infi-le.cmd intothe Z80’sRAM spaceand make a

7- utility4 s.doc -

description of1616

utilitysby Greyham.

13-1-89

copy ofinfile inoutfile.cmd

RD>recvcmd + < infi-le.cmd

Load infileinto theZ80’s RAMspace, andexecute it.

7.2 GOZ80addrs -The Z80 isinstructed(via the"Call Z80program") tocall the pro-gram ataddrs in itsaddressspace.

Examples:

goz80 6000

Call the firstlocation inthe Z80’sCommonBankaddressspace.

7.3 SSDCCERR errornoDisplays theSSDCCerror asso-ciated witherrorno.errorno

utilitys 7-.doc - d 5escription of1616utilitysby Greyham.13-1-89

should neverreally bedisplayed tothe user, asthe "errormessage"commandshould beused to getan ASCII representationof the errormessage -that is whatthis com-mand does.The errormessage willusually con-tainnumbers(Eg: track,sector, sideetc) whichwill often bewrong, sincethe messageis only validimmediatelyafter theerroroccurred.

The errormessagesreturned bymy SSDCCsoftwarewill be dif-ferent tothosereturned bythe original.Many willhave differ-ent numbers.

7.4 SETSTEPunit stepcode -Sets the steprate for’unit’according to

7- utility6 s.doc -

description of1616

utilitysby Greyham.

13-1-89

’stepcode’.This uses the"set steprate" com-mand, withstepcodebeing the"rate" para-meter. Thus,values for"stepcode"are: 0 = 2ms,1 = 3ms, 2 =6ms, 3 =12ms.

7.5 MAKECMD cmdfile.cmdstart1end1 [...startnendn]entryCreates aTRSDOSformat.CMD filefrom theinformationin the Z80’saddressspace. Anynumber ofdata chunkscan be con-tained in thefile, so youmay specifyany numberof start/endpairs. cmdfile.cmd is thename of the.cmd file towhich theinformationis written,and entry is

utilitys 7-.doc - d 7escription of1616utilitysby Greyham.13-1-89

the addressto whichtransfer iscontrolledwhen theprogramstarts. The.cmd file canbe reloadedwith RECVCMD at alater date.

Examples:

makecmd ssdccrom.cmd0000 5fff0000

Do a dumpof theSSDCCrom, givingits entryaddress at0000.

makecmdfile.cmd6000 61007000 71007500 75306000

Createfile.cmdwith theinformationfrom 6000 to6100, 7000to 7100 and7500 to7530, withentryaddress6000.

7.6 ZMDB a1[a2]ZMFBa1 a2n1 ZM

7- utility8 s.doc -

description of1616

utilitysby Greyham.

13-1-89

WB a1n1 [n2][n3]....These com-mands arevery similarto the1616OScommandsof the samename (lessthe leading’Z’), exceptthat theyoperate onthe Z80’saddressspace. Also,zmwbdoesn’t havemwb’s "interactive"mode. Seethe 1616manual fordetails.

7.7 READVER -Displays theSSDCC ver-sionnumber.

<*>

The utilitiesfrom here oncan be runonlywithmySSDCCsoftware,eitherbecause thethings theyaim to dodon’t makesense in thecontext of

utilitys 7-.doc - d 9escription of1616utilitysby Greyham.13-1-89

the originalfirmware, orit just can’thandle them.

7.8 DRIVPARM[unit[stepr2step bitmap sizecodesecpertraktrackssides cachlevcngmet]] -Drive para-meter sett-ing. With noparameters,it lists alldrive para-meters forallunits. If’unit’ isspecified, itlists para-meters forthat unit. Ifdrive characteristics arespecified,thesebecome thedrives newparameters.Characteristics must bein the correctorder.

7- utility1 s.doc -0 descript

ion of1616

utilitysby Greyham.

13-1-89

stepr - steprate. 0 =2ms, 1 =3ms, 2 =6ms, 3 =12ms. 2step- do wedouble stepbetweentracks? 0 =No, 1 = Yesbitmap -latch bitmapthat selectsthis drive.sizecode -sector sizecode. 0 =128b, 1 =256b, 2 =512b, 3 =1024b sec-pertrak -number ofsectors pertrack. tracks- number oftracks. sides- number ofsides. 1 =SingleSided, 2 =Doublesided. cach-lev - cachinglevel. 0 =None, 1 =Read Cache,2 = WriteCache.cngmet -disk change.0 = None;RDY notvalid, 1 =None; RDYis valid, 2 =HOLDRDY, 3 =DISKCNG,4 =DISKCNGon RDY

utilitys 7-.doc - d 1escripti 1on of1616utilitysby Greyham.13-1-89

7.9SYNC[unit] -Flushes bothread andwrite cachesfor unit, ifspecified;otherwise,flushes bothcachesforallunits. Cach-ing need notbe enabled,althoughyou don’tneed ’sync’if caching isdisabled.Note that asyncSHOULDbe run immediately afterdisablingcaching.

You shouldALWAYSrun ’sync’BEFOREremoving adiskfrom thedrive if youhave someform ofcachingenabled, andyour drivecannotdetect diskchanges.The SSDCCwill automatically flushthe writecache justbefore turn-ing it’s drivemotors off;however,this may bemisleadingbecause themotors maynot have

7- utility1 s.doc -2 descript

ion of1616

utilitysby Greyham.

13-1-89

been on, ifthe lastaccess wasonly to thecache. syncwill guaran-tee to flushthe buffers immediately.However, donot run syncwhile loggedonto thediskette youare about toremove!!!1616OSwillproceed toread the rootblock whenit goes backto theprompt, andthat will stayin the cache,possiblycorruptingthe nextdisk!!!

7.10 4DRIVETIME unitDoes con-tinuous rota-tion timingtests on’unit’. Testscontinueuntil Alt-C(abort) is hit.A value ofabout 27775is around300RPM. Ifyou happento have afrequencycounter andcan set yourdrive toexactly300RPM,

utilitys 7-.doc - d 1escripti 3on of1616utilitysby Greyham.13-1-89

please tellme whatvalue youget back.Precisedrivespeed couldbe foundfrom thisvalue, if youknow thecorrelation.

When doingthis driverotation test,the SSDCCdoesn’t waitfor a RDYsignal fromthe drive;you willoften get a"RotationalFailure"error at thestart, eitherbecause 1)The drivedoesn’t startto output theINDEX sig-nal until it’sup to speed,or 2) Duringthe spinup,the first rev-olution tooklonger thanthe SSDCCsmaximumtimingcount. Thisis quite OKand normal.

7.11 FASTCOPY[-r] srcunit destunitMakes amirror

7- utility1 s.doc -4 descript

ion of1616

utilitysby Greyham.

13-1-89

image copyof the disk inunit ’srcu-nit’, onto thedisk in’destunit’.Source andDestinationunits musthave ident-ical diskettecharacteristics (sides,tracks andsectors pertrack), andthese characteristicsMUSTmatch thediskettebeingcopied!. Thedestinationdiskettemust alreadybe for-matted, butneedn’t haveany file sys-tem. SourceandDestinationneedn’t havethe sameskew factor,but other-wise must beidenticallyformatted.The copy isbuffered onediskette sideat a time inthe Z80’sRAM - youcan’t dofastcopieswith onlyone drive.(You’d haveto swapdisks 320times for800k!).

utilitys 7-.doc - d 1escripti 5on of1616utilitysby Greyham.13-1-89

If the disk isfound to bean SSO/Sdisk, the rootblock isscrambled ina similarmanner tothe SSO/Sdiskcopyutility. The-r optionstops thisfrom beingdone. Thedisks willthen lookidentical toSSO/S,which willget VERYconfused.DON’T use-r unless youhave aREALLYgood reason.Mirror-image backups isNOT a goodreason.

You canquite hap-pily makefastcopys ofMSDOSdisks bysetting therelevant diskcharacteristics (40 tracks,9 sectors pertrack, 2sides), thenyou can use"format" toformat thedestinationdisk, and"fastcopy"to do thecopy.

7- utility1 s.doc -6 descript

ion of1616

utilitysby Greyham.

13-1-89

7.12 FORMAT unit-Universalformattingprogram.This willformat anydisk accord-ing to thedrive characteristics. Asthe SSDCCknows noth-ing about thedisk filesystem, thediskette isnot immediately usable;some sort offile systemhas to beplacedon thedisk. Eg:blockdev for1616 OS,mkfs forMinix, dosi-nit forMSDOS etc.

format iscapable ofincredibleskew variety- see thesource for-mat.s.

Note thatblockdev isfullycapableof formatt-ing a diskunder myversion, solong as thedrive characteristicshave beenset for a1616OSdisk.

utilitys 7-.doc - d 1escripti 7on of1616utilitysby Greyham.13-1-89

7.13 DOSINIT unitInitialises anemptyMSDOS filesystem onunit. Thedisk in ’unit’must alreadyhave beenformattedwith 512byte sectors.This willwork withvirtuallyANY drivecharacteristics (so long asthe sectorsize is 512bytes),although Ican’t guar-antee thatMSDOSwill be ableto work withthe endresult. Giveit a try. Thisis providedmainly toavoid haveto actuallyUSE Mess-Dos, if at allpossible.

Theprogramrequires a"PrototypeBoot Sector"in the file bootsector.fmt.TheMSDOSboot sectorcontainsboth disketteinformationand the DOSbootstraploader.DOSINIT

7- utility1 s.doc -8 descript

ion of1616

utilitysby Greyham.

13-1-89

uses theprototype toget the boot-strap loader,and modifiesits disketteinformationaccording tothe drive’s characteristics (as perdrivparm).The bootsector from adisk for-mattedunder theversion ofMessDosyou plan touse the diskwith is ideal;but virtuallyany oneshould do.One isalready pro-vided - itshouldwork.

Needless tosay, any filespreviouslyon theMessDosdisk areWIPED!

7.14 SLATCH bitmap -The "bit-map" isORed ontothe Z80’slatch. Thissets all thebits in thelatch that areset in bit-map.

utilitys 7-.doc - d 1escripti 9on of1616utilitysby Greyham.13-1-89

7.15 RLATCH bitmap -The "bit-map" isNEGatedand ANDedwith theZ80’s latch.This resetsall the bits inthe latch thatare set inbitmap.

7.16 ILATCHReads inputfrom thelatch, dis-playing thedata presentthere.

7.17 GREYSBOOT3Applix’sboot blockprogram,modified sothat it setsstep rate to3ms andreads ’autoexecn’, wheren is the bootlevel. auto-exec0shouldcontain codeto set yourdrive para-meters viadrivparm.

7- utility2 s.doc -0 descript

ion of1616

utilitysby Greyham.

13-1-89

7.18 DOSREAD[-an]drivefile -DOSREADreads a filefrom theMSDOS filesystem in’drive’, andsends it tothe standardoutput. Thismay be redi-rected into a1616OS file.The ’-a’option doesASCII con-version ofCR/LF combinations.The disk ischecked forbeing in asensibleMSDOSformat. The’-n’ optionrelaxes thischeck.

DOSREAD,DOSWRITE, DOSDIR,DOSGET,DOSPUTand DOSS-TAT are allidenticalcopies of thesame .execprogram,derived fromDOSREAD.C. The pro-gramsmanipulateMSDOS(rather than1616OS) file

utilitys 7-.doc - d 2escripti 1on of1616utilitysby Greyham.13-1-89

systems, andwere writtenin ’C’ byMichielHuisjes,originallyfor use underMinix.

The pro-grams havebeenmodifiedpretty heav-ily to allowthem to readvirtually anyMSDOS filesystem; 31/2" disks inparticularcan now beread. Thereis no need toset the drivecharacteristics for thedrive to theMSDOSparameters;the pro-grams willset the sectorsize code for512 bytesectors, readthe bootblock, andset the otherdrive characteristicsfrom this.The originalcharacteristics arerestoredwhen theprogramsexit to1616OS. Ifrecompiled,the pro-grams mustbe linked to"rdwr512.as". TheyMUST becompiled to

7- utility2 s.doc -2 descript

ion of1616

utilitysby Greyham.

13-1-89

an EXEC,rather thanan XRELfile. There isa make.shellfile is thedosreaddirectorythat com-piles theprograms.

7.19 DOSWRITE[-an]drivefileDOSWRITE writes afile on theMSDOS filesystem in’drive’ fromthe standardinput. The’-a’ optiondoes ASCIIconversionof CR/LF combinationsand the ’-n’optionrelaxes thetest thatmakessure itactually ISan MSDOSdisk.

7.20 DOSDIR[-nlr]drive[dir]DOSDIRlists the

utilitys 7-.doc - d 2escripti 3on of1616utilitysby Greyham.13-1-89

directory ofthe MSDOSdisk in’drive’. Adirectorypath namemay bespecified tolist the con-tents of subdirectories -’/’ ratherthan ’\’should beused as theseparatorbetween thepath components. ’-l’gives a longlisting,showing fileattributesand modificationdate/time.’-n’ relaxesthe test thatmakessure itactually ISan MSDOSdisk.

7.21 DOSGET [-an]drivefile1[file2[file3 ...]]] -DOSGETreads filesfrom theMSDOSdisk in’drive’, andwrites themon the cur-rent 1616O/S device,

7- utility2 s.doc -4 descript

ion of1616

utilitysby Greyham.

13-1-89

with thesame filename. Thefile name(s)may containa path com-ponent if thefiles are in subdirectories on theMSDOSdisk, inwhich casethe resulting1616 O/Sfilenameswill be thelast compo-nent of thefilename(ie:the pathstrippedoff). Thisallowstransfer ofmultiplefiles. The’-a’ optiondoes ASCIIconversionof CR/LF combinations.The ’-n’optionrelaxes thetest thatmakessure itactually ISan MSDOSdisk.

Note that:RD>dosget1 myfile Isequivalentto: RD>dosread 1 myfile> myfile

7.22 DOSPUT [-an]drive

utilitys 7-.doc - d 2escripti 5on of1616utilitysby Greyham.13-1-89

file1[file2[file3 ...]]] -DOSPUTwrites filesto theMSDOSdisk in’drive’, withthe same filename theyhad on thecurrent O/S1616 device.If the filename(s)contain apath compo-nent, the lastcomponentidentifies the1616 O/Sfile, and thefiles arewritten intoasubdirectoryon theMSDOSdiskette.Naturally,wildcardsmay be usedto write lotsof files to theroot direc-tory of theMSDOSdiskette.The ’-a’option doesASCII con-version ofCR/LF combinations.The ’-n’optionrelaxes thetest thatmakessure itactually ISan MSDOSdisk.

7- utility2 s.doc -6 descript

ion of1616

utilitysby Greyham.

13-1-89

Note that:RD>dosput1 myfile Isequivalentto: RD>doswrite 1myfile <myfile

7.23 DOSSTAT[-n]driveDOSSTATdisplaysstatus infor-mationabout theMSDOSdiskette in’drive’. Thiscan be usefulif the disksexact formatis uncertainor strangethings starthappening.

Commentsabout assumptions in theoutputshould betreated withcaution asthey indicatethat bootsector datadescribingthe diskslogicaldimensionswas incomplete. The ’-n’optionrelaxes thetest forDOS-ness.

utilitys 7-.doc - d 2escripti 7on of1616utilitysby Greyham.13-1-89

7.24 ZMAC(1)UNIXProgrammer’s Manual ZMAC(1)NAMEzmac -macro cross-assemblerfor the ZilogZ80 microprocessor

SYNOPSISzmac [-bcdefgilLmnopst] infile

DESCRIPTION TheZmacassembler ismodelledafter theIntel 8080macro cross-assemblerfor the Intel8080 by KenBorgendale.The majorfeatures are:Full macrocapabilities,Conditionalassembly, Avery flexibleset of listingoptions andpseudo-ops,Symboltable output,Error report,Eliminationof sequentialsearching, Commenting

7- utility2 s.doc -8 descript

ion of1616

utilitysby Greyham.

13-1-89

of source,Facilities forsystem defi-nition files.

Zmacassemblesthe specifiedinput file(defaultextension .z)and pro-duces a .hexoutput file.The optionsare:

b no binary

c produce aTRSDOS.CMD for-mat file,instead ofINTELHEX.

d debug

e error listonly

f print ifskippedlines

g do not listextra code

i do not listinclude files

l no list

L force list-ing ofeverything

m printmacroexpansions

n put linenumbers off

o list tostandardoutput

p put outfour \n’s foreject

utilitys 7-.doc - d 2escripti 9on of1616utilitysby Greyham.13-1-89

s don’t pro-duce a sym-bol list

t don’t knowwhat thisoption does

BUGS Theman page isincomplete.If anyonediscoversmore infor-mationabout usingzmac, pleaseconsiderhelping toupdate theman page.

7- utility3 s.doc -0 descript

ion of1616

utilitysby Greyham.

13-1-89

Tableof Contents

1 read.me -very invitingfile toread. ...

2dc.doc- InfoaboutGreyham’sssdcc controller software.Version A.4e12-1-89.............2.1 Terminology .....2.2 Introduction .....2.3EPROMVersion ...2.4 CMDFile Ver-sion ........2.5 RAMUsage ......2.6 ErrorRetries ....2.7 DriveCharacteristics ........2.8 StepRate: .......2.9 Double/SingleStepBetweenTracks: ...2.10 DriveSelectLATCHbitmap: ...2.11 Sec-tor Size:.................

i

2.12 Sec-tors pertrack: ......2.13Tracks: ...2.14 Sides/Heads: ...2.15Cachinglevel: .......2.16 DiskChangeMethod/RDY Sig-nal: .........2.17Error Messages .....

3 Interprocessor Communication .....3.1 Abortcommand: 00 ..........3.2 Blockread command: 01unit blockhighblocklow<errorcode or 0><data> ....3.3 Blockwrite command: 02unit blockhighblocklowdata <errorcode>.................3.4 Errormessage command:03 errorcode<string><0> ..........3.5 For-mat command: 04unit $B5$7Entracks skewtable<errorcode or 0> ....

ii

3.6 TypeII Formatcommand: 05 unit$B5 $7Etrack sidedoIAM skewtable <errorcodeor 0> .......3.7 ReadZ80 RAMcommand: 07 Z80addrhZ80addrllengthhlengthl<data> ....3.8 WriteZ80 RAMcommand: 08 Z80addrhZ80addrllengthhlengthldata .........3.9 CallZ80 pro-gram: 09Z80addrhZ80addrl.................3.10 ReadZ80 ROMversion command:0A <ROMversion> ..............3.11 Announce1616-O/Sversion:0B SSOSversion ......3.12 Setfloppydisk steprate: 0Cunit rate.................3.13 Enable/DisableZ80 Interrupts: 0Dflag ..........3.14 SetLATCHbits: 12bitmap ....3.15 ResetLATCHbits: 13bitmap ....

iii

3.16 InputLATCHbits: 14 <bitmap>.................3.17 ReadSectorID: 15unit trackside <errorcode> <sectornum> ..............3.18 Setdrive characteristics: 16 unitstepr2step bit-map size-code secpertraktrackssidescachlev cngmethod<errorcode or 0> ....3.19 Showdrive characteristics: 17 unit<errorcode or 0><stepr><2step> <bitmap><sizecode> <secpertrak><tracks><sides> <cachlev><cngmethod> ..........3.20 Fastcopy: 18srcunitdestunit <errcode>.................3.21 DriveRevolution Timing:19 unit <errocode><timehigh> <timelow> ...........3.22 Sync:(FlushCache)1A unit <errorcode> ..............3.23 NewDisk: 40unit .........

iv

3.24 Level1 Reset:42 ............3.25 Level2 Reset:43 ............3.26 HardwareMods: .....

4 drives.doc -Info onhow tostrap populardrives..............4.1 Com-monDriveStrapNames:.................

5files.lst- Listof fileson thisdisk ..

6 harddisk.doc - Infoon theharddisk initialisation programs..............

7 utilitys.doc -description of1616utilitysby Greyham.13-1-89.............

v

7.1 RECVCMD [+|-][filename.cmd] - ....7.2GOZ80addrs - ....7.3 SSDCCERRerrorno.................7.4 SETSTEP unitstepcode -.................7.5 MAKECMD cmdfile.cmd start1end1[...startnendn]entry ......7.6ZMDB a1[a2]ZMFB a1a2 n1ZMWBa1 n1 [n2][n3].... ...7.7 READVER - .....7.8 DRIVPARM[unit[stepr2step bit-map size-code secpertraktrackssidescachlevcngmet]] -.................7.9 SYNC[unit] - ....7.10 4DRIVETIMEunit ........7.11 FASTCOPY[-r] srcu-nit destu-nit ..........7.12 FORMAT unit- ...............7.13 DOSINIT unit.................7.14SLATCHbitmap -.................

vi

7.15 RLATCH bit-map - ......7.16 ILATCH ......7.17 GREYSBOOT3 .............7.18 DOSREAD[-an]drive file -.................7.19 DOSWRITE[-an]drive file.................7.20 DOS-DIR [-nlr]drive[dir] .......7.21 DOSGET[-an]drive file1[file2 [fi-le3 ... ]]] -.................7.22 DOS-PUT [-an]drive file1[file2 [fi-le3 ... ]]] -.................7.23 DOSSTAT[-n] drive.................7.24 ZMAC(1)UNIX Programmer’s ManualZMAC(1).................

vii