Sm64config.txt
Unlike a JSON or XML file, sm64config.txt is a plain text list of arguments. Each line is a separate flag. Lines starting with # are ignored (comments).
Here is a typical default configuration:
# SM64 Config File
--windowed
--resolution 1280 720
--framerate 30
--no-audio
# --skip-intro
# --enable-texture-dumping
Let’s break down the essential parameters. sm64config.txt
The decompilation codebase (written in C) loads this file during engine initialization. Typical loading routine:
Example pseudo-C from sm64ex:
struct Config int window_width; int window_height; int fullscreen; int vsync; int framerate_limit; // ... etc. gConfig;
void config_load(void) FILE* file = fopen("sm64config.txt", "r"); if (!file) return; char line[256]; while (fgets(line, sizeof(line), file)) char key[64], val[64]; if (sscanf(line, "%63s = %63s", key, val) == 2) if (strcmp(key, "window_width") == 0) gConfig.window_width = atoi(val); // ... etc. fclose(file);
audio_enabled = 1 master_volume = 100 music_volume = 80 sfx_volume = 80
key_left = A key_right = D key_up = W key_down = S key_a = J key_b = K key_z = L key_start = Enter key_c_up = I key_c_down = K key_c_left = J key_c_right = L Unlike a JSON or XML file, sm64config
It’s crucial to understand:
The original Super Mario 64 (Nintendo 64) never used sm64config.txt.
This file exists only in decompilation-based PC ports. Official Nintendo emulation releases (Switch Online, Wii Virtual Console) do not have or need such a config.
Therefore, sm64config.txt is a community-added feature for flexibility, akin to .ini files in many PC games of the late 1990s/early 2000s. Let’s break down the essential parameters