OpenSNES
Modern Open-Source SNES Development SDK
Loading...
Searching...
No Matches
main.c File Reference

Drum loop from the DSP noise generator — no samples at all. More...

#include <snes.h>
#include <snes/apu.h>

Macros

#define SPC_BASE   0x0200

Functions

int main (void)

Variables

u8 spc_image []
u8 spc_image_end []

Detailed Description

Drum loop from the DSP noise generator — no samples at all.

Port of krom (Peter Lemon)'s PlayNoise demo (PeterLemon/SNES, SPC700/PlayNoise). The S-DSP has a built-in white-noise source: set a voice's NON flag and the voice plays noise instead of a sample. Each drum of the loop (kick, closed hi-hat, open hi-hat, snare) is nothing but a noise clock (FLG bits 0-4), an ADSR envelope, and a key-on — the whole kit ships zero bytes of sample data.

ROM mode: LoROM (project default).

SNES Concepts
  • The S-DSP noise generator (NON + the FLG noise clock)
  • ADSR envelopes as percussion design (attack/release = drum type)
  • FIR echo (ESA/EDL/EFB/FIR0) for the drum room
  • The apu module upload path (apuWaitBoot/apuUpload/apuExecute)
What to Observe
A four-hit drum bar loops: kick, closed hat, open hat, snare. Validation oracle: luna –audio-out (see README).
Modules Used
console, apu
See also
https://github.com/PeterLemon/SNES — original demo
player.spc700.asm — the whole kit

Macro Definition Documentation

◆ SPC_BASE

#define SPC_BASE   0x0200

Function Documentation

◆ main()

int main ( void )

Variable Documentation

◆ spc_image

u8 spc_image[]
extern

◆ spc_image_end

u8 spc_image_end[]