*************************************************************************** * * * Documentation for Funnelweb Farm FAIRWARE Program * * ------------- --- --------- ---- -------- ------- * * * * Program name : D i s k H a c k e r ................. Part one * * * * Disk Controller : TI Controller only. * * * * Version number : Vn 1.0 * * * * Author : Will McGovern * * * * Address : 215 Grinsell St., * * Kotara, NSW 2289 * * AUSTRALIA * * * * * * IF YOU FIND THIS PROGRAM USEFUL PLEASE SEND A CONTRIBUTION TO THE * * * * ABOVE ADDRESS. PERSONAL CHEQUES FROM OUTSIDE AUSTRALIA PRESENT * * * * PROBLEMS. CASH IS USUALLY SAFE IN FIRST CLASS AIR MAIL. * * * * * * Note : If there is a large enough demand I will rewrite these * * programs to run with the MYARC and CORCOMP disk controllers. * * : Do not rename the Disk Hacker files or the program won't load * * * *************************************************************************** NOTE : o This program is released as FAIRWARE, so, if use is made of it a contribution to the author would be greatly appreciated. o This program is not capeable of destroying data contained on floppy disks unless it is used incorrectly. o No responsibility can be taken by the author for the loss of data due to misuse of this program. BRIEF PROGRAM DESCRIPTION ----- ------- ----------- Disk Hacker part one is the only program of its type available to the TI community. Disk Hacker is an extremely powerful disk utility which allows the user to examine the actual format of each track of a disk. Have you ever wanted to get an inside look at the latest protection schemes ? Well, Disk Hacker part one allows you to do this, and much more. EQUIPMENT REQUIRED TO RUN DISK HACKER FILES REQUIRED --------- -------- -- --- ---- ------ ----- -------- 32K EXPANSION EDITOR/ASSEMBLER DISKHACKER or TI DISK CONTROLLER EXTENDED BASIC DISKHACKXB or AT LEAST ONE DISK DRIVE MINI MEMORY HACKRDOC/1 and 2 LOADING DISK HACKER ------- ---- ------ Loading from EDITOR/ASSEMBLER :- o Select Editor/Assembler from main selection screen. o Select LOAD AND RUN from E/A selection screen. o Type DSKn.DISKHACKER. ( n = drive number to load from. ) o Disk Hacker will autostart. Loading from MINIMEMORY :- o Select MINI MEMORY from main selection screen. o Select LOAD AND RUN from Minimemory selection screen. o Type DSKn.DISKHACKER. ( n = drive number to load from. ) o Disk Hacker will autostart. Loading from EXTENDED BASIC :- o Select Extended Basic from main selection screen. o Type in : RUN "DSKn.DISKHACKXB" o Disk Hacker will autostart. OPERATING DISK HACKER --------- ---- ------ When the Disk Hacker title screen appears, it will stay displayed for a few seconds and then the main operating screen will come up. There are a few areas of this screen which you must become familiar with before you start to use the program. These areas are as follows :- o The operation window is the second window from the top of the screen which contains the Disk Analayser Vn 1.0 message. The function of this window is to tell you what the program is doing at any particular time. If the 'Disk Analyser Vn 1.0' is being displayed, then the program is waiting for your input. Whenever the program halts all you have to do read the display in this window to find out what is going on. Errors are also displayed in this window. Therefore, if disk activity stops for no reason, read the display in the window to find what has gone wrong. o The large space in the middle of the screen, between the two small windows, is where the program displays its prompts for the information you have to supply for disk analysis, such as number of sides and drive number to use. o The final area to be explained is the very bottom line of the screen just below the lowest window. This line explains which function keys are active at any particular time. The only time that the function keys are not displayed is when you are in analysis mode. This will all be expained further on. Answering the Prompts --------- --- ------- Now that you understand the basic functions of the important areas of the initial screen we can proceed to the next stage, answering the prompts that the program gives you. You probably noticed that when the title screen vanished and the initial screen appeared that the question 'Drive number [1-3] :' appeared in the prompt area. This is the first of the five prompts you will have to answer before you can begin the analysis. The information asked of you may seem complicated when you first start but you'll eventually be able to understand and answer the prompts quite easily. The next section will be devoted to explaining each of the prompts and showing you how to answer them. o Drive number [1-3] This is the simplest of the questions you have to answer. All that you have to do is enter the number of the drive you wish to use. This value must be between 1 and 3 because 3 is the maximum number of drives that the TI controller can handle. EXAMPLE : Drive number [1-3] : 1 selects drive one as the drive you wish to work on. o [S]ingle or [D]ouble sided This prompt simply asks you whether the drive you have selected is a single or double sided drive. ( ie. Whether the drive has a second head to read the second side of the disk. NOTE : If you have to flip the disk over ( FLIPPY ) to use the second side of the disk then the drive is still only single sided ) You answer this prompt with 'S' for single sided or a 'D' for double sided. If you choose single sided then the program will not be able to analyse the tracks on the second side of the disk. If double sided is selected then it makes reading the second side of the disk possible. EXAMPLE : [S]ingle or [D]ouble sided : S selects single sided operation. [S]ingle or [D]ouble sided : D selects double sided operation. o To fully understand the next two prompts you must first understand how the tracks on a floppy disk are arranged. Here is a brief explanation of this structure. On a normal TI/99/4(a) compatible disk you have 40 tracks on each side of the disk. On each side the tracks are numbered from 0 -> 39 inclusive, with track 0 being furthest from the hub ring in the centre and track 39 being closest to the centre. The diagram shows how the tracks are arranged on a normal double sided disk. For single sided drives the format is exactly the same except that the drive is not capeable of reading or writing from or to the second side. Diagram 1. Normal floppy disk format. sector # 359 <-------------------------- 0 track # CENTRE} ---39 <-------------------------- 0 <--SIDE 1 HUB }}---------------------------------------- <--DISK SURFACE RING } ---39 <-------------------------- 0 <--SIDE 2 track # 360 --------------------------> 719 sector # o Starting track The process of entering track numbers in Disk Hacker is very simple. For single sided operation you enter exactly what you would expect, a number between 0 and 39. Numbers outside these limits will be rejected. For double sided operation however, to make it easy to enter track numbers for the second side, a new system is used. The tracks on the second side, instead of being numbered 0 to 39 and clashing with the side 1 track numbers, they have been renumbered as tracks 40 to 79. Therefore, the track numbers on side 1 are from 0 to 39 and the track numbers on side 2 are from 40 to 79. ( ie. Track 40 is really track 0 on side 2 ). So, the limits for the entry in double sided mode are 0 to 79. EXAMPLE : Starting track : 10 selects the starting track as track 10 on side ONE. Starting track : 50 selects the starting track as track 10 on side TWO. o Stopping track Exactly the same system applies for entering the stopping track number as for the starting track number. (ie) Single sided 0 -> 39, Double sided 0 -> 79. o The next prompt is is a very advanced, but complicated, feature of Disk Hacker. Before you just answer 'Y' or 'N' I will try to explain in easy terms the meanings of the two aspects of sectors involved in this prompt, CRC's and Data Marks. A standard, non-protected track on a TI/99/4(a) floppy disk contains 9 sectors each of 256 bytes length. On the track there is space between each sector which contains a special series of information bytes called an address or HEADER. Addresses will fully explained further on in this documentation. Somehow, the disk controller must be able to locate where the end of this gap is, which is where the sector starts. To find the start of the sector the disk controller looks for a special 'mark' written on the disk when it was formatted. This 'mark' tells the controller that it is at the end of the inter-sector gap and that the read/write head is positioned at the start of the sector data. This 'mark' is called a DATA ADDRESS MARK and can be in two different forms, normal or deleted. The TI controller uses only normal data address marks but some copy protection techniques use sectors with the deleted data address marks, which cannot be created using normal disk access methods. Therefore, to check if the disk is an original all they have to do is check to see if the deleted marks are there. DISK HACKER WILL TELL YOU WHICH SECTORS ON A TRACK HAVE DELETED DATA MARKS AND WHICH HAVE NORMAL DATA MARKS. CRC is short for CYCLIC REDUNDANCY CODE and it a very common method of checking for errors in a data stream. A CRC can be thought of as just a complicated checksum. Each sector has two 2 byte CRC error check codes, one for the sector address and one for the sector data. If a CRC for the sector is incorrect then it becomes a 'bad' sector, gives an error code and cannot be read using the TI-DSR. DISK HACKER WILL CHECK THE HEADER AND THE DATA CRC'S AND TELL YOU WHICH OF THE SECTORS HAVE CRC ERRORS. o Check marks and CRC's [Y/N] This prompt asks whether or not you wish to check for deleted data marks and data CRC errors. Header CRC's are checked automatically and marked even if you answer 'N' to the prompt. If you select 'Y' then the analysis will take approximately twice as long as it would without the checking, but the information gained can be invaluable. ANALYSING THE DISK --------- --- ---- Now that you have given the program all the information it needs to know you can start the disk analysis procedure. After you have pressed enter for the last prompt the message 'PRESS SPACEBAR TO BEGIN ANALYSIS' will appear in the operation window. When you press the spacebar the selected drive will start up and the operation window will start to display the current track and side number. All the information you entered in the information area will stay displayed so you can remember what responses you made to the prompts. The track count will begin at the start track you entered and stop when it reaches the specified stop track. NOTE : If you feel that you have made an incorrect entry in the information area don't worry. DISK ACTIVITY MAY BE TERMINATED AT ANY TIME BY PRESSING FCTN 4 ( BREAK ). HOLD THE BREAK KEY DOWN UNTIL THE PROGRAM CONFIRMS THAT THE COMMAND HAS BEEN TERMINATED. When the track count reaches the specified stop track the program will inform you that the analysis has been completed and will then go into the next stage of operation, your viewing of the information. This concludes the section explaining the loading details, prompts, and the analysis process. The next file will completely document the details and use of the next stage of Disk Hacker, the information viewer. VIEWING THE INFORMATION ------- --- ----------- Now that the analysis has been completed and there is no disk activity you go into the second stage. The second stage is a system designed to allow you to view all the information obtained from the analysis in an easy to understand, easy to read format. All the information is displayed in a columnar arrangement with each row representing one sector from the track and one track taking one full screen. If we start at the top of the screen and work down explaining as we go then you will achieve the best understanding of what is actually being displayed. o At the very top of the display window we have the TRUE physical information for the track. First, the drive number that the track was analysed from is displayed, then the physical side of the disk on which the track is located, and the physical number of the track the information was read from. o The next row of information displayed is the actual number of sectors found on the track. This saves you from the annoyance of having to count the number of rows displayed in the display area. Before we go on to the next set of information you should understand the concept of addresses. When a track is formatted the sectors are arranged so as to be uniformly distributed about the track. To do this, especially on the longer outside tracks of the disk, a space must be left between each sector to give the disk controller time to get ready for reading the next sector. Preceeding each sector in this inter-sector gap is an ID address field or address for short. This address consists of six bytes containing information about the proceeding sector, this being track number, side number, sector number, sector length and CRC bytes in respective order. The CRC bytes are a precaution so we can tell if the address read has not been read correctly. The disk controller must be able to locate this address in the inter-sector gap, so, when the track is formatted a special 'mark', like the data address mark, is placed directly before the address. When the controller locates this mark in the gap it knows that the following six bytes are the ID address field bytes. DIAGRAM : Structure of one ninth of a normal TI disk track. (ie) Only one of the nine sectors is shown with associated gaps. >DATA< >DATA< >MARK< >MARK< ______________________________________________________________________ ! gap 1 ! DM ! TK!SD!SC!LN!CRC ! gap 2 ! DM ! sector data ! data CRC ! ---------------------------------------------------------------------- >>>ADDRESS FIELD<<< Now that the concept of addresses has been explained we can go on to explain the display between the two lines across the window. All these symbols are abbreviations of parts of the ID address field and terms used to describe certain aspects of sectors. Here is an expanded list of what all these symbols stand for :- o TRK stands for TRACK NUMBER. This track number is the number obtained from the address field. This does not necessarily have to contain the same number as the physical track number displayed at the top of the screen but on normal TI disks it is always the same, otherwise it is unreadable by the standard disk DSR. o SID stands for SIDE NUMBER. The side number is obtained from the address field and if it is 0 then the sector is saying it is on side 1. If it is 1 it says it is on side 2. As with the track number the address side number does not have to correspond to the physical side number that the track is on but any normal TI disk has the correct value. o SEC stands for SECTOR NUMBER. On any TI-DSR readable disk the sector numbers from the address field for the 9 sectors range from 0 to 8 inclusive. ( ie. Every track has a set of 9 sectors, each with a unique number between 0 and 8 ). However, the sector number can vary from 0 to 255 but no normal TI track contains sector numbers above 8. The column of sector numbers is the sector interlace. o LGTH This stands for LENGTH of the sector. Any normal TI-DSR compatible disk contains sectors of length 256 bytes. However, it is possible to create sectors of other lengths. Disk Hacker will display the length of every sector it finds. If Disk Hacker runs across a sector of indeterminate length it will display 'inv', for invalid, in place of the length. o CRC This column contains the 2 header CRC bytes from the ID address field. The CRC bytes, if correct, indicate a valid header, if incorrect then the header contains an error. Disk Hacker checks this header CRC and tells you if it is invalid. If the header CRC is incorrect a small arrow appears to the left of the CRC value for the sector. These next two columns only display any information if you responded to the 'Check marks and CRC's [Y/N]' with a 'Y', as they refer to sector data and not header data. o M stands for DATA MARK. The information displayed in this column tells you whether the data mark for any particular sector on the track is a DELETED data mark. If a deleted data mark is detected for a sector then a 'D' is displayed in the column on that sector's row. If the data mark is normal then nothing is displayed in the column, making it easy to spot the sectors with DELETED DATA MARKS. o C stands for DATA CRC. If the data in the sector does not produce the correct CRC then there is a DATA CRC error. If there is a data CRC error for a particular sector then an 'E', for error, is displayed in this column. If there is no error then nothing is displayed, making it easy to spot DATA CRC errors. NOTE : There are two special cases which affect the display in this column. They are these :- o If 'inv' is displayed in the length column ( invalid length ) then no data is displayed in the M and C columns because it is impossible to check for this information. o If no data address mark can be found after the address ( ie. no sector data, fake ID field ), then 'RNF' is displayed across the M and C columns. PAGING THROUGH THE INFORMATION ------ ------- --- ----------- Because only one track is displayed per screen, if you analysed more than one track then you must 'page' through the track information. Because all tha analysis has already been done the disk does not have to turn on again unless you wish to analyse another disk. To page through the information for each track use the FCTN E and FCTN X keys. FCTN X pages forward through the tracks and FCTN E pages back through the tracks. Note that as you page through the tracks the information at the top of the screen is also updated. The track number at the top is handy if you want to compare the address track numbers in the data area to the real, physical track number. The physical track number at the top does not go past 39, even if you specified double sided track numbers above 39, because the address track numbers start at zero again when they start on the second side. ( see diagram in first file ) So, when the physical track counter exceeds track 39 on side 1 it starts again from track 0 on side 2 so you can easily compare the address track numbers with the physical track number without having to subtract 40 all the time. DECIMAL / HEXADECIMAL TOGGLING --------------------- -------- While examining the information you may find it more convenient to look at the information in hexadecimal rather than decimal. If you press FCTN 6 you will toggle between DECIMAL and HEX. The header CRC bytes are always displayed in HEX because they are of no use in decimal. FUNCTION KEYS FOR DISK HACKER -------- ---- --- ---- ------ Press at any time : CTRL = -------> QUIT DISK HACKER ( not while disk on ) FCTN 9 -------> GO TO DISK HACKER TITLE SCREEN FCTN 8 -------> GO TO DISK HACKER INITIAL SCREEN Cursor function keys : FCTN 1 -------> DELETE CHARACTER FCTN 2 -------> INSERT SPACE FCTN 3 -------> ERASE LINE FCTN S -------> MOVE CURSOR BACK ONE CHARACTER FCTN D -------> MOVE CURSOR FORWARD ONE CHARACTER During disk activity : FCTN 4 -------> TERMINATE DISK ACTIVITY REMEMBER, THIS IS ONLY DISK HACKER PART ONE. PART TWO WILL DIG EVEN DEEPER INTO TRACKS. THANKS, WILL McGOVERN