Mario 64's Sound engine is better than the game itself

Share

Summary

This video delves into the surprisingly complex and powerful sound engine of Super Mario 64. It reveals how sound effects are composed like music, saving cartridge space, and how dynamic elements like pitch changes and intricate character voices were achieved through ingenious programming. The video also explains how the sound engine was capable of far more than what was used in the original game, essentially functioning as a simplistic programming language that allowed for creative hacks and even full game implementations within its structure.

Highlights

The Mario 64 Sound Engine: A Hidden Powerhouse
00:00:00

The Mario 64 sound engine is incredibly advanced, capable of running complex sequences like an entire Tetris game as a sound effect. The engine, originally over 10,000 lines of code, plays audio at 240 frames per second, eight times faster than the game itself. This robust engine and its soundbank format were universally adopted across nearly all official N64 games, allowing for extensive sound manipulation and editing. Although its full capabilities were largely underutilized in Mario 64, it laid the groundwork for dynamic audio experiences.

Sound Effects as Composed Music
00:03:06

Mario 64's sound effects function like mini-music sequences, utilizing the same playback code as the game's music. The game can play up to three sequences simultaneously: level music, jingles, and sound effects. Sound effects are not merely audio files but composed single-channel music sequences, allowing for adjustments in volume, panning, and tempo. This innovative approach significantly reduces storage space on the cartridge, as sound effects account for 26.5% of the game's storage. Many complex sound effects are built from simpler sounds, saving memory by sharing instruments.

Self-Modifying Code and Dynamic Audio
00:07:31

The sound engine employs self-modifying code to achieve dynamic audio effects, such as the increasing pitch of red coins. This involves the sound effect file manipulating its own pitch-shifting parameters based on game events. Similar techniques are used for room echoes, secret-revealing sounds, and even bird calls. Charles Martinet, Mario's voice actor, voiced multiple characters beyond Mario by having his voice clips remixed and reused for various in-game entities like Bowser, the Bully, and even certain sound effects. This creative reuse further optimized cartridge space.

The Mysterious "Boo-Loth" Sound
00:10:11

The rare and eerie 'Boo-Loth' sound in Big Boo's Haunt is actually a bug related to the wind sound effect. The wind sound has multiple layers, one of which gets permanently assigned to a continuous note. When exiting the mansion, the game's sound function stops, but a two-frame delay before fully disabling the sound causes the first layer to incorrectly play the 'Boo-Loth' instrument at a lower pitch, creating the creepy effect. This highlights how complex interactions within the sound engine can lead to unexpected, yet memorable, glitches.

Advanced Sound Scripting and its Limitations
00:12:03

The intricate sound playback system allows for sophisticated dynamic music, as demonstrated by Sauron's credits theme remix that adapts to different levels. To overcome the 16-channel limit of the tracker format, a clever trick is employed where the sequence has synchronization points, allowing only two of eight themes to run at any given time. This also explains why jingles play when skipping sections or falling: they cover up the technical limitation of not having a sequence in a ready state. The sound I/O system, essentially a simplistic programming language, enables this complex scripting. While technically 'Turing complete', allowing for complete programs like Tetris to be implemented, its simplicity makes such tasks unreasonable.

Engine Rewrite and Future Plans
00:15:25

The video creator successfully rewrote the Mario 64 sound engine, reducing its size from 56 kilobytes to under 12 kilobytes for improved memory and performance in their mods. This rewrite prioritizes essential music playback functionality over the complex programming language capabilities of the original engine. The creator aims to replace all of Nintendo's original code in Mario 64 to develop a fully custom engine, offering significant memory and performance benefits and the ability to pivot to their own intellectual property if necessary.

Recently Summarized Articles

Loading...