HF carriers
The idea behind these is to turn on a sound channel with a frequency so high that it can't possibly make it through your audio equipment but still increases the voltage levels. The highest frequencies are generated by the soprano channel, depending on the TV standard you're nailed to it gives you a little less then a EDIT:????kHz (to tired to figure it out ATM) pulse wave.
But as Viznut discovered 12 years ago you can program the tone–generating 8–bit shift registers down to the bit a bit. That's what these boosters do to get some pulses as short as 4 clock cycles. See also http://www.pelulamu.net/pwp/vic20/waveforms.txt
All HF carrier boosters use this routine to clear the bits in the soprano channel:
Code: Select all
boost0:
ldx #$7e ; Max. shift rate, channel turned off.
stx $900b
stx $900c
ldy #0
l: dey
bne -l
lda #$fe ; Max. shift rate channel turned on.
rts
Code: Select all
boost1:
jsr boost0
stx $900c
stx $900c
sta $900c
sta $900c
stx $900c
sta $900c
rts
Code: Select all
boost2:
jsr boost0
stx $900c
stx $900c
sta $900c
stx $900c
stx $900c
sta $900c
rts
Code: Select all
boost3:
jsr boost0
stx $900c
sta $900c
stx $900c
sta $900c
rts
The idea here is to run two channels, soprano and tenor at the same frequency but half a pulse apart from each other, so if one channel is off the other is on. Pretty much like phasing out each other but with the opposite result intended: a steady, strong signal. If things were that simple...
Code: Select all
boost4:
lda #$fe
pha
lda #$7e ; Clear tenor and soprano channel.
sta $900b
sta $900c
ldy #0
l: dey
bne -l
ldy #5
lda #$fd
sta $900c ; Soprano to half of its maximum frequency.
l: dey ; Wait 32 cycles (half a pulse).
bne -l
pla
sta $900b ; Tenor to highest frequency, same as soprano.
rts
The most simple solution
As beauty lies in simplicty or something like that... I guess this gives a >34kHz tone, doesn't it?
Code: Select all
boost5:
jsr boost0
sta $900c