The “Bleepload Trigger” is an extra piece of data attached to the last “Bleepload” file in a chain that provides instructions on the data deciphering process and on the code to execute after such process completes.
So far TAPClean’s documentation wasn’t providing any further details about the structure of the 8 bytes in a trigger segment, so I just filled in those details:
2 bytes : Start address of cipher (LSBF)
2 bytes : Start address of RAM to decipher (LSBF)
2 bytes : End+1 address of RAM to decipher (LSBF)
2 bytes : Execution address (LSBF, CPU jumps here after block is deciphered)
Furthermore now TAPClean 0.37-pre9 decodes trigger blocks accordingly. As example, from “Bubble Bobble” we have:
Seq. no.: 210
File Type: BLEEPLOAD TRIGGER
Location: $52AA7 -> $52AA7 -> $52ADF -> $532DE
LA: $0000 EA: $0000 SZ: 0
Pilot/Trailer Size: 0/2040
Read Errors: 0
Unoptimized Pulses: 0
- Cipher Address : $0200
- Start Address : $1F00
- End Address : $7B00
- Exe Address : $4800
For the time being, I am not extracting the contents of triggers to PRG files, hence not computing their CRC-32 value, in order not to change the overall CRC-32 value for known tape images. However, I shall do so at some point in future.
What I am doing at the moment is to also flag read errors if they occur in a trigger block, which wasn’t the case before the rewrite of the “Bleepload” scanner.
Finally, here’s some code from “Bubble Bobble” (within the last “Bleepload” file) that reads in the trigger and uses it for data deciphering and code execution:
BBF02 JSR S1DA6 ; Read byte
STA $0073,Y ; Store in zero page, $73-$7A
BNE BBF02 ; Loop on all 8 bytes in a trigger
BBF38 LDA ($75),Y
EOR ($A8),Y ; Use the first page of the loader to decrypt
EOR ($A8),Y ; And the second page too
STY $7B ; Save Y
EOR ($73),Y ; Use the cipher too
LDY $7B ; Restore Y
... ; Loader's source code leftover
JMP ($0079) ; Use the execution address
BTW, it’s in between two segments of code in the above listing that I found some leftover of the loader’s source code the other day.