ÌÉÔÔÌÅ ÒÅÄ ÒÅÁÄÅÒ ÖERSION 2.70 [ÆEBRUARY 16, 1998] ÍÓ-ÄÏÓ FILE READER/WRITER FOR THE Ã128 AND 1571/81/ÆÄ DRIVES. BY ÃRAIG ÂRUCE (CSBRUCE@POBOX.COM) ÌITTLE ÒED ÒEADER (ÌÒÒ) IS A PROGRAM FOR THE Ã128 THAT WILL READ AND WRITE FILES TO AND FROM ÍÓ-ÄÏÓ FLOPPY DISKS USING A 1571, 1581, ÃÍÄ ÆÄ-2000, OR ÃÍÄ ÆÄ-4000 DISK DRIVE. ×ITH THE ÆÄ DRIVES, YOU CAN USE ÈIGH ÄENSITY (ÈÄ) ÍÓ-ÄÏÓ DISKS. ÔHE PROGRAM COPIES FILES FROM DRIVE TO DRIVE (NO INTERNAL BUFFERING), SO YOU NEED A SECOND DISK DRIVE (EITHER REAL OR VIRTUAL) TO COPY FILES TO. ÙOU CAN USE ÒÁÍÄÏÓ FOR THE SECOND DRIVE IF YOU HAVE AN ÒÅÕ AND YOU EXECUTE A ÇÒÁÐÈÉà ÃÌÒ AFTER STARTING IT UP. ÔHE MENU-DRIVEN FULL-SCREEN USER INTERFACE IS WRITTEN IN ÂÁÓÉà SO IT IS MILDLY SLUGGISH, BUT THE ACTUAL FILE COPYING IS WRITTEN IN MACHINE LANGUAGE AND OPERATES AS FAST AS THE DISK DRIVES WILL GO. 1. ÉÎÔÒÏÄÕÃÔÉÏÎ ÔHIS DOCUMENT PRESENTS A PROGRAM THAT READS AND WRITES ÍÓ-ÄÏÓ FILES AND THE ROOT DIRECTORY OF ÍÓ-ÄÏÓ DISKS. ÔHE PROGRAM COPIES ONLY FROM DRIVE TO DRIVE WITHOUT BUFFERING FILE DATA INTERNALLY. ÔHIS IS SIMPLER AND IMPOSES NO LIMITS ON THE SIZE OF THE FILES TRANSFERRED, ALTHOUGH IT REQUIRES THE USE OF TWO DISK DRIVES (OR A LOGICAL DRIVE). ÔHE USER-INTERFACE CODE IS WRITTEN IN ÂÁÓÉà AND PRESENTS A FULL-SCREEN FILE SELECTION MENU. ÔHE GRUNT-WORK CODE IS WRITTEN IN ASSEMBLY LANGUAGE AND OPERATES AT MAXIMUM VELOSITY. ÔHE PROGRAM ALSO ALLOWS ÍÓ-ÄÏÓ FILES TO BE DELETED AND TO ALLOWS THE COPYING OF ÃOMMODORE-ÄÏÓ FILES BETWEEN ÃÂÍ-ÄÏÓ DISKS (THIS MAKES IT MORE CONVENIENT TO USE THE PROGRAM WITH A TEMPORARY LOGICAL DRIVE LIKE ÒÁÍÄÏÓ). ÁLSO, SINCE É HAVE A ÃÍÄ ÆÄ-4000 FLOPPY DISK DRIVE, É KNOW THAT THIS PROGRAM WORKS WITH ÍÓ-ÄÏÓ DISKS WITH THIS DRIVE (FOR BOTH THE 720Ë AND 1.44Í ÍÓ-ÄÏÓ FORMATS). ÔHE ÆÄ DISK DRIVES ARE LOGICALLY REFERRED TO BELOW AS BEING THE 1581. ÔHE ÂURST ÃOMMAND ÉNSTRUCTION ÓET OF THE 1571/81 IS USED TO READ THE ÍÓ-ÄÏÓ DISK BLOCKS AND THE STANDARD KERNEL ROUTINES ARE USED FOR OUTPUTTING THE DATA. (É AM AN OPERATING SYSTEMS SPECIALIST, SO É CALL IT A KERNÅL!) ÔHUS, THE ÍÓ-ÄÏÓ FILES MUST BE READ FROM A 1571 OR 1581 DISK DRIVE, BUT THE OUTPUT DEVICE MAY BE ANY DISK DRIVE TYPE, THE SCREEN OR A PRINTER, OR A VIRTUAL DRIVE TYPE SUCH AS ÒÁÍÌINK, ÒÁÍÄRIVE, OR ÒÁÍÄÏÓ (FOR THE ÒÅÕ). ÉT IS INTERESTING TO NOTE THAT THE DATA CAN BE READ IN FROM AN ÍÓ-ÄÏÓ DISK FASTER THAN IT CAN BE WRITTEN OUT TO A 1571, 1581, OR EVEN A ÒÁÍÄÏÓ FILE. Á ÒÁÍÌINK CAN SWALLOW THE DATA ONLY SLIGHTLY FASTER THAN IT CAN BE READ. ÌITTLE ÒED ÒEADER (ÌÒÒ) SUPPORTS DOUBLE DENSITY 3.5" DISKS FORMATTED WITH 80 TRACKS, 9 SECTORS PER TRACK, AND 2 SIDES WITH A 1581 AND 5.25" DOUBLE DENSITY DISKS FORMATTED WITH 40 TRACKS, 9 SECTORS PER TRACK, AND 2 SIDES WITH A 1571, AND MORE RECENTLY, HIGH DENSITY 3.5" DISKS FORMATTED WITH 80 TRACKS, 18 SECTORS PER TRACK, 2 SIDES, AND A "12-BIT ÆÁÔ". Á LIMIT OF 224 DIRECTORY ENTRIES AND 9 ÆILE ÁLLOCATION ÔABLE (ÆÁÔ) SECTORS IS IMPOSED. ÔHERE MUST BE 2 COPIES OF THE ÆÁÔ AND THE CLUSTER SIZE MAY BE 1 OR 2 SECTORS. ÔHE SECTOR SIZE MUST BE 512 BYTES. ÔHE PROGRAM RUNS ON EITHER THE 40 OR 80-COLUMN SCREENS, BUT YOU WILL GET MUCH BETTER PERFORMANCE FROM THE ÂÁÓÉà PORTION OF THE PROGRAM BY BEING IN 80-COLUMN MODE AND ÆÁÓÔ MODE. Á MODIFICATION THAT SOMEONE MIGHT WANT TO MAKE WOULD BE TO SPREAD-OUT THE DISPLAY FOR THE 80-COLUMN SCREEN AND ADD COLOR TO THE RATHER BLAND DISPLAY. ÏH, ABOUT THE NAME. ÉT IS A PLAY ON THE NAME OF ANOTHER ÍÓ-ÄÏÓ FILE COPIER AVAILABLE FOR THE Ã-128. "ÌITTLE" MEANS THAT IT IS SMALLER IN SCOPE THAN THE OTHER PROGRAM, AND "ÒED" IS A DIFFERENT PRIMARY COLOR TO AVOID ANY LEGAL COMPLICATIONS. ÉT IS ALSO THE NON-WHITE COLOR OF THE FLAG OF THE COUNTRY OF ORIGIN OF THIS PROGRAM (NO, É AM NOT ÊAPANESE). ÁLSO, THIS PROGRAM IS ÐUBLIC ÄOMAIN ÓOFTWARE, AS IS ALL SOFTWARE É DEVELOP FOR 8-BIT ÃOMMODORE ÃOMPUTERS. ÆEEL FREE TO Å-MAIL ME IF YOU HAVE QUESTIONS OR COMMENTS ABOUT THIS ARTICLE. 2. ÕÓÅÒ ÇÕÉÄÅ ÌÏÁÄ AND ÒÕÎ THE "LRR270" ÂÁÓÉà PROGRAM FILE. ×HEN THE PROGRAM IS FIRST RUN, IT WILL DISPLAY AN "INITIALIZING" MESSAGE AND WILL LOAD IN THE BINARY MACHINE LANGUAGE PACKAGE FROM THE "CURRENT" ÃOMMODORE ÄÏÓ DRIVE (THE CURRENT DRIVE IS OBTAINED FROM ÐÅÅË(186) - THE LAST DEVICE ACCESSED). ÔHE BINARY PACKAGE IS LOADED ONLY ON THE FIRST RUN AND IS NOT RELOADED ON SUBSEQUENT RUNS IF THE PACKAGE ÉÄ FIELD IS IN PLACE. ÔHE SYSTEM IS DESIGNED TO HAVE TWO FILE SELECTION MENUS: ONE FOR THE ÍÓ-ÄÏÓ DISK DRIVE, AND ONE FOR THE ÃOMMODORE-ÄÏÓ DISK DRIVE (WHICH MAY BE A LOGICAL DISK DRIVE). ÔHE IDEA FOR COPYING IS THAT YOU SELECT THE FILES IN ONE OF THESE MENUS, AND THEN PROGRAM KNOWS TO COPY THEM TO THE DISK FOR THE OTHER MENU. 2.1. ÍÓ-ÄÏÓ ÍÅÎÕ ÔHE MAIN SCREEN OF THE PROGRAM IS THEN DISPLAYED. ÔHE MAIN SCREEN OF THE PROGRAM WILL LOOK SOMETHING VAGUELY LIKE THIS: ÍÓ-ÄÅÖ=9 ÍÓ-ÔÙÐÅ=1581 ÃÂÍ-ÄÅÖ=8 ÎÕÍ Ó ÔÒÎ ÔÙÐ ÆÉÌÅÎÁÍÅ ÅØÔ ÌÅÎÇÔÈ --- - --- --- -------- --- ------ 1 * ÁÓà ÓÅÑ ÈÁÃË4 ÔØÔ 120732 2 ÂÉÎ ÐÒÇ ÒÁÍÄÏÓ ÓÆØ 34923 Ä=ÄÉÒÅÃÔÏÒÙ Í=ÍÓ-ÄÅÖ Æ=ÃÂÍ-ÄÅÖ Ñ=ÑÕÉÔ Ô=ÔÏÇÇÌÅ-ÃÏÌÕÍÎ, Ã=ÃÏÐÙ-ÆÉÌÅÓ, +/- ÐÁÇÅ EXCEPT THAT IMMEDIATELY AFTER STARTING UP, "" WILL BE DISPLAYED RATHER THAN FILENAMES. ÔHE "ÍÓ-ÄÅÖ" AND "ÍÓ-ÔÙÐÅ" FIELDS GIVE THE DEVICE NUMBER AND TYPE OF THE DRIVE CONTAINING THE ÍÓ-ÄÏÓ DISK TO COPY FROM, AND THE "ÃÂÍ-ÄÅÖ" GIVES THE DEVICE NUMBER OF THE DRIVE/VIRTUAL DRIVE/CHARACTER DEVICE TO COPY FILE DATA TO. ÔHE NUMBER OF BYTES FREE ON THE DRIVE ARE ALSO DISPLAYED (WHICH IS USEFUL TO KNOW WHEN WRITING FILES) AND THERE ARE SOME MORE COMMANDS. ÉNFORMATION ABOUT ALL ÍÓ-ÄÏÓ FILES IN THE ROOT DIRECTORY OF THE ÍÓ-ÄÏÓ DISK IS DISPLAYED IN COLUMNS BELOW THE DRIVE INFORMATION. "ÎÕÍ" GIVES THE NUMBER OF THE ÍÓ-ÄÏÓ FILE IN THE DIRECTORY LISTING, AND "Ó" INDICATES WHETHER THE FILE IS "SELECTED" OR NOT. ÉF THE FILE IS SELECTED, AN ASTERISK (*) IS DISPLAYED; OTHERWISE, A BLANK IS DISPLAYED. ×HEN YOU LATER ENTER ÃOPY ÍODE, ONLY THE FILES THAT HAVE BEEN "SELECTED" ARE COPIED. ÔHE "ÔÒÎ" FIELD INDICATES THE CHARACTER TRANSLATION SCHEME TO BE USED WHEN THE FILE IS COPIED. Á VALUE OF "ÂÉÎ" (BINARY) MEANS NO TRANSLATION AND A VALUE OF "ÁÓÃ" (ASCII) MEANS THE FILE CHARACTERS ARE TO BE TRANSLATED FROM ÍÓ-ÄÏÓ ÁÓÃÉÉ (OR "ÁÓÃÉÉ-ÃRÌF") TO ÐÅÔÓÃÉÉ. ÔHE "ÔÙÐ" FIELD INDICATES THE TYPE OF ÃOMMODORE-ÄÏÓ FILE TO CREATE FOR WRITING THE ÍÓ-ÄÏÓ FILE CONTENTS INTO. ÔHE POSSIBLE VALUES ARE "ÓÅÑ" (SEQUENTIAL) AND "ÐÒÇ" (PROGRAM). ÔHE VALUES OF THE ÔÒÎ AND ÔÙÐ FILEDS ARE SET INDEPENDENTLY, SO YOU CAN COPY BINARY DATA TO ÓÅÑ FILES AND ASCII DATA TO ÐÒÇ FILES IF YOU WISH. ÔHE "ÆÉÌÅÎÁÍÅ" AND "ÅØÔ" FIELDS GIVE THE FILENAME AND EXTENSION TYPE OF THE ÍÓ-ÄÏÓ FILES AND "ÌÅÎÇÔÈ" GIVES THE EXACT LENGTH OF THE FILES IN BYTES. ÎOTE THAT IF YOU PERFORM "ÁÓÃ" TRANSLATION ON A FILE, ITS ÐÅÔÓÃÉÉ VERSION WILL HAVE A SHORTER LENGTH. 2.2. ÕÓÅÒ ÃÏÍÍÁÎÄÓ ÔHE BOTTOM OF THE SCREEN GIVES THE COMMAND SUMMARY. ÁFTER STARTING THE PROGRAM, YOU WILL WANT TO SETUP THE ÍÓ-ÄÏÓ AND ÃÂÍ-ÄÏÓ DRIVES WITH THE "Í" AND "Æ" COMMANDS. ÓIMPLY PRESS THE (LETTER) KEY CORRESPONDING TO THE COMMAND NAME TO ACTIVATE THE COMMAND. ÐRESSING Í WILL PROMPT YOU FOR THE ÍÓ-ÄÏÓ ÄRIVE ÎUMBER AND THE ÍÓ-ÄÏÓ ÄRIVE ÔYPE. ÉN BOTH CASES, TYPE THE NUMBER AND PRESS ÒÅÔÕÒÎ. (ÓORRY FOR INSULTING ALL NON-NOVICES OUT THERE, BUT É WANT TO BE COMPLETE). ÔHE ÍÓ-ÄÏÓ DRIVE NUMBER CANNOT BE THE SAME AS THE ÃÂÍ-ÄÏÓ DRIVE NUMBER (SINCE THE PROGRAM COPIES FROM DRIVE-TO-DRIVE WITHOUT INTERNAL BUFFERING). ÆOR THE DRIVE TYPE, ENTER AN "8", "81", OR "1581" FOR A 1581 DRIVE OR ÆÄ-SERIES DRIVE, OR A "7", "71", OR "1571" FOR A 1571 DRIVE. ÐRESSING Æ WILL PROMPT YOU FOR THE ÃÂÍ-ÄÏÓ DEVICE NUMBER. ÙOU MAY ENTER A NUMBER FROM 0 TO 30, EXCEPT THAT IT MUST NOT BE THE ÍÓ-ÄÏÓ DRIVE NUMBER. ÅNTER A "1" FOR ÃASSETTE ÄRIVE (ÇOD FORBID!), A "3" FOR THE SCREEN, A "4" FOR THE PRINTER (WITH AN AUTOMATIC SECONDARY ADDRESS OF 7 (LOWERCASE)), ANY NUMBER ABOVE 7 FOR A ÃOMMODORE DISK DRIVE OR SPECIAL VIRTUAL DRIVE, OR A VALUE OF "0" FOR THE SPECIAL "NULL" DRIVE. Á ÃÂÍ-ÄÅÖ VALUE OF 0 WILL CASE THE PROGRAM TO READ ÍÓ-ÄÏÓ FILES AND DO NOTHING WITH THE OUTPUT. ÙOU CAN USE THIS FEATURE TO CHECK OUT THE RAW READING SPEED OF THE PROGRAM. ÁFTER SETTING UP THE DRIVES, PRESS Ä TO READ IN THE ROOT DIRECTORY OFF THE ÍÓ-ÄÏÓ DISK. ÔHE DATA WILL COME BLAZING IN FROM THE DISK BUT ÂÁÓÉà WILL TAKE ITS GOOD OLE TIME SIFTING THROUGH IT. ÆILENAMES ARE DISPLAYED ON THE SCREEN AS THEY ARE SCANNED IN. ÔHE PROGRAM WILL (EVENTUALLY) RETURN TO THE MAIN SCREEN AND DISPLAY THE FORMATTED FILE INFORMATION. ÏNE NOTE: THE PROCESS OF LOGGING IN A 1581 ÍÓ-ÄÏÓ DISK TAKES ABOUT 12 SECONDS (ON MY 1581, ANYWAY), SO BE PATIENT. ÁN ÍÓ-ÄÏÓ DISK WILL HAVE TO BE "LOGGED IN" EVERY TIME YOU CHANGE ÍÓ-ÄÏÓ DISKS. (ÄISKS ARE LOGGED IN AUTOMATICALLY). Á COUPLE OF NOTES ABOUT ACCESSING ÍÓ-ÄÏÓ DISKS: DON'T TRY TO ACCESS A DEVICE THAT IS NOT PRESENT BECAUSE THE MACHINE LANGUAGE ROUTINES CANNOT HANDLE THIS ERROR FOR SOME REASON AND WILL LOCK UP, REQUIRING A ÓÔÏÐ+ÒÅÓÔÏÒÅ. ÁLSO, MAKE SURE THAT AN ACTUAL ÍÓ-ÄÏÓ DISK IS LOADED INTO THE DRIVE. ÉF YOU ACCIDENTALLY PLACE ÃOMMODORE-ÄÏÓ DISK INTO THE ÍÓ-ÄÏÓ DRIVE, THE 1581 WILL REPORT AN INVALID BOOT PARAMETERS ERROR (#60), BUT A 1571 WILL LOCK UP (SINCE É DON'T CHECK THE SECTOR SIZE AND MY BURST ROUTINES ARE EXPECTING 512 BYTES TO COME OUT OF A SECTOR WHEREAS ÃOMMODORE DISKS HAVE ONLY 256 BYTES PER SECTOR). ÎOW YOU ARE READY TO PICK WHAT FILES YOU WANT COPIED AND HOW YOU WANT THEM COPIED. ÙOU WILL NOTICE THAT A "CURSOR" APPEARS IN THE "Ó" COLUMN OF THE FIRST FILE. ÙOU MAY MOVE THE CURSOR AROUND WITH THE CURSOR KEYS: ÕÐ, ÄÏ×Î, ÌÅÆÔ, ÒÉÇÈÔ, ÈÏÍÅ, AND ÃÌÒ. ÃÌÒ (ÓÈÉÆÔ-ÈÏÍÅ) WILL MOVE THE CURSOR BACK TO THE FIRST FILE ON THE FIRST SCREEN. ÙOU CAN MOVE THE CURSOR AMONG THE SELECT, TRANSLATION, AND FILE-TYPE COLUMNS OF ALL THE FILES. ÐRESSING A ÓÐÁÃÅ OR A ÒÅÔÕÒÎ WILL TOGGLE THE VALUE OF THE FIELD THAT THE CURSOR IS ON. ÔO TOGGLE ALL OF THE VALUES OF THE "CURSOR" COLUMN (INCLUDING FILES ON ALL OTHER SCREENS), PRESS Ô. ÙOU WILL NOTICE THAT MOVING THE CURSOR AROUND AND TOGGLING FIELDS IS A BIT SLUGGISH, ESPECIALLY IF YOU ARE IN ÓLOW MODE ON THE 40-COLUMN SCREEN. ÄID É MENTION THAT THIS PROGRAM WILL RUN ON EITHER THE 40 OR 80-COLUMN SCREEN? ÔOGGLING AN ENTIRE COLUMN CAN TAKE A COUPLE OF SECONDS. ÉF THERE ARE MORE THAN 18 ÍÓ-ÄÏÓ FILES, YOU CAN PRESS THE "+" AND "-" KEYS TO MOVE AMONG ALL OF THE SCREENS OF FILES. ÔHE CURSOR MOVEMENT KEYS WILL WRAP AROUND ON THE CURRENT SCREEN. "+" IS PAGE FORWARD, AND "-" IS PAGE BACKWARD. ÔHE SCREENS WRAP AROUND TOO. ÁFTER YOU HAVE SELECTED ALL OF THE FILES YOU WANT TO COPY AND THEIR TRANSLATION AND FILE-TYPE FIELDS HAVE BEEN SET, PRESS THE à KEY TO GO INTO ÃOPY ÍODE (NEXT SECTION). ÁFTER COPYING, YOU ARE RETURNED TO THE MAIN SCREEN WITH ALL OF THE FIELD SETTINGS STILL INTACT. ÔO EXIT FROM THE PROGRAM, PRESS Ñ. ÁDDITIONAL COMMANDS ARE: "Ò" (REMOVE == DELETE), "/" (CHANGE MENU), AND "Ø" (COPY ÃÂÍ FILES == "ØEROX"). ÔHE REMOVE COMMAND IS USED TO DELETE SELECTED FILES FROM THE ÍÓ-ÄÏÓ DISK. ÁFTER SELECTING THIS OPTION, YOU WILL GET AN ANNOYING "ARE YOU SURE" QUESTION AND THE THE SELECTED FILES WILL QUICKLY DISAPPEAR AND THE CHANGES WILL FINALLY BE WRITTEN TO DISK. ÄELETING A BATCH OF ÍÓ-ÄÏÓ FILES IS MUCH QUICKER THAN DELETING ÃOMMODORE-ÄÏÓ FILES SINCE ÍÓ-ÄÏÓ DISKS USE A ÆILE ÁLLOCATION ÔABLE RATHER THAN THE LINKED LIST OF BLOCKS ORGANIZATION THAT ÃÂÍ USES. ÉN ORDER TO MAKE THE ÂÁÓÉà PROGRAM EXECUTE QUICKER, AFTER DELETING, THE ORIGINAL ORDER OF THE FILENAMES IN THE DIRECTORY LISTING WILL BE CHANGED. ÂE FOREWARNED THAT THE DELETE OPERATION IS NON-RECOVERABLE. ÔHE CHANGE MENU COMMAND IS USED TO MOVE BACK AND FORTH BETWEEN THE ÃOMMODORE-ÄÏÓ AND ÍÓ-ÄÏÓ MENUS. 2.3. ÃÏÐÙÉÎÇ ÍÓ-ÄÏÓ ÔÏ ÃÂÍ-ÄÏÓ ×HEN YOU ENTER COPY MODE, THE SCREEN WILL CLEAR AND THE NAME OF EACH SELECTED FILE IS DISPLAYED AS IT IS BEING COPIED. ÉF AN ERROR IS ENCOUNTERED ON EITHER THE ÍÓ-ÄÏÓ OR ÃÂÍ-ÄÏÓ DRIVE DURING COPYING, AN ERROR MESSAGE WILL BE DISPLAYED AND COPYING WILL CONTINUE (AFTER YOU PRESS A KEY FOR ÍÓ-ÄÏÓ ERRORS). ÔO GENERATE A ÃÂÍ-ÄÏÓ FILENAME FROM AN ÍÓ-ÄÏÓ FILENAME, THE EIGHT FILENAME CHARACTERS ARE TAKEN (INCLUDING SPACES) AND A DOT (.) AND THE THREE CHARACTERS OF THE EXTENSION ARE APPENDED. ÔHEN, ALL SPACES ARE REMOVED, AND IF THE NAME ENDS WITH A DOT (.) CHARACTER, THEN THAT DOT CHARACTER IS REMOVED AS WELL. É THINK THIS IS FAIRLY REASONABLE. ÉF THERE ALREADY IS A FILE WITH THE SAME FILENAME ON THE ÃÂÍ-ÄÏÓ DISK, THEN YOU WILL BE PROMPTED IF YOU WANT TO OVERWRITE THE FILE OR NOT. ÅNTERING AN "N" WILL ABORT THE COPYING OF THAT FILE AND GO ON TO THE NEXT FILE, AND ENTERING A "Y" (OR ANYTHING ELSE) WILL CAUSE THE ÃÂÍ-ÄÏÓ FILE TO BE "SCRATCHED" AND THEN RE-WRITTEN. ÔHE PHYSICAL COPYING OF THE FILE IS DONE COMPLETELY IN MACHINE LANGUAGE AND NOTHING IS DISPLAYED ON THE SCREEN WHILE THIS IS HAPPENING, BUT YOU CAN FOLLOW THINGS BY LOOKING AT DAS BLINKIN LICHTES AND LISTENING FOR CLICKS AND GRINDS. ÙOU WILL PROBABLY BE SURPRISED BY THE ÍÓ-ÄÏÓ FILE READING SPEED (É MEAN IN A GOOD WAY). ÔHE DISK DATA IS READ IN WHOLE TRACKS AND CACHED IN MEMORY AND THE DIRECTORY INFORMATION AND THE ÆÁÔ ARE RETAINED IN MEMORY AS WELL. ÔHE RESULT IS THAT MINIMAL TIME IS SPENT READING DISK DATA, AND NO COSTLY SEEKS ARE REQUIRED FOR OPENING A NEW ÍÓ-ÄÏÓ FILE. Á RESULT IS THAT SMALL FILES ARE COPIED ONE AFTER ANOTHER VERY QUICKLY. ÙOU WILL HAVE TO WAIT, HOWEVER, ON THE RELATIVELY SLOW STANDARD KERNEL/ÃOMMODORE-ÄÏÓ FILE WRITING. Á FEW CHANGES HAD TO BE MADE TO THE PROGRAM TO ACCOMODATE THE ÒÁÍÄÏÓ PROGRAM. ÒÁÍÄÏÓ USES MEMORY FROM $2300 TO $3ÆÆÆ OF ÒÁÍ0, WHICH IS NOT REALLY A GOOD PLACE FOR A DEVICE DRIVER, AND IT USES SOME OF THE ZERO-PAGE LOCATIONS THAT É WANTED TO USE. ÂUT, DIFFICULTIES WERE OVERCOME. ÔHE IMPORTANCE OF ÒÁÍÄÏÓ COMPATIBILITY IS THAT IF YOU ONLY HAVE ONE DISK DRIVE BUT YOU HAVE AN ÒÅÕ, YOU CAN USE ÒÁÍÄÏÓ TO STORE THE ÍÓ-ÄÏÓ FILES TEMPORARILY. ÓINCE THE NEW VERSION HAS GREATER MEMORY REQUIREMENTS, AFTER STARTING UP "RAMDOS" (IF YOU USE IT) YOU WILL HAVE TO EXECUTE THE "GRAPHIC CLR" ÂÁÓÉà COMMAND. ÉF YOU ONLY HAVE ONE DISK DRIVE AND NO ÒÅÕ, YOU ARE ÓÏÌ (ÏUT OF ÌUCK) UNLESS YOU CAN GET A ÒAMÄISK-TYPE PROGRAM FOR AN UNEXPANDED 128. ÔHE ÒÁÍÄÏÓ PROGRAM IS AVAILABLE FROM ÆÔÐ SITE "FTP.JBRAIN.COM" IN DIRECTORY "/PUB/CBM/SOFTWARE/UTILS/128/ÏÌÄÉÅÓ92" IN FILE "RAMDOSII.SFX". ÏNE NOTE É FOUND OUT ABOUT ÒÁÍÄÏÓ: YOU CANNOT USE A ÄÏÐÅÎ#1,(ÃÆ$),Õ(ÃÄ),× WITH IT LIKE YOU ARE SUPPOSED TO BE ABLE TO; YOU HAVE TO USE A ÄÏÐÅÎ#1,(ÃÆ$+",×"),Õ(ÃÄ) ÈERE IS A TABLE OF COPYING SPEEDS FOR COPYING FROM 1571S AND 1581S WITH ÁÓà AND ÂÉÎ TRANSLATION MODES. ÁLL FIGURES ARE IN BYTES/SECOND. ÔHESE RESULTS WERE OBTAINED FROM COPYING A 127,280 BYTE TEXT FILE (THE TEXT OF Ã= ÈACKING ÉSSUE #3). ÆÒÏÍ \ ÔÏ: "NULL" ÒÁÍÌINK ÒÁÍÄÏÓ ÊÄ1581 ÊÄ1571 -------+ ------ ------- ------ ------ ------ 81-BIN Ü 5772 3441 2146 N/A 644 81-ASC Ü 5772 3434 2164 N/A 661 71-BIN Ü 4323 2991 1949 1821 N/A 71-ASC Ü 4323 2982 1962 1847 N/A ÔHE "NULL" DEVICE IS THAT "0" ÃÂÍ-ÄÏÓ DEVICE NUMBER, AND A COUPLE OF ENTRIES ARE "N/A" SINCE É ONLY HAVE ONE 1571 AND ONE 1581. ÎOTE THAT MY 71 AND 81 ARE ÊIFFYÄÏÓ-IFIED, SO THE PERFORMANCE OF A STOCK 71/81 WILL BE POORER. ÊIFFYÄÏÓ GIVES ABOUT A 2X PERFORMANCE IMPROVEMENT FOR THE STANDARD FILE ACCESSING CALLS (OPEN, CLOSE, CHRIN, CHROUT). ÒÁÍÄÏÓ DOESN'T SEEM TO BE AS SNAPPY AS YOU MIGHT THINK. ÔHE "NULL" FIGURES ARE QUITE IMPRESSIVE, BUT THE RAW SECTOR READING SPEED WITHOUT THE OVERHEAD OF MUCKING AROUND WITH FILE ORGANIZATION IS 6700 BYTES/SEC FOR A 1581 AND 4600 Â/S FOR A 71. ÔHE REASON THAT THE 1571 OPERATES SO QUICKLY IS THAT É USE A SECTOR INTERLEAVE OF 4 (WHICH IS OPTIMAL) FOR READING THE TRACKS. É THINK THAT OTHER ÍÓ-ÄÏÓ FILE COPIER PROGRAM USES AN INTERLEAVE OF 1 (WHICH IS NOT OPTIMAL). É LOSE SOME OF THE RAW PERFORMANCE BECAUSE É COPY THE FILE DATA INTERNALLY ONCE BEFORE OUTPUTTING IT (TO SIMPLIFY SOME OF THE CODE). ÉN A COUPLE OF PLACES YOU WILL NOTICE THAT ÁÓà TRANSLATION GIVES SLIGHTLY BETTER OR SLIGHTLY WORSE PERFORMANCE THAN ÂÉÎ. ÔHIS IS BECAUSE ALTHOUGH SLIGHTLY MORE WORK IS REQUIRED TO TRANSLATE THE CHARACTERS, SLIGHTLY FEWER CHARACTERS WILL HAVE TO BE WRITTEN TO THE ÃÂÍ-ÄÏÓ FILE, SINCE ÐÅÔÓÃÉÉ USES ONLY ÃÒ WHERE ÍÓ-ÄÏÓ ÁÓÃÉÉ USES ÃÒ AND ÌÆ TO REPRESENT END-OF-LINE. ÔRANSLATION IS DONE BY USING A TABLE (THAT YOU CAN CHANGE IF YOU WISH). ÍANY ENTRIES IN THIS TABLE CONTAIN A VALUE OF ZERO, WHICH MEANS THAT NO CHARACTER WILL BE OUTPUT ON TRANSLATION. ÍOST OF THE CONTROL CHARACTERS AND ALL OF THE CHARACTERS OF VALUE 128 (0X80) OR GREATER ARE THROWN AWAY ON BEING TRANSLATED. ÔHE TABLE IS SET UP SO THAT ÃÒ CHARACTERS ARE THROWN AWAY AND THE ÌÆ CHARACTER IS TRANSLATED TO A ÃÂÍ-ÄÏÓ ÃÒ CHARACTER. ÔHUS, BOTH ÍÓ-ÄÏÓ ÁÓÃÉÉ FILES AND ÕÎÉØ ÁÓÃÉÉ FILES CAN BE TRANSLATED CORRECTLY. 2.4. ÃÏÍÍÏÄÏÒÅ-ÄÏÓ ÍÅÎÕ ÔHE ÃOMMODORE-ÄÏÓ MENU, WHICH DISPLAYS THE NAMES OF THE ÃOMMODORE FILES SELECTED FOR VARIOUS OPERATIONS, LOOKS AND WORKS PRETTY MUCH THE SAME AS THE ÍÓ-ÄÏÓ MENU: ÃÂÍÄÏÓ ÍÓ=10:1581 ÃÂÍ=8 ÆÒÅÅ=3211476 ÎÕÍ Ó ÔÒÎ ÆÉÌÅÎÁÍÅ Ô ÌÅÎÇÔÈ --- - --- ---------------- - ------ 1 * ÂÉÎ ÌÒÒ-128 Ð 9876 2 ÁÓà ÃÏÍ-ÈÁÃËÉÎÇ-005 Ó 175412 Ä=ÄÉÒ Í=ÍÓÄÅÖ Æ=ÃÂÍÄÅÖ Ã=ÃÏÐÙ Ñ=ÑÕÉÔ Ô=ÔÏÇÇÌÅ Ò=ÒÅÍÏÖÅ Ø=ÃÂÍÃÐÙ /=ÍÅÎÕ +-=ÐÇ ÙOU'LL NOTICE, HOWEVER, THAT THE FILETYPE FIELD ("Ô" HERE) IS MOVED AND IS UNCHANGABLE. ÁLSO, THE FILE LENGTHS ARE NOT EXACT; THEY ARE REPORTED AS THE BLOCK COUNT OF THE FILE MULTIPLIED BY 254. ÔHIS MENU IS NOT MAINTAINED FOR FILES BEING COPIED TO THE ÃÂÍ-ÄÏÓ DISK FROM AN ÍÓ-ÄÏÓ DISK. ÙOU'LL HAVE TO RE-EXECUTE THE ÄIRECTORY INSTRUCTION TO GET AN UPDATED LISTING. ÔHE "Ä" (DIRECTORY) COMMAND HAS LOCAL EFFECT WHEN IN THIS MENU. ÔHE ÃOMMODORE-ÄÏÓ DIRECTORY WILL BE LOADED FROM THE CURRENT ÃÂÍ DEVICE NUMBER. ÎOTE THAT IN ORDER FOR THIS TO WORK, THE ÃÂÍ DEVICE MUST BE NUMBER EIGHT OR GREATER (A DISK DRIVE). ÏRIGINALLY, THE SUBROUTINE FOR THIS COMMAND WAS WRITTEN USING ONLY ÇÅÔ#'S FROM THE DISK AND WAS VERY SLOW. ÉT WAS MODIFIED, HOWEVER, TO CALL A MACHINE LANGUAGE SUBROUTINE TO READ THE INFORMATION FOR A DIRECTORY ENTRY FROM THE DIRECTORY LISTING, AND HENCE THE SUBROUTINE NOW OPERATES AT A TOLERABLE SPEED. ÔHE "Ã" (COPY) COMMAND ALSO HAS A DIFFERENT MEANING WHEN IN THIS MENU. ÉT MEANS TO COPY THE SELECTED ÃÂÍ FILES TO THE ÍÓ-ÄÏÓ DISK. ÓEE DETAILS BELOW. ÔHE COPY ÃÂÍ FILES ("Ø") COMMAND IS USED TO COPY THE FILES IN THE ÃÂÍ-ÄÏÓ MENU TO ANOTHER ÃÂÍ-ÄÏÓ DISK UNIT. ÓELECT THE FILES YOU WANT TO COPY AND THEN PRESS Ø. ÙOU WILL THEN BE ASKED WHAT DEVICE NUMBER YOU WANT TO COPY THE FILES TO. ÔHE DEVICE CAN BE ANOTHER DISK DRIVE OR ANY OTHER DEVICE (EXCEPT THE KEYBOARD). ÕSING DEVICE NUMBER 0 DOES NOT MEAN THE "NULL" DEVICE AS IT DOES WITH COPYING ÍÓ-ÄÏÓ TO ÃÂÍ. ÉF YOU ARE COPYING TO A DISK DEVICE AND THE FILE ALREADY EXISTS, THEN YOU WILL BE ASKED IF YOU WISH TO OVERWRITE THE FILE. ÙOU CANNOT COPY TO THE SAME DISK UNIT. ÁLSO, ALL FILES ARE COPIED IN BINARY MODE (REGARDLESS OF WHAT TRANSLATION YOU HAVE SELECTED FOR A FILE). ÔHE COPY ÃÂÍ FILES COMMAND WAS INCLUDED SINCE ALL OF THE LOW-LEVEL GEAR NEEDED TO IMPLEMENT IT (SPECIFICALLY "COMMIEÉN" AND "COMMIEÏUT" BELOW) WAS ALSO REQUIRED BY OTHER FUNCTIONS. ÔHIS COMMAND CAN BE VERY CONVENIENT WHEN WORKING WITH ÒÁÍÄÏÓ. ÆOR EXAMPLE, IF YOU ONLY HAD A 1571 AS DEVICE 8 BUT YOU HAVE A ÒÁÍ EXPANDER AND HAVE INSTALLED ÒÁÍÄÏÓ AS DEVICE 9, THEN YOU WOULD COPY ÍÓ-ÄÏÓ FILES TO ÒÁÍÄÏÓ USING THE ÍÓ-ÄÏÓ MENU, AND THEN YOU WOULD GO TO THE ÃOMMODORE-ÄÏÓ MENU ("/"), READ THE DIRECTORY, SELECT ALL FILES, INSERT AN ÃOMMODORE-ÄÏÓ DISKETTE INTO YOUR 1571, AND THEN USE "Ø" TO COPY FROM THE ÒÁÍÄÏÓ DEVICE TO THE 1571. ÔHE REMOVE COMMAND ("Ò") DOES NOT WORK FOR THIS DIRECTORY. ÙOU CAN ÓÃÒÁÔÃÈ YOUR ÃÂÍ-ÄÏÓ FILES YOUR DAMN SELF. 2.5. ÃÏÐÙ ÃÂÍ-ÄÏÓ ÔÏ ÍÓ-ÄÏÓ ÂEFORE YOU CAN COPY SELECTED ÃÂÍ-ÄÏÓ FILES TO AN ÍÓ-ÄÏÓ DISK, THE ÍÓ-ÄÏÓ DISK DIRECTORY MUST BE ALREADY LOADED (FROM THE ÍÓ-ÄÏÓ MENU). ÔHIS IS REQUIRED SINCE THE DIRECTORY AND ÆÁÔ INFORMATION ARE KEPT IN MEMORY AT ALL TIMES DURING THE EXECUTION OF THIS PROGRAM. ×HEN YOU ENTER COPY MODE, THE SCREEN WILL CLEAR AND THE NAME OF EACH SELECTED FILE IS DISPLAYED AS IT IS BEING COPIED. ÉF AN ERROR IS ENCOUNTERED ON EITHER THE ÍÓ-ÄÏÓ OR ÃÂÍ-ÄÏÓ DRIVE DURING COPYING, AN ERROR MESSAGE WILL BE DISPLAYED AND COPYING WILL CONTINUE (AFTER YOU PRESS A KEY FOR ÍÓ-ÄÏÓ ERRORS). ÐLEASE NOTE THAT NOT A WHOLE LOT OF EFFORT WAS PUT INTO ERROR RECOVERY. ÔO GENERATE AN ÍÓ-ÄÏÓ FILENAME FROM AN ÃÂÍ-ÄÏÓ FILENAME, THE FOLLOWING ALGORITHM IS USED. ÔHE FILENAME IS SEARCHED FROM RIGHT TO LEFT FOR THE LAST "." CHARACTER. ÉF THERE IS NO "." CHARACTER, THEN THE ENTIRE FILENAME, UP TO 11 CHARACTERS, IS USED AS THE ÍÓ-ÄÏÓ FILENAME. ÃHARACTERS 9 TO 11 WILL BE USED AS THE EXTENSION. ÉF THERE IS A "." CHARACTER, THE ALL CHARACTERS BEFORE IT, UP TO EIGHT, WILL BE USED AS THE ÍÓ-ÄÏÓ FILENAME AND ALL CHARACTERS AFTER THE FINAL ".", UP TO THREE, WILL BE USED AS THE ÍÓ-ÄÏÓ EXTENSION. ÔHEN, THE NEWLY GENERATED ÍÓ-ÄÏÓ FILENAME IS SCANNED FOR ANY EXTRA "." CHARACTERS OR EMBEDDED SPACES. ÉF ANY ARE FOUND, THEY ARE REPLACED BY THE UNDERSCORE CHARACTER ("_", WHICH IS THE BACKARROW CHARACTER ON A ÃOMMODORE DISPLAY). ÆINALLY, ALL TRAILING UNDERSCORES ARE REMOVED FROM THE END OF BOTH THE FILENAME AND EXTENSION PORTIONS OF THE ÍÓ-ÄÏÓ FILENAME. ÁLSO, ALL CHARACTERS ARE CONVERTED TO LOWERCASE ÐÅÔÓÃÉÉ (WHICH IS UPPERCASE ÁÓÃÉÉ) WHEN THEY ARE COPIED INTO THE ÍÓ-ÄÏÓ FILENAME. ÎOTE THAT IF THE ÃOMMODORE FILENAME IS NOT IN THE 8/3 FORMAT OF ÍÓ-ÄÏÓ, THEN SOMETHING IN THE NAME MAY BE LOST. ÓOME EXAMPLES OF FILENAME CONVERSION FOLLOW: ÃÂÍ-ÄÏÓ ÆÉÌÅÎÁÍÅ ÍÓ-ÄÏÓ ÆÉÌÅÎÁÍÅ ---------------- --------------- "LRR.BIN" "LRR.BIN" "LRR.128.BIN" "LRR_128.BIN" "HELLO THERE.TEXT" "HELLO_TH.TEX" "LONG_FILENAME" "LONG_FIL.ENA" "FILE 1..3.S__5" "FILE_1.S" ÉT WOULD HAVE BEEN TIME-CONSUMING TO HAVE THE PROGRAM SCAN THE ÍÓ-ÄÏÓ DIRECTORY FOR A FILENAME ALREADY EXISTING ON THE DISK, SO ÌÒÒ WILL PUT MULTIPLE FILES ON A DISK WITH THE SAME FILENAME WITHOUT COMPLAINING. ÔHIS ALSO GETS RID OF THE PROBLEM OF ASKING YOU IF YOU WANT TO OVERWRITE THE OLD FILE OR GENERATE A NEW NAME. ÈOWEVER, IN ORDER TO RETRIEVE THE FILE FROM DISK ON AN ÍÓ-ÄÏÓ MACHINE, YOU WILL PROBABLY HAVE TO USE THE ÒÅÎÁÍÅ COMMAND TO RENAME THE FIRST VERSIONS OF THE FILE ON THE DISK TO SOMETHING ELSE SO ÍÓ-ÄÏÓ WILL SCAN FURTHER IN THE DIRECTORY FOR THE LAST VERSION OF THE FILE WITH THE SAME FILENAME. ÔHERE IS NO RENAME COMMAND IN ÌÒÒ BECAUSE É NEVER THOUGHT OF IT IN TIME. ÉT WOULD HAVE BEEN FAIRLY EASY TO PUT IN. ÔHE DATE GENERATED FOR A NEW ÍÓ-ÄÏÓ FILE WILL BE SET FROM THE DEFAULT TIME. ÔHE PHYSICAL COPYING OF THE FILE IS DONE COMPLETELY IN MACHINE LANGUAGE AND NOTHING IS DISPLAYED ON THE SCREEN WHILE THIS IS HAPPENING, BUT YOU CAN FOLLOW THINGS BY LOOKING AT THE BLINKING LIGHTS AND LISTENING FOR CLICKS AND GRINDS. ÓINCE THE ÆÁÔ AND DIRECTORY ARE MAINTAINED IN ÒÁÍ DURING THE ENTIRE COPYING PROCESS AND ARE ONLY FLUSHED TO DISK AFTER THE ENTIRE BATCH OF FILES ARE COPIED, COPYING IS MADE MORE EFFICIENT, SINCE THERE WILL BE NO COSTLY SEEK BACK TO TRACK 0 AFTER WRITING EACH FILE (LIKE ÍÓ-ÄÏÓ DOES). ÉF YOU HAVE A NUMBER OF SMALL FILES TO COPY, THEN THEY WILL BE KNOCKED OFF IN QUICK SUCCESSION, FASTER THAN MANY ÍÓ-ÄÏÓ MACHINES WILL COPY THEM. ÔO SIMPLIFY THE IMPLEMENTATION, THE CURRENT TRACK OF DISK BLOCKS FOR WRITING IS NOT MAINTAINED LIKE IT IS FOR READING. ÁLSO, A WRITING INTERLEAVE OF 1:1 IS USED FOR A 1571, WHICH IS NOT OPTIMAL. ÈOWEVER, SINCE WRITING IS SUCH A SLOW OPERATION ANYWAY, AND SINCE THE 1571 IS PARTICULARLY BAD BY INSISTING ON VERIFYING BLOCKS, NOT MUCH MORE OVERHEAD IS INTRODUCED THAN IS ALREADY PRESENT. ÁN INTERESTING NOTE ABOUT WRITING ÍÓ-ÄÏÓ DISKS IS THAT YOU CAN TERMINATE ÌÒÒ IN THE MIDDLE OF A COPY (WITH ÓÔÏÐ+ÒÅÓÔÏÒÅ) OR IN THE MIDDLE OF COPYING A BATCH OF FILES, AND THE ÍÓ-ÄÏÓ DISK WILL REMAIN IN A PERFECTLY CONSISTENT STATE AFTERWARDS. ÔHE STATE WILL BE AS IF NONE OF THE FILES WERE COPIED. ÔHE REASON IS THAT THE CONTROL INFORMATION (THE ÆÁÔ AND DIRECTORY) IS MAINTAINED INTERNALLY AND IS FLUSHED ONLY AFTER COPYING IS ALL COMPLETED. ÂUT DON'T TERMINATE ÌÒÒ WHILE IT IS FLUSHING THE CONTROL INFORMATION. ÈERE IS A TABLE OF COPYING SPEEDS FOR COPYING TO 1571, 1581, AND ÃÍÄ ÆÄ-4000 DISK UNITS WITH ÁÓà AND ÂÉÎ TRANSLATION MODES. ÁLL FIGURES ARE IN BYTES/ SECOND, WHICH INCLUDES BOTH READING THE BYTE FROM A Ã= DISK AND WRITING IT TO THE ÍÓ-ÄÏÓ DISK. ÔHE AVERAGE SPEED FOR EITHER THE READ OR WRITE OPERATION INDIVIDUALLY WILL BE TWICE THE SPEED GIVEN BELOW. ÔHESE RESULTS WERE OBTAINED FROM COPYING A 156,273 BYTE TEXT FILE (THE TEXT OF Ã= ÈACKING ÉSSUE #4). ÆÒÏÍ \ ÔÏ: ÆÄ-BIN ÆÄ-ASC 81-BIN 81-ASC 71-BIN 71-ASC --------+ ------ ------ ------ ------ ------ ------ ÒÁÍÌINK Ü 2,332 2,200 2,332 2,200 1,594 1,559 ÒÁÍÄÏÓ Ü 1,070 1,053 1,604 1,600 1,561 1,510 ÆÄ4000 Ü - - 1,645 1,597 1,499 1,464 ÊÄ1581 Ü 1,662 1,619 - - 1,474 1,440 ÊÄ1571 Ü 1,050 1,024 953 933 - - ÔHESE FIGURES ARE FOR TRANSFER SPEED ONLY, NOT COUNTING THE COUPLE OF SECONDS OF OPENING FILES AND FLUSHING THE DIRECTORY. ÎOTE THAT ALL MY PHYSICAL DRIVES ARE ÊIFFYÄÏÓ-IFIED, SO YOUR PERFORMANCE MAY BE SLOWER. É AM AT A LOSS TO EXPLAIN WHY AN ÆÄ-4000 IS SO MUCH SLOWER THAN A 1581 FOR COPYING FROM A ÒÁÍÄÏÓ FILE, BUT THE SAME SPEED OR BETTER FOR COPYING FROM ANYTHING ELSE. ---------------------------------------------------------ÅND-OF-ÄOCUMENT------