Full conclusion on this:
This is a bytebeat1k entry in disguise, meaning most of the ROM is unused.
It's written in C, and heavily based upon the principle of Tom Whitwells Turing Machine for Modular Synthesizers. You can compile it with cc65.
#include <atari2600.h>
#define KERNAL_T1024 17
const char v[] = "TITAN SUCKS!!!";
unsigned char lfsr[4]; // two 16-Bit shift registers, startup code should initialize these to all zeroes
unsigned char lo, hi, i, j; // more variables than necessary
void main(void)
{
for (;;) {
i = ((lfsr[1] & 224) == (lfsr[3] & 224)); // Decide which LFSR to modify
lo = (lfsr[2 * i] & 128) >> 7; // most significant bit of bottom 8-Bit part
lfsr[2 * i] = lfsr[2 * i] << 1;
hi = (lfsr[2 * i + 1] & 128) >> 7; // most significant bit of top 8-bit part
lfsr[2 * i + 1] = lfsr[2 * i + 1] << 1;
lfsr[2 * i + 1] |= lo; // join bottom and top
!(RIOT.swchb & (1 << i)) ? (lfsr[2 * i] |= hi ^ 1) : (lfsr[2 * i] |= hi); // If the corresponding push button is pressed the feedback is inverted
// Lowest 4 bits determine waveshape
// Next 4 determine volume
// Next 5 determine frequency division
TIA.audc0 = lfsr[0] & 15;
TIA.audf0 = lfsr[1] & 31;
TIA.audv0 = (lfsr[0] >> 4);
TIA.audc1 = lfsr[2] & 15;
TIA.audf1 = lfsr[3] & 31;
TIA.audv1 = (lfsr[2] >> 4);
// Top 3 of the current LFSR determine Note length/delay
for (j = lfsr[2 * i + 1] & 224; j > 0; --j) {
RIOT.t1024t = KERNAL_T1024;
while (RIOT.timint == 0) {}
}
}
}