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 / MBUG / MBUG004.ARC / DISKFMAT.DOC < prev    next >
Text File  |  1979-12-31  |  8KB  |  132 lines

  1. .PL 66
  2. .MT 6
  3. .MB 5
  4. .PO 3
  5.      FINDIN╟ FOREIG╬ CP/M SYSTE═ DISK FORMAT DATA          Mark Bishop
  6.      --------------------------------------------
  7.  
  8.      Iεá thσ Decembe≥ 'Catcherº thσ firs⌠ par⌠ oµ SETDISK.DO├ wa≤á printed«  ì
  9. Thi≤ articlσ i≤ ß preci≤ oµ thσ rest.
  10.  
  11.      Thi≤ datß i≤ seldoφ iε thσ releven⌠ compute≥ manual«á  Iµ possiblσ asδ ì
  12. thσá equipmen⌠á vendo≥ fo≥ thσ details¼á howeve≥ i⌠ i≤ unlikel∙ hσ wil∞á bσ ì
  13. ablσ t∩ help«á  Nex⌠ asδ ß 'hackerº wh∩ own≤ thσ typσ oµ equipment¼ viß thσ ì
  14. appropriatσá use≥á group«á  Iµá thi≤ fail≤ yo⌡ wil∞ havσá t∩á d∩á you≥á owε ì
  15. sleuthing«á GooΣá luck«á Beforσá startinτá yo⌡ mus⌠ bσá certaiεá tha⌠á you≥ ì
  16. hardwarσá i≤ thσ samσ a≤ thσ foreigε systeφ eg«á i⌠ doe≤ no⌠ havσ 8░á tracδ ì
  17. drive≤ anΣ your≤ arσ 4░ track« 
  18.  
  19.      Thσ Disδ Paramete≥ Blocδ (DPB⌐ datß caε bσ founΣ quitσ easil∙ b∙ mean≤ ì
  20. oµá ß shor⌠ machine-codσ program¼á entereΣ int∩ thσ foreigεá CP/═á compute≥ ì
  21. witΦá DDT¼á whicΦá ever∙á CP/═ systeφ i≤ supplieΣ with«á   Thσá  Origiεá oµ ì
  22. prograφ i≤ 4000H.
  23.  
  24. áááá4000: 0E 00 11 18 00 2A 01 00 19 11 0E 40 D5 E9 11 20
  25. áááá4010: 40 01 10 00 ED B0 C3 00 00 00 00 00 00 00 00 00
  26. áááá4020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
  27.  
  28.      Afte≥á entry¼á G400░ t∩ ruε thσ program«á  Compute≥ wil∞ warφ boo⌠á oε ì
  29. prograφ exit«á    Ruε DD╘ agaiε anΣ displa∙ 402░ - 402F╚ whicΦ i≤ ß cop∙ oµ ì
  30. thσ Disδ Paramete≥ Header¼á witΦ 4020/1╚ beinτ thσ BIO╙ ske≈ tablσá addres≤ ì
  31. anΣ 402A/B╚ beinτ thσ BIO╙ DP┬ addres≤ iε thσ usua∞ LSB/MS┬ format«  Iµ thσ ì
  32. ske≈ tablσ addres≤ a⌠ 4020/1╚ i≤ 0░ 00¼á theε eithe≥ therσ i≤ n∩ skewinτ oµ ì
  33. logica∞á sector≤ oε thσ disδ o≥ skewinτ i≤ handleΣ internall∙ b∙ thσá BIOS¼ ì
  34. eτ. Microbee«    Thesσ arσ thσ result≤ fo≥ BIO╙ V.▒ oε thσ Microbee.
  35.  
  36. áááá4020: 00 00 36 00 00 00 00 00 A2 DA BD D6 35 DD B5 DD
  37. áááá      \___/                         \___/
  38. ááááskew handled by BIOS.       DPB address in BIOS D6BDH.
  39.  
  40.      Usσ DD╘ t∩ displa∙ thσ DP┬ (1╡ byte≤ iε length⌐ a⌠ thσ abovσá address«   ì
  41. Parameter≤á arσ  SPT(▓ bytes)¼á BSH(1)¼á BLM(1)¼á EXM(1)¼á DSM(2)¼á DRM(2)¼ ì
  42. AL0(1)¼á AL1(1)¼á CKS(2)¼á OFF(2)«á   EacΦá paramete≥ mus⌠ bσ converteΣá t∩ ì
  43. decimal¼á fo≥á entr∙ int∩ thσ seconΣ datß linσ oµ SETDISK.WS╘ afte≥á UDFLA╟ ì
  44. anΣ SECMS╦ dumm∙ data«  Thσ firs⌠ datß linσ i≤ thσ foreigε systeφ name« 
  45.  
  46.      NOTE║-   SETDISK.DO├á contain≤á ßá detaileΣ descriptioεá oµá thσá DPB¼ ì
  47. Microbeσ specifiπ datß (UDFLA╟ ª SECMSK)¼  SETDISK.WS╘ datß format¼ anΣ ho≈ ì
  48. t∩ ente≥ ne≈ SETDISK.WS╘ data«   Howeve≥ t∩ follo≈ thi≤ articlσ :-
  49.      UDFLA╟á 3=8░á tracδ cylinde≥ format¼á 2=8░╘á non-cyl.o≥ásingle-sided¼
  50.              1=40T cylinder,  0╜40T non.cyl.or single-sided.
  51.      SECMSK  3=512 byte logical sector size,  1=256,  0=128.
  52.  
  53.      Oε thσ  thirΣ linσ  ente≥ thσ  ske≈ tablσ  iµ known¼   o≥ dumm∙ value≤ ì
  54. 1,2,3,4,5,6,...«á etc«á iµá no⌠ known«á  Tota∞ numbe≥ oµ datß item≤ MUS╘ bσ ì
  55. equa∞ t∩ SPT/(SECMSK+1⌐ o≥ you'l∞ ge⌠ ß 'baΣ dataºá message«á eg«á Microbeσ ì
  56. SPT=4░á decimal¼á SECMSK=│ (51▓ bytσ logica∞ secto≥ size)¼á numbe≥ oµá datß ì
  57. item≤ ╜ 40/(3+1⌐ ╜ 10«  
  58.  
  59.      Oncσá thσ abovσ figure≤ arσ iε thσ file¼á yo⌡ caε usσ SETDIS╦ t∩ 'setº ìèthσ foreigε systeφ t∩ you≥ 'Bº disδ drivσ anΣ reaΣ thσ datß usinτ thσá BOO╘ ì
  60. Monitor.
  61. áááá
  62.      Freshl∙á forma⌠á ßá disδá oε thσ foreigε system¼á anΣá savσá abou⌠á 4╕ ì
  63. read/writσ file≤ oε it«á I⌠ i≤ easies⌠ t∩ usσ ß basiπ program« ie« FO╥ A0=▒ ì
  64. T╧ 48║á A1$="-"+STR(A0)║ SAV┼ A1$║ NEX╘ A0« O≥ elsσ froφ thσ B╛ promp⌠ savσ ì
  65. ▒ -1¼ savσ ▒ -▓ ....« savσ ▒ -48«   Theε oε thσ foreigε systeφ d∩ ß DI╥ *.¬ ì
  66. ^╨ t∩ thσ printer.
  67.  
  68.      Wha⌠á wσá wan⌠ t∩ d∩ i≤ reaΣ thσ director∙ oµ thσá foreigεá disδá int∩ ì
  69. memory¼á s∩á wσ caε usσ thσ Monito≥ anΣ figurσ ou⌠ thσ logica∞ secto≥á sizσ ì
  70. anΣ skew«á  Director∙ entrie≤ oε thσ disδ arσ iε thσ samσ sequencσ tha⌠ DI╥ ì
  71. output≤á them¼á anΣá arσ 3▓ byte≤ iε length«á  ie«á ┤ entrie≤ fo≥ 12╕á bytσ ì
  72. secto≥á size¼á ╕ fo≥ 256¼á 1╢ fo≥ 512«á Thσ director∙ alway≤ start≤ oεá thσ ì
  73. firs⌠á tracδá afte≥ thσ reserveΣ systeφ tracks«á  Thσá numbe≥á oµá reserveΣ ì
  74. systeφ track≤ i≤ founΣ iε thσ DP┬ 'OFFº value«  Tracδ number≤ star⌠ froφ 0¼ ì
  75. secto≥ number≤ star⌠ froφ 1«  
  76.  
  77.      Froφá thσ disk-controller'≤ poin⌠ oµ vie≈ tracδ number≤ increasσá froφ ì
  78. thσá edgσá t∩ thσ centrσ oε botΦ side≤ ░ anΣ 1«á Howeve≥ thσ Microbeσá BIO╙ ì
  79. number≤ thσ track≤ froφ ░ a⌠ thσ edgσ oµ sidσ ░ t∩ 3╣ a⌠ thσá centre¼á theε ì
  80. 4░á a⌠á thσ CENTR┼ oµ sidσ ▒ outwarΣ t∩ 7╣ a⌠ thσ edgσ oµ sidσ 1«á Fo≥á thσ ì
  81. Microbeσá 'OFFº ╜ 2¼á s∩ thσ director∙ start≤ a⌠ logica∞ tracδá 2«á Iµá thσ ì
  82. UDFLA╟ iε thσ BIO╙ i≤ ░ o≥ 2¼á track≤ arσ read/writteε t∩ iε orde≥ 0-79¼ s∩ ì
  83. wσ woulΣ looδ fo≥ thσ star⌠ oµ thσ director∙ oε tracδ 2«  Iµ UDFLA╟ i≤ ▒ o≥ ì
  84. 3¼ theε track≤ arσ read/writteε t∩ iε thσ orde≥ 0,79,1,78,2,77,│ etc« s∩ wσ ì
  85. woulΣá looδá oε tracδ 1«á  UDFLA╟ fo≥ thσ Microbeσ 390╦ ╡ 1/4ó disδá i≤á 1¼ ì
  86. C.I.A.B« 390╦ │ 1/2ó disδ i≤ 0« 
  87.  
  88.      Thσá Monito≥ synta° i≤ Y╥ tts≤ dddΣ llll«á Thi≤ read≤ lll∞ byte≤á froφ ì
  89. thσá ┬á drivσ int∩ memor∙ addres≤ dddΣ startinτ a⌠ tracδ t⌠ secto≥á ss«á X╥ ì
  90. doe≤á thσá samσ fo≥ drivσ A«á  Ente≥ Y╥ 010▒ 100░ 3000«á  Thi≤ i≤á fo≥á thσ ì
  91. Microbeσ   390╦ ╡ 1/4"¼á changσ t⌠ a≤ applicable«  ┼ 1000¼ notσ thσ addres≤ ì
  92. oµ thσ firs⌠ director∙ entr∙ (samσ filenamσ a≤ firs⌠ entr∙ oε DI╥á listing⌐ ì
  93. anΣá ^┌ dowε thσ director∙ unti∞ yo⌡ seσ thσ star⌠ oµ E╡ formattinτá bytes«  ì
  94. Thi≤á addres≤ - firs⌠ DI╥ entr∙ addres≤ ╜ logica∞ secto≥ size«á  ^╫ bacδ t∩ ì
  95. thσ las⌠ director∙ entr∙ anΣ notσ filσ name«á  Looδ a⌠ DI╥ listinτ fo≥á thσ ì
  96. NEX╘á filσá iε sequence«á  Usσ ╙ commanΣ o≥ ^┌ dowε thσ filσ t∩á finΣá thi≤ ì
  97. director∙á entry«á  Usinτá thσá logica∞ secto≥ size¼á plu≤ lookinτá a⌠á thσ ì
  98. director∙ entrie≤ anΣ DI╥ listinτ yo⌡ caε figurσ ou⌠ thσ skew«  
  99.  
  100. eg. Microbee 390K 5 1/4" disk
  101.  
  102. 1000 - 11FFH   E5 formatting bytes            512 bytes  sector  1
  103. 1200 - 13FFH   dir entries for files  1-16    512 bytes  sector  2
  104. 1400 - 17FFH   E5 formatting bytes           1024 bytes  sectors 3 & 4
  105. 1800 - 19FFH   dir entries for files 17-32    512 bytes  sector  5
  106. 1A00 - 1DFFH   E5 formatting bytes           1024 bytes  sectors 6 & 7
  107. 1E00 - 1FF0H   dir entries for files 33-48    512 bytes  sector  8
  108.  
  109.      Lookinτá a⌠ thσ datß wσ seσ tha⌠ thσ firs⌠ DI╥ entr∙ i≤ a⌠á 1200╚á anΣ ì
  110. thσ E5'≤ theε star⌠ a⌠ 1400H¼á s∩ thσ logica∞ secto≥ sizσ i≤ 1400-1200=200╚ ì
  111. o≥ 51▓ bytes«á  Thσ 200H/512─ byte≤ oµ secto≥ ▒ froφ 1000╚ arσ E5's¼ s∩ thσ ì
  112. firs⌠ DI╥ secto≥ numbe≥ i≤ 2«á Nex⌠ i≤ 400H/1024─ o≥ ▓ sector≤ oµ E5's¼á s∩ ì
  113. thσ nex⌠ DI╥ secto≥ numbe≥ i≤ 5¼á theε 8«á Froφ thσ datß wσ seσ thσ ske≈ i≤ ìè2,5,8«á Froφ thσ Microbeσ DP┬ data¼ wσ seσ tha⌠ SP╘ (thσ numbe≥ oµ 12╕ bytσ ì
  114. sector≤á pe≥ track⌐ i≤ 4░ decimal«á A≤ thσ 'Beσ use≤ 51▓ bytσ sector≤ therσ ì
  115. arσá 1░ sectors¼á s∩ wσ mus⌠ havσ 1░ ske≈ datß items«á  A≤ thσ ske≈á i≤á aε ì
  116. arithmetiπá progressioεá wσá g∩á 2,5,8,(11-10=1),(14-10=4)¼á (17-10=7),(20-ì
  117. 10=10),(23-20=3),(26-20=6),(29-20=9)«á  Thereforσá thσ ske≈ datß wσ pu⌠á iε ì
  118. SETDISK.WS╘ i≤ 2,5,8,1,4,7,10,3,6,9.
  119.  
  120.      AmenΣá thσ SECMS╦ anΣ ske≈ tablσ iε SETDISK.WST«á  Iµ yo⌡ havσ figureΣ ì
  121. thesσ correctly¼á therσ i≤ onl∙ onσ othe≥ variablσ ie«á UDFLAG«á  Thi≤á caε ì
  122. onl∙á havσ ß valuσ oµ ░ o≥ ▒ fo≥ 4░ tracδ disδ drives¼á ▓ o≥ │ fo≥ 8░ tracδ ì
  123. drives«á  Tr∙ eacΦ value¼ usσ SETDIS╦ anΣ d∩ ß DIR«  Yo⌡ wil∞ havσ woε wheε ì
  124. you≥á DI╥á displa∙á EXACTL┘ matche≤ thσ DI╥ listinτá donσá oεá thσá foreigε ì
  125. computer«á Bu∙ yourselµ ß drink¼á yo⌡ deservσ one«á Iµ somσ DI╥ entrie≤ arσ ì
  126. missinτ theε eithe≥ thσ ske≈ o≥ UDFLA╟ arσ incorrect«á    Iµ neithe≥ UDFLA╟ ì
  127. valuσ works¼ rechecδ previou≤ steps«  
  128.  
  129. PATCHIN╟ SETDISK.CO═ V1.░ BIO╙ VERSIO╬ TABLE - see SETDISK.DOC
  130.  
  131. END
  132.