Loading...
Searching...
No Matches
main.c File Reference

Tracker music playback with transport controls via SNESMOD. More...

#include <snes.h>
#include <snes/snesmod.h>
#include <snes/text.h>
#include "soundbank.h"

Functions

int main (void)
 Entry point — initialize audio, display controls, run transport loop.
 

Detailed Description

Tracker music playback with transport controls via SNESMOD.

Plays an Impulse Tracker (.it) module through the SPC700 sound processor using the SNESMOD library. Provides transport controls: play, stop, pause/resume, volume up/down, and fade out.

Ported from PVSnesLib "music" example by alekmaul.

SNES Concepts
  • SPC700 audio: separate coprocessor with 64 KB audio RAM
  • SNESMOD workflow: init → setSoundbank → loadModule → play
  • Per-frame snesmodProcess() to stream pattern data to SPC700
  • Module volume and fade control
What to Observe
  • Music plays immediately on boot
  • A=play, B=stop, X=pause/resume, L/R=volume, START=fade out
Modules Used
console, sprite, dma, input, background, text
See also
snesmod.h

Function Documentation

◆ main()

int main ( void  )

Entry point — initialize audio, display controls, run transport loop.

Returns
Never returns