* Disk-Defs.mc - last modified December 10, 1978 6:17 PM
** stored in [ivy]<D1source>Emu.dm

TITLE[TriconD-Defs.mc - July 11, 1984 4:08 PM];
* m[
noop, ilc[(branch[.+1])]];*Defined in Preamble.mc
* m[
skipif, BRGO@[tsd@] JMP@[.+2,#1,#2]];

***** - - - - - - - - - -
TASKN[DSK, 14];
*** TIOA values for disk

Device[DiskControl, 10];
Device[DiskMuff, 11];
Device[DiskData, 12];
Device[DiskRam, 13];
Device[DiskTag, 14];

***** - - - - - - - - - -
*** Rm register names
RmRegion[diskrms];
rv[Errors, 0];
rv[KScr, 0];
rv[KScr2, 0];
rv[KScr3, 0];
rv[KScr4, 0];
rv[Count, 0];
rv[CountS, 0];
rv[KScrS, 0];
rv[KScrL, 0];
rv[DriveNumber, 0];
rv[EMUcount, 0];
rv[Dmux100, 0];
rv[Dmux101, 0];
rv[Dmux102, 0];
rv[Dmux103, 0];
rv[Dmux104, 0];
***** - - - - - - - - - -
*** Muffler constants

mc[StatusMuffs, 20];
mc[NotReadyBit, StatusMuffs, 5];
mc[writeErrorMuff, StatusMuffs, 16];
mc[readErrorMuff, StatusMuffs, 17];

mc[StateMuffs, 0];
mc[IndexTWmuff, StateMuffs, 1];
mc[SectorTWmuff, StateMuffs, 2];
mc[SeekTWmuff, StateMuffs, 3];*seek or tag TW
mc[TagTWmuff, StateMuffs, 3];*seek or tag TW
mc[ReadTWmuff, StateMuffs, 4];
mc[WriteTWmuff, StateMuffs, 5];
mc[EnableRunMuff, StateMuffs, 10];
mc[DiskSelectMuff, StateMuffs, 16];
mc[DiskSelectMuff+1, DiskSelectMuff, 1];
mc[IOBPErrMuff, StateMuffs, 34];

mc[IndexTWBit, 20];
mc[SectorTWBit, 10];
mc[OtherTWBit, 4];
mc[ReadTWBit, 2];
mc[WriteTWBit, 1];
mc[117D, 165];
mc[30D, 36];
mc[9D, 11];

mc[RamMuffs, 40];
mc[TagMuffs, 60];
mc[FifoMuffs, 100];
mc[FWAddrMuffs, 110];
mc[FRAddrMuffs, 114];

***** - - - - - - - - - -
*** Disk Command constants
mc[clearErrors, 400];* = muffAddr.07
mc[clearOTWs, 1000];* = muffAddr.06 - clearOtherTWs
mc[clearSTW, 2000];* = muffAddr.05 - clearSectorTW
mc[clearITW, 4000];* = muffAddr.04 - clearIndexTW
mc[clearATWs, 7000];* = muffAddr.04, .05, .06
mc[clearALL, 7400];* = muffAddr.04, .05, .06, .07
mc[clearALLbutTagTW, 6400];* = muffAddr.04, .05, .06, .07
mc[forceCompError, 10000];* = muffAddr.03
mc[clearSetCompError, 20000];* = muffAddr.02

mc[NoEnableRun, 2000];* = Control.05
mc[DebugMode, 1000];* = Control.06
mc[ReadyAndIndex, 400];* = Control.07

mc[DrvSelectTAG, 100000];* = TAG.00
mc[CylSelectTAG, 40000];* = TAG.01
mc[HeadSelectTAG, 20000]; * = TAG.02
mc[ControlTag, 10000];* = TAG.03
mc[SectorCntEnable, 40];* = TAG.04

mc[ATSyncPat, 1];* disk sync pattern to write in Alto mode
mc[D1SyncPat, 201];* disk sync pattern to write in D1 mode
mc[ATSyncRead, 4000];* Alto sync pattern to be read
mc[D1SyncRead, 0];* D1 sync pattern to be read
mc[NormalRead, 104];* control RAM entry for read command
***** - - - - - - - - - - - - - - - - - - - - -
* alto sub-sector count - 1
MC[AltoCount, lshift[3,6]];
* driveSelectTAG + (Tri sub-sector count - 1)
mc[TriCount, 100000, lshift[14,6]];