TCB TRACKER
 
 
 
This is the source code for the commercially available TCB tracker.

Tracker = A program for creating music.

I 1990-1991 wrote TCB tracker. The main purpose for this tracker was to create music
for the demos we made. It started out just as a simple editor where you more or less had to
be a programmer to make it work. I released the software first trough a distributor
in England and later trough ATARI. The first distributor (MPH) still owes me
money.

I have to point this out, I could have made this tracker with all the fancy stuff you
see in the trackers of today. For example effects like Echo, flanger, fade in/out, but then you  use all CPU. I have never seen a real cool demo or game containing a mod where you have volume control and other special effects on the ATARI. My goal was to minimize the use of CPU but still be able to use sampled instruments instead of the very limited built in soundchip that sounds like a VIC-20.

When making a tracker on the ATARI you run into some problems.
 

First problem:

The ATARI ST does not have a DA!!

You solve that by using the three 4-bit volume controls inside the YM2149
(The soundchip). By combining the three channels you almost get the
performance of a 8-bit DA.

The routine is not that complicated, and from what I recall it looks something
like this:

a1=sample_data
a0=pointer_to_samp_tab

play_sample:
    moveq     #0,d0                         *clear the register
    move.b    (a1)+,d0                      *move one 8-bit sample to the register
    lsl.w     #3,d0                         *multiply the sample value by 8 since each entry
                                            *in the matrix is 8 bytes long
    move.l    (a0,d0.w),d1                  *move the first set of data into the register
    movep.l   d1,(ym2149_base_addr)         *movep is very suitable to use since
                                            *the YM chip is 8-bit
    move.l    4(a0,d0.w),(ym2149_base_addr) *last (third) 4 bit value
    rte
 
 

Second problem:

Well we now able to play one 8-bit channel but we need 4 “frequency independent” channels
Without using 100% CPU.

This is the basics of the routine:

ch1_pek=ch1_pek+the_frequency_for_ch1
ch2_pek=ch2_pek+the_frequency_for_ch2
ch3_pek=ch3_pek+the_frequency_for_ch3
ch4_pek=ch4_pek+the_frequency_for_ch4
data_to_play=*ch1_pek+*ch2_pek+*ch3_pek+*ch4_pek
data_to_play=data_to_play/4

data_to_play => DA

If you want that in raw MC68000 download the source and look for the
Timer A interrupt.

The routine is using about 20% CPU and that is not to bad actually. How do I know
that the routine is using 20%? Well that is simple to measure. You create a small program that has two components.

1 Vertical blank interrupt that displays and then resets a loop counter
2 a loop counter

Read the counter every VBL, now insert the player routine and read the counter.
By using simple mathematics you are now able to calculate the amount of %CPU%
the player rout uses.

TCB TRACKER internal v.34 external v.2.0s

One .mod for you to play



...::: AN COOL 97' :::...