home *** CD-ROM | disk | FTP | other *** search
/ ABBUC Magazin 46B / ABBUC_Magazin_46_1996_ABBUC_Side_B.atr / btape.arc / BTAPE3.DOC < prev    next >
Text File  |  1996-01-03  |  11KB  |  1 lines

  1. ¢        Configuration file¢¢  The next file (after the DOS) must be a configuration file. This file must be named "CONFIG.B", and it is a text-file that contains the commands for initializing the system after boot. (Like the "STARTUP.BAT" file on disk.) This file should be shorter than 500 bytes - otherwise an "Out of memory" error may occur with the internal Atari-Basic active. You can create the configuration file simply by copying it from the "E:" device - use the command "COPY E: B:CONFIG.B", and then type the contents of the file (use <CONTROL>+<3> to finish).¢  The configuration file is interpreted by the Boot loader. This is necessary to allow reading of high-speed tape files also before installing the "BTAPE" command, but there are also some limits: The configuration file may contain only resident commands, and the commands "COPY", "DATE", and "TIME". No commands in the configuration file may be started from other devices than the high-speed tape system (but parameters may work with other devices too). The used commands may not use memory above the address $9000 (MEMHI), because the Boot loader itself uses this memory.¢  It may occur, that a tape-file must be used as a parameter of some command before installing the "BTAPE" driver. In this case, you should call the tape-files as "Q:filename" - the request will be then executed by internal routines of the Boot loader. The device handler "Q:" exists only while the configuration file is executed, and it can only read tape files. When the configuration file is finished, the "Q:" handler disappears together with the Boot loader. The wildcards are supported by "Q:", but you can't use it with the "COPY" command (in this case, COPY will try to get the actual filename using the "DIR" function - not supported by "Q:").¢  When the last line of configuration file begins with a "+" character, the rest of the line will be executed in the CP. In this way, you can automatically start any program after boot, or run a batch file (previously copied to a Ramdisk) to continue with the initialization of the system.¢¢  After the configuration file, you should record all the files necessary for executing the configuration. (That is for each line the program-file, and also any files used as parameters.)¢¢  Example: To simply boot a DOS and BTAPE, the configuration file "CONFIG.B" will look like this:¢¢BTAPE /O¢¢  In this case, you should record the following files to the boot-tape:¢¢The Boot loader (see "TAPEBOOT")¢XBW130.DOS (or other compatible DOS)¢CONFIG.B (see above)¢BTAPE.COM¢¢  Another example: Boot a DOS, install RAMDISK (on the Atari 130XE computer) and then BTAPE. Place the "BTAPE.COM" file into the Ramdisk to allow free installing/removing of BTAPE depending on memory usage of application programs. The configuration file will be following:¢¢RAMDISK 1F Q:B_130XE.RD¢COPY Q:BTAPE.COM D1:¢+D1:BTAPE /B¢¢  You should record the following files:¢¢The Boot loader (see "TAPEBOOT")¢XBW130.DOS (or other compatible DOS)¢CONFIG.B (see above)¢RAMDISK.COM¢B_130XE.RD¢COPY.COM¢BTAPE.COM¢¢¢        LOADING GAMES¢¢  Under B-TAPE, you can load almost any games (and other programs like demos etc.) as long as they are stored in a binary file. Every programs started under a DOS or Micro-DOS are compatible, and also many tape-versions uses this format (the games with a short loader, mostly displaying a "!" in the bottom-right corner of the screen - you should copy only the main file without of the loader).¢¢¢        The MICRO-B command¢¢  Some games may be started under BW-DOS, but mostly the DOS is too long to fit into memory together with the game. With a disk drive, we are using different "Micro-DOS" programs in this case - the same tool for tape is called "MICRO-B"¢¢MICROB (C|T|S)¢        (External command)¢  This command records the MICRO-B loader to tape. With the parameter "C" it creates a common boot-file (in the "C:" format), that may be loaded simply by holding down the <START> key during power-on. The "T" parameter gives the same loader in the format "TURBO 2000" - a format that is popular here in czech republic. With the parameter "S", this command will directly start the MICRO-B loader.¢¢¢        Using the MICRO-B loader¢¢  The MICRO-B loader can only start a game or another program of the same type. No more support (like access to tape-files) is provided.¢  The loader is easy to use. After starting it, any file in the B-TAPE format is excepted from tape. When any block is found, the program displays the filename, and asks you if you wish to load that file. When you answer "N", another block will be searched, otherwise the file will load.¢¢  When started, the MICRO-B loader executes a few actions to provide the best compatibility with game-programs. (Most of these actions are the same as under "Micro-SpartaDOS".) First, any DOS will be removed, and the Atari-Basic will be switched off (no need to hold down <OPTION> while booting). Then, MICRO-B clears the memory, and sets a special mode for the <RESET> key, so most of the games will not be "reset-proof" under MICRO-B (the number of necessary "OFF-ON" switchings is greatly decreased).¢¢  The MICRO-B loader should load most of the file-based games. The only problem may occur with MEMLO - with MICRO-B version 1.0 the MEMLO value is $CAD.¢¢¢        The BINCOPY command¢¢  While loading games, demos etc., a problem with length of the gaps between blocks may occur. Many programs of the mentioned type contains different intros or depacking routines (for example the ones generated by "Super Packer"), that are executing between loading. This mostly causes the recorder to overrun the begin of next block, and so the user must rewind tape a bit. Since this is really boring, the programs with such intros or depacking routines should be copied to tape with the "BINCOPY" command.¢¢BINCOPY file¢        (External command)¢  This program is very similar to "COPY". It copies allways only one file, and the destination is allways "B:" - that's why only one parameter (source) is required. The limit of file-length while copying directly from tape to tape is the same as with "COPY".¢  The command "BINCOPY" may copy any files, but the reason why it was written is copying binary program files, especially games. In this case, the "BINCOPY" program checks the file-structure, and generates a long gap after every blocks, where a kind of intro etc. may occur (where an INIT vector is found). The games copied in this way are loading with no problems, never mind that intros etc. are present, and the loading-time is not increased like with the mode of long gaps.¢¢¢        TECHNICAL INFO¢¢  This chapter gives the necessary information for using the functions of BTAPE in application programs. It was written for programmers - if you don't understand, you can skip this chapter.¢¢¢        Functions of the "B:" handler¢¢  The main part of the B-TAPE system is handler "B:". This handler can open only one file at a time. No physical errors are returned, every actions like searching for the correct file, reading retries etc. are supported by the handler itself. You may only encounter errors 128, 138, 152, 161, 163, 166, or 168.¢¢  The "OPEN" function needs a filename in the same format, as with a disk drive (but without of path of course - the syntax is "B:name.ext"). The possible values of "aux1" and "aux2" (the second and third parameter of "OPEN" in Basic) are:¢¢aux1=4 - Reading a file. In this mode, it's also possible to change the position in file using NOTE and POINT functions.¢aux1=6 - Reading of directory. See "DIR" and "DIRS" commands for more info.¢aux1=8 - Recording a file.¢¢aux2=128 - Short gaps between blocks.¢aux2=64 - Double blocks.¢¢  Both the functions of "aux2" may be added together of course. These functions may be also selected by a parameter while installing the "BTAPE" command - in this case the "aux2" parameter have no effect (it is ORed with the settings done during installation).¢¢  A few functions more are available in the same syntax, as with a disk drive: NOTE (XIO 38), POINT (XIO 37), and binary load (XIO 40). The functions NOTE and POINT are only possible while reading a file.¢¢  The handler "B:" allows also access to incomplete files (for example when recording overrun a part of another file on tape). It's possible to read any block, that is readable for the "DIR" function.¢  The access to incomplete files is possible by executing OPEN and then immediately POINT. In this case, BTAPE searches directly the POINTed position.¢  Vieweing incomplete files is easiest with the command "DUMP". You'll need to search the first readable block with the "DIR" function, multiply the serial number of that block by 1008 (the length of a block), and use the result as a file-position for DUMP - you'll type "DUMP B:filename result". In the case that the last block of the file is missing, you'll need to abort reading with the <BREAK> key.¢¢¢        SIO-level access¢¢  Using the vector "LSIO" in the "COMTAB" table (see the DOS manual), you can call directly the read/write routines of BTAPE. It will not affect any function of the "B:" handler - you can even do it with a file open on "B:". On this level, the things like reading retries, sound signals etc. are not supported; only the reading routine is able to wait for the begin of a block. The routines simply return errors like 140 and 143 when a physical error occurs. The starts/stops of the tape recorder are fully sopported by BTAPE also on the SIO-level - just call the LSIO vector, and BTAPE will do it for you. On the SIO-level, the whole physical blocks are transfered - including the internal header-bytes (see later). Recording the sound signal "start of file" is not available on the SIO-level.¢  The use of BTAPE SIO-routines may be useful for example while creating a "comfortable" copier-software (handling two files with changing two tapes, verifying the tape etc.). Note that the used buffer may not be in the area of $4000-$7FFF, or above $C000. That's because the SIO-routines are time-critical, and so it's impossible to switch memory-banks for each byte (when BTAPE is installed in a Ramdisk bank, or under OS-ROM).¢  It's also possible to install new SIO-routines into the LSIO vector - such routines will be used also by the "B:" handler then. But you must know, that in this case the buffer used by the "B:" handler may be also in a bank, or under OS-ROM.¢¢  The settings before calling LSIO are following:¢¢DDEVIC  ($300) = $61 (B-TAPE)¢DUNIT   ($301) = 1 (unused)¢DCOMND  ($302) = "R" (read) or "W" (write)¢DSTAT   ($303) = 64 (read) or 128 (write)¢DBUFL/H ($304) = Address of buffer¢DTIMLO  ($306) = $FF (unused)¢DBYTL/H ($308) = Length of buffer¢DAUX1   ($30A) = 0 (unused)¢DAUX2   ($30B) = The value "aux2"¢¢  The length of standard B-TAPE blocks is $401. You can transfer blocks of any length, but then you can't access it with the "B:" handler of course. The value "aux2" have the same function as with OPEN in Basic (see above), but on the SIO-level the value is not affected by the parameter used while installing BTAPE. The speed is defined while installing BTAPE, and may not be changed (excepting that you call the "BTAPE" command again).¢  The handler "B:" is recording the first block of each file twice, with aux2=0 (to provide a long gap between the blocks). The next blocks are doubled (when necessary) using the corresponding aux2 value.¢¢