Home
KFAnalyze user`s manual - Info
Contents
1. OG 398 0 6 95676 219 0 37 LIS S515 STILI Taze 0 0 0 Se 0 7 LIJS512 220 OR 37 LL Sle LLS9OT0 638310 0 0 3 95 0 0 8 133468 220 OK 37 1174 515 134863 16375 OK 3 97 0 0 9 152957 22 OK 37 117 SIS 153750 16409 OK 3 99 9 0 10 171287 222 OK 37 1185 515 172695 16429 OR 3 99 0 0 11 190245 222 OK 31 994 1515 191462 16411 BAD 3 0 3 98 249 266 12 191847 222 OK 33 1054 515 193123 16411 BAD 3 3 98 301 214 Most of the information is self explanatory The following information is provided for each sector W D block Sct Sector number Pos position in the track in us Lgt length in us CRC OK or BAD W GAP inter ID DATA block Bt number of bytes Lgt length in us M DATA block Bt number of bytes Pos position in the track in us Lgt length in us CRC OK or BAD TMV number of timing violation BRD border bits CLK average value of the clock for the sector given as the period in us DOI Data over Index contains the number of bytes for this sector which are beyond the index FZP First Fuzzy byte position If no fuzzy bits found this value 0 if fuzzy bits found it indicates the location in the buffer of the first byte that differs from one reading to the other KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 12 sur 32 KFAnalyze User s Manual Sector Buffer The layout information is followed by the dump of the DATA buffer Detail buffer content for sector 1 with 515 bytes DATA ID 1 515 bytes 095748
2. e g timing violation location synch mark detection half cell resynchronization etc This is mainly used for debugging or if you want to get many details b flag By default the content of the buffers filled by the read track read address and read sector phases are printed to the output When the b flag is used only the layout information is printed but not the content of the buffers c flag By default the printout of the buffers only include the data value for each byte decoded The c flag forces the program to print both the data value and the clock value for each byte decoded m flag By default the printout of the buffers only include the data value for each byte decoded The m flag forces the program to print both the data value and the mfm value for each byte decoded f flag By default during the reading of sectors only the content of the DATA block of the sector is displayed Using the f flag full mode allows to display the content of the important blocks of a sector ID GAP3 DATA GAP4 blocks during the read sector phase This can be useful for example if you want to look at hidden data in the GAP field of a sector Note that KFAnalyze places in the data sector buffer 3 extra bytes compared to what is placed in a buffer by the WD1772 The first extra byte in the buffer is the Data Address Mark DAM detected followed by the actual data usually 512 bytes followed by the two extra CRC byte
3. KFAnalyze program continues to read the data passed the current revolution with the data of the next revolution This is the reason why the r lt rev gt command line argument must be specified in the range 1 to n 1 revolutions as it is unpredictable to know if DOI has been used on a track and that data from the next revolution need to be used KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 30 sur 32 KFAnalyze User s Manual W Second multiple reads n 1 reads of the same sector is performed The first read is considered as the reference and the data read are placed into the reference buffer displayed at the end of the program The next n 2 read are used to read into temporary buffer the data and to compare this buffer with the reference buffer If in any of the buffers the values differ this clearly indicate that fuzzy bytes have been detected B When all the sectors including duplicate sectors and sector within sectors have been read the layout of the track and the buffers are displayed Internally the program searches the requested sector by looking for the correct ID field then it searches for a corresponding DATA field within the next 43 bytes please refer to WD1772 documentation for more information At the end of the read sector phase the layout of all the sectors and the content of the buffer for each sector are displayed By default the program uses the data of the first revolution imaged by the KryoFlux board to fill the r
4. Nisus TOSS 2 0 0 ZEIT LISO 0 9 15235 221 93 Tu SIS 3505 P 0 0 SSS LLS 0 I0 TIZEN 222 Sro es sus 162420 T 0 0 SO0ISS 1120 0 1L 190245 222 OR L 994 0112 384 BAD 0 0 4 0010 0 0 JO ESPOSA ZAZ 33 1054 215 ES OK 3 0 3s 9710 0 0 HEEN The first line specifies the total number of bytes of the track and its total time length It also indicates the number of sector found for this track Track Layout Information 6284 Bytes length 199 975 ms num sectors 12 Number of bytes and length in micro seconds of the leading GAP post index block Lead GAP 34 bytes length 1071 15 us Following is a table of values with one line for each sector detected note that since version 1 3 the sectors within sectors are detected in the track phase KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 6 sur 32 KFAnalyze User s Manual For each sector the following information are displayed W D block Sct Sector number Pos position in the track in us Lgt length in us CRC OK or BAD Note that in normal read track mode false sync detection can lead to false CRC indication displayed as if you want to have the exact values for the CRC you must use the s flag INTRA GAP inter ID DATA block Bt number of bytes Lgt length in us BS Bad Sync number of bad sync bytes in the GAP DATA block Bt number of bytes Lgt length in us CRC OK or BAD TMV number of timing violation BRD border bits CLK clock avera
5. SE SE 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2 20 20 8o 80 83 CB IL sist orse suse sel ous suse sel al zl zl oase sel sl ossa asoa avon ston avon sel asoa ason aon ston avon mon non assa el asoa avon avon asoa at 11650 11700 11750 11800 11850 11900 11950 12000 12050 12100 12150 12200 12250 12300 12350 12400 12450 12500 12550 12600 12650 KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 22 sur 32 KFAnalyze User s Manual Transition Histogram Plot The transition histogram plot displays the distribution of the flux transitions for an overall content of the track The histogram consists of tabular frequencies shown as adjacent rectangles built over discrete intervals bins with an area equal to the frequency of the observations in the interval For a normal track the distribution of the flux transitions are centered around 4 6 and 8 us with the maximum around 4 then smaller ones around 6 and even smaller ones around 8 us As the distribution decrease rapidly around the center frequency by default a logarithmic scale is used A typical output looks like If you prefer it is possible to use a linear scale by adding the parameter scale linear in the command line e g pl scale linear gif kf histo pl For example the same histogram looks like this A An unformatted track has random transitions distribution S
6. a C2 Sync and therefore the stream is synchronized on this string and all the following bytes are shifted This is known as the false sync problem error of the WD1772 This error only occurs when reading a complete track with the read track where the sync mark detector is enabled at all time but not when reading sectors where the sync mark detector is disabled while reading the ID Data fields KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 28 sur 32 KFAnalyze User s Manual FDC Command Emulation Once the bit stream has been decoded into data bytes they must be interpreted based on one of the emulated FDC commands The KFAnalyze program emulates 3 commands of the WD1772 FDC B The read track command B The read address command B The read sector commands For the layout we use the following terminology ID Segment Data Segment Data preamble Data Field Data postamble ID preamble ID postamble DAM FB or 12x00 3xA1 22x4E 12x00 3xA1 DDAM F8 CRCI CRC2 40x4E User Data 512 Bytes B One sector is composed of An ID Segment and a DATA Segment B An ID Segment is composed of an ID preamble aka GAP2 an ID field and an ID postamble GAP3a B ADATA Segment is composed of a DATA preamble GAP3b a DATA field and a DATA postamble GAP4 Read Track Command The read track command of the WD1772 is extremely simple the reading of bytes starts with an index pulse and continues until the next i
7. a fuzzy mask buffer The content of each byte of the mask is an exclusive or between the different reads of a same byte Fuzzy Mask 0026 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0126 CO 0A 100 00 0A 000 COO 00 00 00 ar 53 CS ES CS CS 0136 DO USOS ses es es eS eS EE eS ES 0146 c3 c3 ei e0 00 00 00 00 00 00 50 da ca e5 1f eO 0156 OURS EE E S3 83 eo 83 Og Sg Sg S3 e CS The following flags have impact on the read track phase M v verbose mode b turn off output of buffer content c print clock bytes information m print mfm information t output files for Ploticus f store and display ID GAP3 DATA GAP4 information in buffers print buffer in minimal mode W r lt rev gt specifies the revolution to use For more detail please refer to Command line flags KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 14 sur 32 KFAnalyze User s Manual Protection Analysis At the end of the analysis the program check the image to find all possible copy protection mechanisms used The protections are displayed like this S sec num Prot type level detail info Where sec num is the sector number For a track protection this field is absent Prot type is the type of protection All the detected protections are listed below level is the level of the protection Detail is the detail name of the protection info is optional information displayed with certain protections For example for a Short Track this field c
8. flags that can be specified during invocation of the program to control the analysis Note that if your focus is to analyze the copy protections of a game program composed of a set of FD you should create the stream files with the AtariDump bat batch file and use the KFPanzer program in complement with KFAnalyze Please refer to the KFPanzer documentation for more information Running the KFAnalyze Program The program is executed by typing KFAnalyze command line flags input file output file Where e command line flags are one or several optional arguments that control several functionalities of the KFAnalyze program The command line flags are described in the Command line flags and must be placed before the input and output files specification e input file is the name of the Stream image file that you want to analyze This parameter is required e Output file is an optional name for an output file If no output file is specified then the outputs of the analysis is sent to the standard output usually the screen KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 3 sur 32 KFAnalyze User s Manual The program processes the input Stream files and executes three main phases W The read track phase In this phase all the flux transitions of the Stream file are decoded as a WD1772 FD controller would do with a read track command At the end of the analysis both the layout of the track as well as the content of the track buffer is
9. is followed by the mfm values the values directly entered in the shift register in hexadecimal for the same 16 bytes For example ID 1 2473 5545 29816 2aaa 3492 aaaa 4003 aaaa DATA 004e 005e 006e 007e 1998 1982 1998 1998 fb 60 1e 00 14aa a954 aaaa aaaa 00 02 70 00 aaa4 952a aaaa a4aa OM OMS COD a4aa a552 aaaa aaaa OO 04 SA MEE aa92 a524 94a9 2aaa KFAnalyze 1 3 Mars 2012 515 bytes 02473 us length 16404 35 00 00 00 00 00 aaaa aaaa aaaa 20 03 00 05 00 aaa5 2aaa aa91 DD 00 07 22 3e aaaa aa95 24a4 00 00 18 66 e8 aaaa a94a 9494 us CRC 0020 58 00 00 00 02 aaaa 914a aaaa 0a 00 01 00 00 2aaa aa44 aaaa 00 00 00 03 20 a552 aaaa aaaa ei BS eZ St ett 544a 54a9 4a49 Jean Louis Gu rin 02 aaaa aaaa aaa4 aaa4 00 aaa9 2aaa aaaa aaaa 49 aaaa aaa5 24aa 9549 el 5124 4aa9 5129 52a9 01 00 00 72 TMV 0 BRD 0 BS 8 Suse MD UU UE Sono e oos p uu cro TII 1524 Page 8 sur 32 KFAnalyze User s Manual The following flags have impact on the read track phase E s disable the sync detection in ID DATA blocks v verbose mode b turn off output of buffer content c print clock bytes information m print mfm information in buffer t output files for Ploticus output simple information in buffer W r lt rev gt specifies the revolution to use For more detail please refer to Command line flags Remember that in the read
10. outputted B The read address phase In this phase the program decodes from the stream file all the ID blocks of the track At the end of the analysis the layout of the ID as well as the content of the ID buffers are outputted for all the IDs found W The read sector phase In this phase the program decodes from the stream file all the sectors found in the preceding phase as a WD1772 FDC would do with multiple read sector commands Each sector is in fact decoded as many times as the number of revolutions analyzed by the KryoFlux DTC program This is necessary to check if the sector contains fuzzy bytes At the end of the analysis the layout of the Sectors as well as the Sector buffers are outputted During these phases the program can also produce several plot data files to be processed by the Ploticus program At the end of execution the program also checks for many copy protection mechanisms For more information on the protections see my document Atari FD Copy Protection Note that internally the program implements a PLL Data separator pipelined to data shift register and a sync mark detector as described in section KFAnalyze Inner Workings of this document Therefore the program should produce results extremely close to the usage of an actual WD1772 FDC on a real Atari computer Command line flags The KFAnalyze program can be invoked with zero or several flags The flag arguments must be specified before the input file and output fil
11. script Where xxx specifies the graphic output type It is recommended to use either eps encapsulated postscript or gif pseudo GIF image Other format can be used see Ploticus documentation but have not been tested The quality of the EPS graphic output is much better than the GIF one but requires a program than can read this type of graphics An excellent program to read and manipulate the eps file is Illustrator from Adobe However the GIF output provides acceptable results and can be manipulated by many programs KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 18 sur 32 KFAnalyze User s Manual The following graphics can be produced To plot the overall track information you must type pl xxx kf track pl e g pl eps kf track pl To plot a specific sector of a track you must type pl seczn xxx kf sector pl Where seczn indicates the sector to plot For example if you want to plot the information for sector 16 you would use pl secz16 eps kf sector pl To plot the data of a specific sector of a track you must type pl seczn xxx kf data pl Where seczn indicates the sector to plot For example if you want to plot the data for sector 16 you would use pl sec 16 eps kf data pl To plot the layout of all the sectors of a track you must type pl xxx allsect pl e g pl gif allsect pl To plot an histogram of the flux transitions of a track you must type pl xxx kf histo pl e g pl gif kf histo pl Please feel free
12. KFAnalyze User s manual By Jean Louis Gu rin DrCoolZic Revision 1 3 August 2012 KFAnalyze User s Manual Table of Content KFAnalyze Users manual 1 Table of Content E 2 lE c e PERIODE 3 Analysis Process OVEIVIGW oce occee son oco ee sen etune Dom uDnmn ennen ennnen ennen nennen nenen nennen 3 Running the KFAnalyze Program ass usce nante eee onore ttp net naci tna rn rear eba SR EE NCR 3 Command line ADS 4 t Be ose iaa II LUI uM III I ILI M 4 SECHS P 4 e Ai or n 5 e LE M 5 D WM ananas tion 5 RUBER TT TT T TE 5 EE TR 5 ziii Mv PP 5 Festes WAG E 5 Contents of the output FIG dreams dinde needed 6 Read mack Phase aperiunt acs c D euren bcs eat a na al ce RN 6 Jie Eo MDC 6 TMG d siTe 7 Read Address Phase peste titusifetidusatut paid Egeter Ee 10 Address Layout 10 Address contents EE 10 Read Sectors EE 12 ee EE 12 ize MP MOT CRT TTE 13 LXI elei T 15 Wite ES e 17 Br teyvlzcleils nite arctic rca drictdine en dance sn entente eee 18 mack al EE 20 LOM ln MR Terence 21 SectirDalaPl9LbsacsonsqesiderisexixuaSasxu dU vast Or Us V Ud t tad A a a tasa E dE E MEE UM Vea EE 22 Transition Histogram d E 23 All Sectors DID es 24 KFAnalyze Inner Workings eR 25 e TRE 25 Le nl 25 PLL Data Separator amp EE 26 Synch Mark Detector amp Data Decoder AEN 28 FDC C
13. Oe 160277 ADSL ste O2 OO 02 O Lei We i Ose see JE ace Gur dde O US aeeoo ere eco OOSe 100799 055 O SG S0 OO OO i OO OL OO OL OW tS bt EE e HE none e gege OUDdc oi Snie 4USL df 8 27 cf ES 05 00 94 r8 DU O3 ff 04 DU Sb D eelere CNN CN OOSe IGIRSO AOSi see EI ex Se emt S97 CO ea sa ce 0S O GA te OO OF o5525llooEoooococo DOGS 62S 4s OS zz O O0 Sa O7 Se CD e OS eet Be Bee ere eee ete Rem eset VOTE Le ET Ee e Se E Oe E E ES 00 0S EE OOSe 163388 4065 WO im cx xir FO O4 OO tw ii QU Sic sei Sie EE Sie dE 4960000000 Boa Bo Bo KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 13 sur 32 KFAnalyze User s Manual Here we can see in GAP the presence of invalid data in gap 0xF7 In the GAP header we have a field IDG that indicates the number of Invalid Data into Gap found If the sector has weak bytes an indication is given DATA ID 11 515 bytes 0191462 us length 16411 99 CRC BAD CLK 3 98 TMV 3 BRD 0 DOI 249 BS 7 Sector has a Non Flux Area NFA 194377 199928 OO2Z6 TOTAS TOOS ET OO 00 OO OO OO OO OW OO aL al ail ES 00 OO c M nM MU 0036 191973 1998 02 bc 33 de de 4e 4e 4e 4e 4e 4e d9 23 76 c5 e6 3NNNNNNNN v 0046 192486 1998 d3 31 b2 de 4e 4e 4e 4e de 4e de ff ff ff ff ff 1 NNNNNNNN DOUBS ZEIEN Weeks sexe TVA AA Gv 00 Geir Ge Geir Geir Obat rdc Dee Geir rae IE EE a a 00 00 00 0 0 00 GLO 0 8 DOCS DENON e ARSE GENES Ge AEA es ARIE Cms aegri ARNE irae 188 EE APE PAP EE ee In that case the sector buffer is followed by
14. ber of timing violation BRD border bits CLK clock average value for the sector given as the period in us Address content The layout information is followed by the complete content of each ID block ID 1 7 bytes 801071 us length 221 25 I FE T 0 H 0 Z 2 CRC ca6f OK TMV 0 BRD 0 ID 2 7 bytes 8020010 us length 220 92 I FE T 0 H 0 Z 2 CRC 9f3c OK TMV 0 BRD 0 ID 3 7 bytes 038924 us length 221 00 I FE T 0 H 0 Z 2 CRC ac0d OK TMV 0 BRD 0 ID 4 7 bytes 57835 us length 221 50 I FE T 0 H 0 Z 2 CRC 359a OK TMV 0 BRD 0 ID 5 7 bytes 76773 us length 220 88 I FE T 0 H 0 Z 2 CRC 06ab OK TMV 0 BRD 0 ID 6 7 bytes 95676 us length 219 88 I FE T 0 H 0 Z 2 CRC 53f8 OK TMV 0 BRD 0 ID 7 7 bytes 114572 us length 220 34 I FE T 0 H 0 Z 2 CRC 60c9 OK TMV 0 BRD 0 ID 8 7 bytes 133468 us length 220 17 I FE T 0 H 0 Z 2 CRC 70f7 OK TMV 0 BRD 0 ID 9 7 bytes 152357 us length 221 04 I FE T 0 H 0 Z 2 CRC 43c6 OK TMV 0 BRD 0 ID 10 7 bytes 0171287 us length 222 17 I FE T 0 H 0 Z 2 CRC 1695 OK TMV 0 BRD 0 ID 11 7 bytes 190245 us length 222 08 I FE T 0 H 0 Z 2 CRC 25a4 OK TMV 0 BRD 0 ID 12 7 bytes 0191847 us length 222 12 I FE T 0 H 0 Z 2 CRC bc33 OK TMV 0 BRD 0 KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 10 sur 32 KFAnalyze User s Manual The content of the fields are self explanatory Each line of the dump contains W The ID value of the sector The number of bytes The posi
15. contains fuzzy bytes The number of the first bytes that differ from read to read is displayed between parentheses W IBV Intra sector Bit rate variation level 1 The same sector contains several regions with bit rate above normal and bit rate below normal e g macrodos The number of bytes that are 3 above or 396 below the normal value is printed between parentheses W IF Invalid ID field level 2 The ID field of the sector contain invalid values for the track number and or the side number and or the sector size KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 15 sur 32 KFAnalyze User s Manual W IDG Invalid data in GAP field level 2 Some GAP fields GAP1 GAP3 GAP4 contains data that cannot be written by a WD1772 FDC into GAP range 245 247 The number of invalid data is displayed between parentheses B ISN Invalid Sector Number level 1 ID fields contains a sector number that cannot be written by the WD1772 FDC value in range 245 247 B ISS Invalid Synch Sequence level 3 A normal Synch sequence is 3 synch marks A1 or C2 followed by an AM address mark Any sequence that does not follow this rule is detected and reported as an ISS Placing a synch mark in a GAP allow to place hidden data in the GAP The number of invalid synch sequence is printed between parentheses W ITN Invalid Track Number level 2 Normally the track number in the ID field of the sector must be the same as the track ana
16. d m The GAP2 ID GAP3 DATA GAP4 fields repeat until the end of the track KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 29 sur 32 KFAnalyze User s Manual The field interpretation of the track called the layout of the track performed by the KFAnalyze program is not always accurate because of some of the copy protections mechanisms used For example sector within sector are not detected data over index may cause in incorrect GAP2 detection etc The layout produce should therefore be considered as informational However the data entered into the buffer by the KFAnalyze program are exactly the same that would be read by a WD1772 Remember that due to the fact that the sync mark detector is enabled all the time the data inside an ID or DATA field can be read incorrectly bit shifted and that synchronization may be lost in GAP due to write splicing By default the program uses the data of the first revolution imaged by the KryoFlux board but it is possible to use data from another revolution by using the r lt rev gt command line argument Read Address Command The read address phase of the KFAnalyze program is slightly different than the WD1772 read address command instead of reading the next encountered ID field from a track the KFAnalyze reads all the ID fields of the track The program search for 3 sync character followed by an IDAM When found it reads into a buffer the ID field information When an ID has been completely read t
17. e O 00 OO OO OO OO SE OO O OO C 2 O2 OL o 5500006 EE 005e 2981 1982 O 02 70 O 20 05 00 OF O e O OL OO O OO OM E sooococosos lt 006e 3492 1908 O 20 Sse 00 00 00 07 22 Se 00 00 00 OS 20 19 O a Kocoe Ko000 Wo 007e 4003 LSC OO Qd 32 GI 00 O Te 66 eo el G9 e Gi cll GL 72 5280666502 05000 T 008e 4515 i999 Ol Gi 00 00 0a 27 39 OO QU OA 32 4e 75 48 ey de e Io AN 009e 5030 1908 a 26 O 29 Ol 70 i 20 05 80 ize O0 c2 4e We l3 choles 50000 O0ae 5538 A999 sir AS fe d Bie GA WS apie OY anie aes cei 0 06 Mie 10 5555005GS5oo0oococcoc For DD MFM the cell width is 4 us and the spacing between fluxes is 1 11 2 or 2 cell width i e 4 6 or 8 us A timing violation is detected if the value is less than 1 or more than 2 less than 4 us or more than 8 us Border bits are bits located on the border of the inspection window KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 7 sur 32 KFAnalyze User s Manual As you can see the dump is organized by GAP ID DAT A The content of most fields in the headers are self explanatory The following acronyms are used e TMV number of Timing Violation e BRD number of Border Bits e BS number of Bad Sync in GAP3 GAP4 fields this is a bad sync sequence as explained before in ID DATA fields this indicates sync bytes found in the field will cause incorrect results for a read track command on the sector l Index Address Mark IAM value FE or FF T t
18. e names Each argument consists of one letter preceded by a dash sign When several options are used they must be separated by space s and each of them needs to be preceded with a dash sign The flags can be specified in any order The following example KFAnalyze v t populous00 0 raw populous txt Indicates that the KFAnalyze program will reads the populous00 0 raw Stream image file and produces a populous txt output file using the v and t options t flag The t flag is used to ask the KFAnalyze program to produce plot files for the Ploticus program See Usage of Ploticus S flag The s flag is used to disable synch mark detection in ID or DATA field during the read track phase By default the synch mark detection is active all the time during the read track phase as the WD1772 would do during a read track commands This sometimes leads to false sync detection for some combination of input data resulting in incorrect bits shifting of bytes in the ID or DATA fields By using the s flag the program will behave like the WD1772 would do when reading the DATA or ID block during a read sector or read address commands i e the sync mark detector is turned off in ID and DATA blocks KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 4 sur 32 KFAnalyze User s Manual v flag By default only most relevant information is placed in the output file By using this flag verbose mode much more detailed information is produced
19. eference buffer but it is possible to use data from another revolution by using the r lt rev gt command line argument Detection of fuzzy bits is always done with data of all the revolutions but the one used as reference For example if 5 revolutions have been imaged by the KryoFlux board and r3 has been specified the program will use the data in revolution 3 as the reference buffer displayed in the output and will compare with data from revolution 1 2 4 to detect fuzzy bits KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 31 sur 32 KFAnalyze User s Manual Document Program History V1 3 Code has been partially rewritten to be shared with IPFAnalyze and IPFPanzer and to fix minor bugs The most visible changes to the user are In read track phase the sectors within sector are now detected for fuzzy bits a fuzzy mask buffer is now displayed The program now detects write splice in GAP3 and 4 Extra information is output to the trans dat file that allows displaying a histogram of the flux transitions distribution with the kf histo pl Ploticus script It is now possible to display mfm information in the buffer with the m flag Removed the p flag the m flag has been renamed to l for simple dump and m flag added to display mfm information KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 32 sur 32
20. escribed in the US patent 4 870 844 For information the WD1772 FDC as well as many other FDC build in the 80s is using this algorithm or similar ones The patent is rather complex and this section only highlight some of the important aspects of the PLL algorithm that are of interest to understand how the clock and data are extracted from the input stream of flux reversals Let s first review a typical Double Density MFM data encoding Data bits La La La lt gt lt Encoded bits Magnetic Domains Flux Reversals NM Yd NV f NV H T Aus 6us Aus 6us Bus Timings N Ai gl Inspection windows The Data and Clock bits are recorded on a floppy disk as magnetic flux reversals The polarity direction of the magnetic flux doesn t mean anything it is the timing between the flux reversals that is used to encode data The MFM is a 1 3 RLL Run Length Limited encoding Where 1 3 means a minimum of 1 and a maximum of 3 clock periods between flux reversals Thus 1 3 means that flux reversals occur no more often than every two clock periods but at least every 4th clock periods 3 periods without a reversal On Atari DD MFM floppy disks the clock period is 2us and therefore nominal flux reversals aka transition spacings arise every 4 6 or 8 microseconds In MFM encoding each cell contains a position for a clock pulse and a position for a data pulse A data pulse is prese
21. for the index and one for the actual flux transitions The index array contains information about the actual rotation speed and the location of the flux transitions relative to the index The flux array contains the timing information for all the flux reversals of all the revolutions imaged with the KryoFlux board KFEmul This library is the core of the program It is responsible of the low level decoding of the bytes as well as the high level interpretation of these bytes The following diagram shows the main blocks used in the WD1772 emulation PLL DATA DATA SHIFT CLOCK DATA SEPARATOR REGISTER o DECODER SYNC DETECTOR FDC COMMAND EMULATION Outputs Each of these blocks is detailed below KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 25 sur 32 KFAnalyze User s Manual PLL Data Separator amp DSR The flux reversals are read from the Stream files This raw data consists of composite clock and data bits encoded in MFM This encoded data has to be synchronized and decoded These functions are performed by the Data Separator The data separator has a Phase Locked Loop which attempts to lock on to the bit stream and synchronize it Having locked on to the bit stream the data synchronizer circuit must first determine the nominal position of clock and data bits and then generate an appropriate clock and data windows that is centered around the bit positions For that matter the KFAnalyze program implements the PLL algorithm d
22. ge period in us for the sector Note that in normal read track mode false sync detection can lead to false CRC indication displayed as if you want to have the exact values for the CRC you must use the s flag INTER GAP post DATA block Bt number of bytes Lgt length in us BS Bad Sync number of bad sync bytes in the GAP Note A Bad Sync BS in GAP is the one of the following Sync sequence with a change in sync char e g changing from C2 to A1 Sync sequence with more than 3 characters Sync sequence with less than 3 characters A Sync sequence is followed by a char other than an AM Track Buffer The layout information is followed by the dump of the track buffer Detail buffer content 5995 0x176b bytes dk LEAD GAP 31 bytes 80 000 ms length 1070 36 us TMV 0 BRD 0 BS 0 0000 33 MOG DA 24 DA DA DA DA 24 24 24 24 24 24 BA BA BA BA SESESSSSSSSSSSSS 0010 569 1106 DA 24 DA DA DA DA DA DA DA DA DA DA 24 24 BE SSSSSSSSSSSSSS ID 1 7 bytes 1071 us length 221 25 us I FE T 0 H 0 S 1 Z 512 CRC ca6f OK TMV 0 BRD 0 BS 0 00 2 2 LOL 1966 ie 00 00 O02 O9 em OE Eeer o INTRA GAP 37 bytes 81292 us length 1181 18 us TMV 0 BRD 0 BS 0 IDG 0 0029 1292 1998 4e de de de de de 4e 4e 4e 4e 4e 4e 4e 4e 4e 4e NNNNNNNNNNNNNNNN 0039 1802 1982 4e 4e 4e 4e 4e 4e 00 00 00 00 00 00 00 00 00 00 NNNNNN 0049 2312 1998 O O0 al mi mi 5 H89e DATA ID 1 515 bytes 02473 us length 16404 35 us CRC 0020 TMV 0 BRD 0 BS 8 004e 2473 1908 Ea 150 l
23. he program looks for another ID field until the end of the track is found Much extra information is available at the end of this phase that is not available in a real WD1772 For example the location of all the ID fields in the track In this mode sector within sector are correctly detected as a WD1772 would do By default the program uses the data of the first revolution imaged by the KryoFlux board but it is possible to use data from another revolution by using the r lt rev gt command line argument Read Sector Command The read sector phase of the KFAnalyze program is in fact composed of several underlying operations W First a read sector operation is performed that is equivalent to the WD1772 FDC with some particularities e Normally when a read sector command is received by the FDC it searches for the next encountered sector that matches the requested ID As some copy protection uses the capability to write several sectors with the same ID it is unpredictable to know which of the duplicated sector will be read unless special actions are taken With KFAnalyze it is possible to clearly indicate which of the duplicated sector is read e Another copy protection mechanism used is to place data over the index This indicates that the beginning of a sector is placed at the end of the track and that the data field extend pass the end of the track On a physical track this means that the read continue pass the index mark In this case the
24. here it is possible for example to read clock flux reversals as data flux reversal by placing an appropriate synch mark The number of bad synch mark detected is printed between parentheses W SSZ Sector Size level 2 Normal Atari FD uses 512 or 1024 bytes per sector Any other value is detected as SSZ mechanisms The value of the size found in the ID field is displayed between parentheses WR SWS Sector Within Sector level 1 A sector is placed inside another sector overlapping sectors usually in the DATA field This allows to have 12 or more pseudo sectors in a track Write Splices If timing violations are detected in the sector write splice areas around 32 bytes after the ID block and few bytes after the DATA block this may indicates that the floppy has been written on an Atari and is therefore not an original Write splice are not related to protections but they are reported during the protection analysis as S lt sector gt SPL 2 WARNING Possible write splice num where sector is the sector number where the write splice have been detected and num is the number of timing violation detected in the write splice areas Note that this is an indication only that should be further interpreted by the user KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 17 sur 32 KFAnalyze User s Manual Usage of Ploticus When the t command line option is used the program produces several files that can be used by the Plotic
25. in any fuzzy bytes m The GAP4 block is displayed in green Here are some interesting examples 188600 1000 en m Unformatted end of sector Se E SE EE EE TEE KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 21 sur 32 KFAnalyze User s Manual Long area without transition Sector Data Plot The sector data plot displays the overall content of a specified sector including ID GAP3 DATA GAP4 information This plot is very similar with the Sector Plot but it also display information about the Data Clock and encoded Data Clock bytes The bytes of the sector are displayed along flux transition PLL clock and the sector layout therefore the plot produced is an extremely long and narrow plot Thus it is always necessary to use a graphic editor to zoom in an area of interest For explanation about the Sector Layout PLL Clock and Flux Spacing please refer to Sector Plot as the information displayed is the same The bottom line of the plot display the MFM Encoded Clock amp Data information as entered in the data shift register These 16 bits word are displayed by default in grey but when a synch char is detected the display is do
26. ke it more sensible to noise On the other hand if too much frequency correction is used the loop can become unstable Once the bit stream read from the disk has been synchronized and decoded to NRZ data it is recorded directly by the Data Shift Register block Note 1 It is interesting to know that the PLL as defined in the patent permit an input frequency variation of up to 9 This corroborates the actual measurement made for the WD1772 that correctly interprets bits with a variation of 9 to 10 6 in DD MFM These values are above the variation used by many protection mechanisms like Copylock about 5 and Macrodos 5 and therefore the data read from sectors using these protections should be delivered correctly Note 2 about Border bits With the above information it is easy to understand that if a transition happens at the extreme border of an inspection window it will be detected into one or the next inspection window based on small variation for example of the drive rotation speed resulting in random values returned fuzzy bits For example having a transition at 5us after the previous one can be interpreted as a transition after Aus or a transition after 6us based on small frequency variation of the input KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 27 sur 32 KFAnalyze User s Manual Synch Mark Detector amp Data Decoder The next task is to recognize the byte boundaries accurately where the data starts This is do
27. llowed by the average rotation speed DrCoolZic KFAnalyze V1 3a Feb 28 2012 14 28 20 run Tue Feb 28 17 43 13 2012 Stream file ThemeParkMystery 1 1 00 0 raw 5 revolutions Average RPM 300 214 The normal speed for an Atari FD drive is 300 RPM Note that the program uses the actual RPM value of a specific rotation to interpolate the flux transition values decoded in the Stream file With the above example the transition values would be multiplied by a correction factor equal to 300 214 300 0 Read Track Phase Track Layout At the end of the read track phase the program display the layout of the track DK kk kk S M A A A A XX x xxx Track Layout Information 6284 Bytes length 199 975 ms num sectors 12 DK kk eee eek kk S XX A A XX x xxx Lead GAP 34 bytes length 1071 15 us qp 4 4 TD INTRA GAP DATA INTER GAP Sct Pos Lgt CRC Bt Lgt BS Bt Lgt CRC TMV BRD Clk Bt Lgt BS 4 4 4 i Tora 22100 sy Lisl ISIS 16404 7 0 0 308186 1182 0 2 2000 205 P 38 L95 O 515 16395 0 0 3 98 35 41147 0 8 Soma 220 Ox Sy lives SiS ASS ox 0 0 SoS SS Wily 0 4 57635 ZA EX 1183 Olsi 16416 0 0 398135 dia 0 5 NEUS 220 37 isi 515 16390 0 0 3698135 41109 0 6 956176 219 37 1175 O 515 16386 0 0 398135 dias 0 E 114572222000 SII 17y lSIS 1636S 0 0 0 3 08135 1114 0 8 133468 220 O of tig
28. lyzed If the numbers are different this protection is displayed The track value found in the ID field is displayed between parentheses B LGS Long DATA Sector level 1 A normal DATA sector has a length of 16480 us 515 32 us Long sector indicates a sector with a length 3 above normal The length of the sector is printed between parentheses B LGT Long Track level 1 A normal track contains 6250 bytes 200000 32us A long track is a track that contains about 396 more bytes The number of bytes of the track is displayed between parentheses B MTV MFM Timing Violation level 3 Normal MFM flux reversals bands for a double density diskette are 4 6 and 8 us If some flux transitions are above or below these bands a MTV is detected In some cases this corresponds to partially unformatted DATA field This is usually used to produce fuzzy bits detected by the FZD protection This field is therefore considered as informational The total number of violations detected is printed between parentheses B NFA No Flux reversal Area level 1 The track contains an area that do not generate any flux reversal for several milliseconds This is a very difficult to reproduce copy protection The position of the NFA on the track is displayed between parentheses B NOS Number Of Sector level 3 The normal number of sectors per track is 9 or 10 If the actual number of sectors is above 10 or below 9 the NOS protection is detected The number
29. ndex pulse All Gap Header and data bytes are assembled and transferred to the buffer This command has several characteristics no CRC checking is performed gap information is included in the data stream and the Address Mark Detector is on for the duration of the command The IDAM ID field ID CRC bytes DAM Data and Data CRC Bytes for each sector are read correctly The Gap Bytes may be read incorrectly during write splice time because of synchronization While assembling the complete track in a buffer the KFAnalyze programs also interprets the layout of the track Here is a simplified description of how the program interprets the different fields of each sector W The layout starts in a GAP1 field until m AGAP field is detected as a series of 00 or FF bytes until a sync mark is found we may be shifted by a half bit cell The GAP2 field is the first field of a sector The field continues until B An IDAM character is found after 3 sync marks This starts an address field that is read for 7 characters IDAM Track Side Sector number Sector length 2 CRC bytes B Atthe end of the Address field we are in GAP3 field This field continue until B ADAM or DDAM character is found after 3 sync marks This starts a data field A data field that usually contains 515 characters DAM 512 Bytes and 2 CRC bytes W Atthe end of the data field we are in GAP4 field This field is the last field of a sector and it continues until a GAP2 is detecte
30. ne by detecting a sync mark with a missing clock which provides a fixed reference in the bit stream to set the byte boundary This sync mark has two important properties it has no runs of zeros shorter than 1 or longer than 3 i e it follows the 1 3 RLL rules and it will never occur in any bit position in any encoded data stream The main sync mark used in MFM is called the A1 Sync since the data bits form the hexadecimal value A1 1010 0001 Data LOLO0 00 0 1 Clock ON ON ES eee eeng Encoded 100010010101001 Saee cheeks 0 1 Sync Mark 100010010001001 Missing clock bit Upon receipt of this sync mark a divide by eight counter is set that allows acquiring the following bytes correctly Note that the synch detector is enabled or disabled depending of the command executed by the FDC as well as the field of the track currently read For example during a read track command the sync mark detector is active at all time while during a read sector command it is disabled while reading an ID or DATA field The WD1772 as well as the KFAnalyze program also detects a second sync mark called the C2 Sync since the data bits form the hexadecimal value C2 11000010 Data E AE ON D m p Clock KO ee Ee Kee Encoded 101000010101100 Sync clock 0 0 0 L 0 0 1 Sync Mark 1001001000101000 Missing clock bit Unfortunately whenever a bit stream contains the string 000101001 it is detected by the Sync Mark Detector as
31. ne in yellow and a bad synch sequence is displayed in red The line above is used to display the extracted Clock information These bytes are displayed by default in grey but when the clock value is 596 above normal the display is done in red and if the clock is 596 below normal the display is done in green The line above is used to display the extracted Data information These bytes are displayed by default in grey Decoded bytes that contain flux transitions with timing violations or border bits are displayed in red If an invalid data is found inside a GAP the display is done in orange Here is an example pore e DRM T T T 11650 11700 11750 11800 11850 11900 11950 12000 12050 12100 12150 12200 12250 12300 12350 12400 12450 12500 12550 12600 12650 20222801 Ea 3 m Cu z 9 Pr 11650 11700 11750 11800 11850 11900 11950 12000 12050 12100 12150 12200 12250 12300 12350 12400 12450 12500 12550 12600 12650 I 1 L E 1 L e e _t e a a gt E 5 sis ls p so o s s s I st a J e oe e ab e E E bad se fp mee Me n e e n t e e R e d e e foe EE ae af 4 11 4 4 4 FE 4 4 H 11650 11700 11750 11800 11850 11900 11950 12000 12050 12100 12150 12200 12250 12300 12350 12400 12450 12500 12550 12600 12650 SE E SE E SE SE SE SE SE
32. nt if the data bit is a one A clock pulse is present only if the data bit is a zero and the data bit in the previous bit window was a zero As a result there is a maximum of one flux change per bit cell Clock bits are written at the beginning of the bit cell while data bits are written in the middle of the bit cell The data separator ensures that the read pulses received from the stream are converted into bits stored in a data shift register DSR For that matter the phase lock loop data separator defines inspection windows that repeat nominally every KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 26 sur 32 KFAnalyze User s Manual 2us so we sample the data and clock bits They can be varied in Danos time duration and or i 1 start amp stop time of the Inspection Windows windows A one is before phase adjust passed to the data shift Inspection Windows after phase adjust register if a read pulse is received at any time during one inspection windows otherwise a zero will be stored Inspection windows are established that have duration proportional to the frequency of arrival of the data and start stop times that can be adjusted so that subsequent data bits will be received in the middle of the inspection windows To achieve this the PLL apply frequency and phase corrections that compensate the input data frequency drift due to unsteadiness
33. of sector found is also displayed This is informational only B NSD Non Standard DAM level 2 The Address Mark placed at the beginning of the DATA field is not one of the two standard DAM The value of the detected DAM is printed between parentheses B NSI Non Standard IDAM level 2 The Address Mark placed at the beginning of the ID field is not the standard IDAM The value of the detected IDAM is printed between parentheses W SBD Sector with Bad Data level 1 The DATA field of the sector is read with a CRC error KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 16 sur 32 KFAnalyze User s Manual W SBI Sector with Bad ID level 1 The ID field of the sector is read with a CRC error B SND Sector with No Data level 1 A sector contains a normal ID segment which is not followed by a DATA segment W SHS Short Data Sector level 1 A normal DATA sector has a length of 16480 us 515 32 us Short sector indicates a sector with a length 3 below normal The length of the sector is printed between parentheses W SHT Short Track level 1 A normal track contains 6250 bytes 200000 32 A Short track is a track that contains about 3 less bytes The number of bytes of the track is displayed between parentheses W SID Synch mark in ID DATA field level 3 The presence of synch mark inside data may indicate some tricks that can be further analyzed This is especially true in presence of overlapping sectors SWS w
34. of the motor drive speed frequency drift and the migrations of the magnetic transition area phase drift Ideally individual pulses should be located in the middle of the inspection windows and therefore the start stop time of the inspection windows are adjusted to compensate for deviation in time of arrival of the most recently detected data pulse This phase correction is done proportionally to the distance of the transition with the middle of the inspection window The period of the inspection windows is gradually adjusted expanded or shortened to compensate an eventual frequency shift affecting the input data transfer This frequency correction is computed based on the history of the location relative to the inspection window of the last three flux transitions By sampling each bit the phase lock loop determines the phase error between a bit and the frequency being generated To determine the nominal bit position around which to center the window the data separator must track data bit frequency changes yet ignore jitter In this manner even if an unpredictable bit shift occurs the data separator can adjust the window s position to compensate for the change Otherwise the shifted bit could be positioned outside the window The proper ratio of phase and frequency correction provided in the loop is carefully balanced so that the PLL is fast settling but stable A large amount of phase correction cause the loop to settle faster but also ma
35. ome protection uses specific variations of the bit width on a specific sector of a track In such a case the overall distribution is difficult to interpret It is therefore possible to look at the transition distribution for a specific sector by using adding the parameter sec sec_num The following examples show a Copylock protection with bits shifted around 4 2 pl gif sec 6 kf_histo pl and a sector partially unformatted pl gif sec 10 kf histo pl It TN KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 23 sur 32 KFAnalyze User s Manual All Sectors plot The all sector plot is a long skinny plot that contains the overall content of all the sectors found on the track It is recommended to read the output with a graphic editor SO you can zoom on a specific area The graphic contain one line for each sector The following blocks are displayed for each sector W The ID blocks is displayed in yellow W The GAP3 blocks is displayed in green m The DATA block is displayed using the following colors e Blue if the block is read correctly no CRC error and no Fuzzy bits e Orange if the block contains some fuzzy bits Note that fuzzy bits imply also CRC error in most cases e Red if the block is read with CRC errors but no fuzzy bytes W The GAP4 block is displayed in green This plot is very useful to see at one glance many of the protection used in the Atari world For example in the above example we can see that the las
36. ommand Ermulatiofi i irc exa icri rx n kia cou s en o e na ka aces 29 Document Program ISTO uscite con ten ob e o b e i o n eee ue ur rode 32 A c 32 KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 2 sur 32 KFAnalyze User s Manual Presentation This document describes the KFAnalyze program that fully analyzes and dumps the content of Atari Floppy Diskettes that have been imaged with a KryoFlux system from KryoFlux Products amp Services Ltd and Software Preservation Society To create Stream images of Atari FD you need to use a KryoFlux board and the DTC application for more information refer to KryoFlux Documentation Analysis Process overview You first need to create an image of an Atari floppy diskette with the KryoFlux board before you can analyze this information with the KFAnalyze program The process is the following 1 Run the DTC program to produce Stream files one for each side of each track For more information on how to create Stream files and on how to control the DTC program please refer to the KryoFlux documentation In most cases to image an Atari FD you can use the following command dic f lt filename gt i0 i2 i4 2 Each of the Stream Files produced can then be analyzed by running the KFAnalyze program The program processes one stream image file at a time and produces an output file plus eventually several plot files to be processed by the Ploticus program There are several
37. ontains the number of bytes of the Track LGT 2 Long Track 6396 The protections are classified in three levels e Level 1 indicates that the detected mechanism is most probably used for protection e Level 2 indicates a high probability that the detected mechanism is used for protection e Level 3 is used to provide information This information may be used as a hint for hard to detect protection mechanisms The following protection mechanisms with their level are detected by the program M DBI Data Beyond Index level 1 The ID field of the last sector is placed before the index and the corresponding DATA field of this sector is placed after the index This is the extreme version of the DOI protection described below The position of the data sector is displayed between parentheses B DOI Data Over Index level 1 Indicates that the DATA field of the last sector span over the index The number of bytes placed after the index is displayed between parentheses W DSN Duplicate Sector Number level 1 Two or more sectors have the same number W FAA Flux reversal in Ambiguous Area level 3 The flux reversal are placed at the border of the inspection window This can be used to produce fuzzy bits detected as a FZD protection This field is therefore considered as informational The total number of transitions in ambiguous area is printed between parentheses HR FZD Fuzzy bytes in Data field level 1 A specific sector
38. rack number in ID H head number in ID S sector number in ID Z size decoded in ID e IDG number of Invalid Data into Gap Each line of the data clock dump contains The location in hexadecimal of the byte in the buffer The position on the track in us for the first byte of the line The value of the PLL period in ns for the first byte of the line The data value in hexadecimal for the next 16 bytes The data value in ASCII for the next 16 bytes If the c flag is used this information is followed by W The clock values in hexadecimal for the same 16 bytes B The clock value in ASCII for the same 16 bytes For example DATA ID 3 1027 bytes BSync 16 SS 37954 0243 18465 0255 S 0263 19485 4000 3968 4000 3968 F9 AS 41 EF 00 3a 40 13 36 10 ey 2f 40 20 GE 34 EE 00 34 41 00 ee 20 Da 70 e8 03 ei 08 d7 15 e0 e0 Of ey 00 e0 e8 03 0 ef 13 02 Je 0 07 24 49 13 f4 01 db 00 00 EE 09 ie il 06 20 er 29 42 32 talo 00 00 Has S 40 2i 20 5 00 eb 00 d7 00 Hee u 07 07 78 eT 08 0b 017954 us length 32677 35 us CRC e7ff BAD TMV 0 BRD 0 UT aie Os Cie a EE eS E A RANER x MV ete nee UN Se E HBGI hd cv eus 2 It can be useful to see the clock values in cases the transitions are shifted by a half clock in overlapping sector as used in the Turrican game If the m flag is used this information
39. rican game If the m flag is used this information is followed by the mfm values in hexadecimal for the same 16 bytes For example DATA ID 1 515 bytes 82473 us length 16404 35 us CRC 0020 TMV 0 BRD 0 BS 8 004e 2473 1908 see 50 LS O0 OO OF OO OO OO SE OO OH OO O2 O2 OL ss cosscce poem 5545 14aa a954 aaaa aaaa aaaa aaaa aaaa aaaa 914a aaaa aaaa aaaa aaa4 aaa4 aaa9 005e 2981 1982 00 02 70 00 20 03 00 05 00 Oa 00 Ol OO OO 00 D I D 2 x E 2aaa aaa4 952a aaaa a4aa aaa5 2aaa aa91 2aaa aa44 aaaa aaa9 2aaa aaaa aaaa aaaa 006e 3492 Toss O0 20 ze 00 00 00 07 22 se 00 00 00 0S 20 7E 00 a ere UN eee Vo aaaa a4aa a552 aaaa aaaa aaaa aa95 24a4 a552 aaaa aaaa aaaa aaa5 24aa 9549 2aaa 007e 4003 199s O 04 32 Gi 00 O 18 66 eG el 99 c2 GI ci el eneen ere ie aaaa aa92 a524 94a9 2aaa aaaa a94a 9494 544a 54a9 4a49 5124 4aa9 5129 52a9 1524 If the f flag is used not only the DATA are displayed but also the GAP and ID information in the following order ID GAP3 DATA GAP4 This can be useful to look for hidden data in GAP3 or GAP4 For example Detail buffer content for sector 9 with 1290 bytes ID 9 7 bytes 0158854 length 224 98 T 50 H 0 S 9 Z 512 OK TMV 0 BRD 0 BSync 0 0000 158854 4063 fe 32 00 09 02 82 47 e GAP 37 bytes 80159079 us length 1198 17 us TMV 0 BRD 0 BSync 0 0007 159079 4063 ORE IO ANSE 00 00 00 00 00 ER 063 00 00 ek al al E XM DATA ID 9 515 bytes 160277 us length 16592 10 CRC OK CLK 4 03 TMV 0 BRD 0 DOI 0
40. s flag The I flag is used to output the buffers in simple mode In this mode the location is displayed in decimal and neither the clock value nor the byte location is displayed This output is similar to the Panzer output and therefore can be used to compare files read on a real Atari r lt rev gt flag By default the KFAnalyze program decodes the flux reversal from the first revolution during the read track read address and read sector phases The r flag allows to specify the revolution to decode This number must be in the range 1 to the number of revolution imaged minus 1 i e 1 n 1 When this number is specified e g r2 all the outputs layout buffers plots protections are decoded from the specified revolution Note that it is not possible to analyze the last revolution The reasons are explained in KFAnalyze Inner Workings KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 5 sur 32 KFAnalyze User s Manual Contents of the output File This section describes the contents of the output file produced by the KFAnalyze program One of the purposes of the program is to display in ASCII the content of a Stream binary file as well as the layout of a track id or sectors The content of the output file is detailed for each of the three phases of the program The program first display a welcome message followed by the name of the input stream file followed by the number of revolutions used to image the FD fo
41. s displayed in red Large transition values are set a max value of 12000ns in order to display them correctly in the plot The X axis ranges from 0 to 200000 ms The following diagram show a zoom on the end of a plot X 124000 17 I t 179000 176000 177000 170000 179000 100000 101000 182000 102000 104000 105000 106000 117000 100000 109000 190000 191000 192000 190000 194000 195000 196000 197000 190000 1 l RULL 8 MEN T f 7200 Here we can see sector within sector over a non flux area KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 20 sur 32 KFAnalyze User s Manual Sector Plot The sector plot displays the overall content of a specified sector including ID GAP3 DATA GAPA information As only one sector is displayed this plot contains more details than the overall track plot The information displayed is similar to the track information but all transitions are displayed instead of one every five W The ID blocks are displayed in yellow W the GAP3 blocks are displayed in green B the DATA blocks are displayed using the following colors e Blue if the block is read correctly no CRC error and no Fuzzy bits e Orange if the block contains some fuzzy bytes e Red if the block is read with CRC errors but does not conta
42. t sector passes the index data over index and that therefore some room for this sector is available at the beginning of the track The two sectors in orange indicate sectors with fuzzy bits We can also see that we have 3 overlapping sectors sector within sectors KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 24 sur 32 KFAnalyze User s Manual KFAnalyze Inner Workings This section provides details information about the inner workings of the KFAnalyze program This can be useful to persons that want to better understand how the program emulates some functions of the WD1772 FDC and how the different outputs are created The KFAnalyze program uses to libraries m The KFStream Library to read and decode the input stream file and W The KFEmul Library to emulate several functions of the WD1772 FDC This library also provides facilities to write plot data for Ploticus and to detect floppy disk protections The KFAnalyze program is a member of the KFProject suite of tools that have developed around the KryoFlux board This tool uses a disk image produced by a KryoFlux board SPS Disk Imager and produce information that enables to Analyze the structure and content of a FD Outputs files for plotting the layout and content of a FD Analyze the Copy Protections of a FD Verify that the disk is authentic and is error free KFStream This library is responsible to read the Stream files It fills mainly two array of information one
43. tion in us of the first byte of the sector header The length of the header The value of the IAM Index address mark The track number The head number The encoded size value The CRC value An indicator if the CRC is valid or not The number of timing violations W The number of border bits The following flags have impact on the read address phase E v verbose mode W r lt rev gt specifies the revolution to use For more detail please refer to Command line flags KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 11 sur 32 KFAnalyze User s Manual Read Sectors Phase In this phase the program decodes the flux transition to find the corresponding DATA sectors for each of the ID found in the read addresses phase Furthermore each sector is read several times number of revolutions 1 to potentially detect the presence of fuzzy aka weak bits Sector Layout At the end of the sectors phase the program display the layout for all sectors Note that in this mode sectors within sector are detected and displayed correctly All Sectors Layout Information ID GAP DATA Sct Pos Lgt CRC Bt Lgt Bt Pos Lgt CRC TMV BRD Clk DOI FZP HMMM i IOV 221 OK 97 i285 515 2 16420 OK 4 99 0 0 2 20010 220 cx 97 1179 515 23430 16395 OK 3 99 0 0 3 38924 220 0 oo LLYS sls 40323 56394 08 0 os O 0 4 578355 220 0 Si 108s 515 59240 TELLS 0 0 0 Sg 0 5 76773 220 OK 37 1181 SIS 75175 16300 OX
44. to experiment with Ploticus or other plot program and let me know if you write interesting scripts KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 19 sur 32 KFAnalyze User s Manual Track Plot The track plot is a long skinny plot that contains the overall content of the track It is recommended to read the output with a graphic editor so you can zoom on a specific area If we zoom we can see there are three lines W The first line display the block of the track The GAP blocks are displayed using different shades of green the ID block is displayed in yellow and the DATA block is displayed in Blue W The second line displays the value of the PLL cell clock expressed as a period in ns The scale ranges from 1800 ns to 2200 ns This is useful to look at clock variation in long short sector or track like in Rob Northern copy protection as well as intra sector variation like in macrodos protection W The third line displays a scattered plot of the flux spacing remember that for a track we only display one flux every five The y value scale is from 0 to 12000 ns Normally the dots should be centered around the 4000 6000 and 8000 ns lines however they can appear anywhere The normal transitions are displayed in blue but if a transition is close to the border of the inspection window it is displayed in green and if the transition violates the MFM timing rules less than Zus or more than 8us for Atari MFM the transition i
45. track command phase the following happen W The data may not be read correctly inside ID or DATA block This is due to the fact that the sync mark detector is active at all time and therefore incorrect bit shift may happen as a WD1772 would do W Awell know example is that all the sector numbers are decoded incorrectly for track 41 track 41 always causes a false sync detection W The above implies that the CRC may be reported incorrectly in this phase However the read track phase is the only way to look at data outside of the ID DATA blocks KFAnalyze 1 3 Mars 2012 Jean Louis Gu rin Page 9 sur 32 KFAnalyze User s Manual Read Address Phase Address Layout At the end of the address phase the program display the layout for all the IDs KKK ID Layout Information number ID 12 KKK TD Sct Pos Let CRC TMV BRD CLK 1 1071 22 EN 0 0 305 2 20010 220 0 OR 0 3 94 9 38924 220 OK 0 0 3795 4 51835 221 OK 0 0 EMG 5 VENIS 220 Qu 9 0 3 94 6 95676 AL io 0 0 308 7 LIAS 220 OK 0 3o93 8 133468 220 OK 0 0 33593 9 152851 221 Ox 0 3695 dl AAS 2229 0 0 EON 150080 90245 22 OK 0 0 So ST ig L t 222 is 0 0 EON Most of the information is self explanatory The first line display the number of IDs found in the track ID Layout Information 4 ID 12 For each ID found on the track the following information is provided e Sct Sector number e Pos position in the track in us Lgt length in us CRC OK or BAD TMV num
46. us length 16402 38 CRC OK CLK 3 98 TMV 0 BRD 0 DOI 0 OOOO 9543489 3909 wo 10 05 zc 06 12 17 11 OG me cz 10 17 16 12 O08 cooeosoecococococco COLO 96257 3968 07 Oa 11 14 10 10 10 Of 0E Of O09 OS el 10 0 5 DG enee EELER 0020 86768 3968 OG 06 Mo 13 17 14 10 06 05 Oo 11 12 10 08 OF OWA een COSO 7278 A000 10 12 10 O8 O3 05 Of Ox ES 1 10 O4 UE 02 09 J34 soccaecacacacacce COLO STs AOOO 37 LA 16 OA Ole 10 13 10 06 000 02 OS DO s US Of aaa o o ee COSO 8208 0 Oo I0 16 10 12 34 13 10 30 OS O Oe Ol WA S OA csoscososocsossses Dem Sell ADCO 06 OF 97 OF OA 10 10 Ole QUO Oe 11 17 Uy AO A SEX 5555000205955 0070 99522 3968 O4 11 20 20 10 02 ze rr Oe 11 10 05 02 Qo 17 20 os sooo0o02c2c QoS 99932 3969 12 06 04 OF De 12 10 O7 OG 10 10 Oo 0a 06 OS OF i5io5ooocococcoccsc The dump is organized by GAP ID DATA The content of most fields in the headers are self explanatory see also Track Buffer Each line of the dump contains W The location in the buffer hexadecimal W The position of the first byte of the line on the track mus W The value of the PLL clock for the first byte of the line W The data value in hexadecimal for the next 16 bytes W The data value in ASCII for the next 16 bytes If the c flag is used this information is followed by W Theclock value in hexadecimal for the next 16 bytes W Theclock value in ASCII for the next 16 bytes This can be useful to see clock when transitions are shifted by a half clock as in the Tur
47. us program The Ploticus program is a free GPL non interactive software package for producing plots charts and graphics from data You can find information about the program at http ploticus sourceforge net doc welcome html and the executable at http sourceforge net projects ploticus files ploticus 2 41 The ASCII files produced by KFAnalyze are the following B layout dat This file provides data for displaying the overall layout of the track analyzed H trans dat This file contains the transitions and clock information for a complete track W For each sector e Sec data x dat This file contains the data clock and encoded information for a sector with the following blocks ID GAP3 DATA GAP4 The x value corresponds to the sector number For example for sector 1 sec data 1 dat e sec layout dat This file provides data for displaying the overall layout ID GAP3 DATA GAP4 of the sector analyzed The x value corresponds to the sector number For example for sector 1 sec layout 1 dat B allsect dat This file contains the layout for all the sectors found on the track This is especially interesting to see sector that have data over index as well as overlapping sectors sector within sector To plot the output from KFAnalyze you must first install the Ploticus program and run the program with the provided scripts files e kf track pl e kf sector pl e kf histo pl e kf data pl and e allsect pl The usage is the following pl xxx
Download Pdf Manuals
Related Search
Related Contents
Mode d`emploi du chargeur/lampe torche Eagle Operator`s Manual - Genie Industries Peavey 271284 Electronic Keyboard User Manual MANUAL DEL USUARIO KitchenAid KAWE800T User's Manual 王子製紙株式会社様 (PDF:1181KB) Tensiomètre automatique au poignet Nouvelles d`ici et d`ailleurs : mode d`emploi inclus / Robert Copyright © All rights reserved.
Failed to retrieve file