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