The N64 had poor options for recorded audio. Cartridge space was tight, the CPU ran at 93 MHz, and Nintendo kept third parties away from the RSP vector co-processor for years. Most games built music from short samples like a tracker. Libdragon, the open source alternative to Nintendo’s library, has an ADPCM decoder and even an RSP-accelerated Opus decoder, but Opus is too slow to run during gameplay.
The answer came from a Game Boy Advance demo playing music at 70kbps. Aikku93 wrote a new codec for it, the Ultra Low Complexity Codec. ULC is a transform codec like MP3, but it’s full-band and skips entropy coding. Coefficients are stored in 4-bit nibbles, with some values reserved for zero fill, noise fill or a quantizer change. Unpacking a block takes about 150 lines of C.
Porting it to the N64 meant moving the IMDCT to the RSP, which has only 4096 bytes each of data and instruction memory. The result is about 1400 lines of MIPS assembly in 16-bit fixed point.…