Instructions | IRQ Turbo for Commodore 264 series
IRQ-based turbo tape routine which can allow M/C programs to run in the background while the main program is loading.
Approximate loading speeds: Minimum: 208 bytes/second (all bits=0) Maximum: 407 bytes/second (all bits=1)
Initial usage:
Load and RUN the IRQ Turbo program to activate the turbo saver routine.
Turbo saving is accessed by the SAVE command using the following device numbers:
7: Saves program with KERNAL header. 6: Saves program only (no KERNAL header). This will normally be used to save the program which follows the background program on the tape.
When saving in BASIC, if the secondary address 1 is specified, the program will automatically run when loaded. If the secondary address 4 is specified, then customised start and end memory locations can be specified, with an optional execution address.
WARNING: It is not recommended to load or save BASIC programs when a GRAPHIC bitmap area is allocated.
From BASIC: SAVE"[name]",7 Save program in turbo format with KERNAL header.
SAVE"[name]",7,1 As above, except the program will automatically RUN when loaded.
SAVE"[name]",6 Save program without KERNAL header.
SAVE"[name]",6,1 As above, except the program will automatically RUN when loaded.
SAVE"[name]",[device 7 or 6],4,[decimal start address],[decimal end address](,[decimal execution address]) Saves a program from a specific memory area. The execution address is optional. WARNING: Do not substitute decimal addresses with functions (e.g. DEC), as this can corrupt the filename.
LOAD"[name]",6(,1) Loads data saved in turbo tape format. If secondary address 1 is added, the screen will stay on during loading.
VERIFY"[name]",6(,1) Verifies memory against turbo tape. If secondary address 1 is added, the screen will stay on during verification.
From TEDMON: S"[name]",[device 7 or 6],[hex start address],[hex end address](,[hex execution address]) L"[name]",6 V"[name]",6
Demonstration example
A conversion of 'Invade-A-Load' is included as a demonstration of a background program running during loading.
To save a program using Invade-A-Load as a background program, use the following steps:
1. Load and run the IRQ Turbo program
2. Load "INVADE-A-LOAD"
3. Save Invade-A-Load as follows: SAVE"[filename]",7,1 The filename should relate to the name of the main program to be saved later.
4. After saving Invade-A-Load to tape, load the main program to be saved. To avoid overwriting Invade-A-Load during later loading, the max program sizes are: 16K machines: 7K 32K machines: 23K 64K machines: 56K
5. Save the main program to tape after Invade-A-Load with SAVE"",6,1
Guidelines for background programs
Here are some guidelines on the limitations of background programs, and how the program should co-exist with the loader routine.
BASIC programs cannot be used as a background program, but can be used to set up a background program.
To load another program from BASIC (with no background program running), use: LOAD"[name]",6 Load turbo data saved without a KERNAL header. Screen is turned off. LOAD"[name]",6,1 As above, except the screen is left as is. WARNING: If a load, save or verify is made with device 1 (KERNAL tape loader), the turbo loader routines will be overwritten.
Decompression routines should be used with caution, as some routines (e.g. Exomizer) will overwrite the loader routines.
Interrupts must not be disabled.
Decimal mode can be used.
The following memory/IO locations must not be changed by background programs during loading: $A7 $D1-$D8 $F5 $0332-$03F1 $065E-$06EB $FF04-$FF05 (Timer 3) $FF07 bit 6 Writing a 1 to $FF09 bit 6 $FF0A, except bit 0 $FF3E (no ROM routines) $FFFE-$FFFF
The main program will not begin loading until it is told to do so by the background program. To activate the loader routine to load the main program, use the following:
JSR $065E To specify a filename, set $AB with the filename length (zero if not required), and set the $AF-$B0 pointer to the location of the filename text. If the contents of $AD is zero, the screen is turned off; otherwise the screen is left as is.
Because of the way the loader operates, background programs cannot continue running without data being read from the tape. Data will not be read until a valid header + matching filename (if specified) is found. After activating the loader, $A6 holds the loader status. If it is zero, the loader is not yet ready; otherwise, the header has been found and data is being loaded.
An example of activating a background program is as follows:
LDA #$00 STA $AB ;no filename STA $AD ;turn screen off when we start the loader JSR $065E ;start loader loop LDA $A6 BEQ loop ;wait for the loader to become ready background program commences...
|
|