Skip to content
A Super Nintendo audio unit emulator.
Branch: master
Clone or download
Latest commit 13c1752 Dec 11, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Remove reset API Dec 10, 2017
src Remove reset API Dec 10, 2017
test added test files Jun 13, 2015
.gitignore Removed test entries from .gitignore Oct 13, 2015
.travis.yml Added travis config Oct 13, 2015
Cargo.toml Update example to use cpal instead of emu Dec 10, 2017
LICENSE started repo May 24, 2015
README.md Update README.md Dec 11, 2017

README.md

snes-apu Build Status Crates.io Crates.io

A Super Nintendo audio unit emulator.

Description

This is a highly-accurate emulator for the audio portion of the Super Nintendo.

Included is an example that can play SPC files:

cargo run --example spc_player test/ferris-nu.spc

Note that you may want to run the above example in release config, as the emulator can be quite slow in debug builds.

The audio unit is made up of a few major parts:

  • A CPU (SPC700 core), which is 100% cycle-accurate
  • A DSP, which is accurate to the nearest audio sample
  • 64kb RAM
  • 3 timers
  • And some extra glue here and there to tie it all together :)

Extras

Included in the test directory are a couple of test SPC files:

Other projects consuming this library:

  • snes-apu-dbg - a Qt-based graphical debugger used in development of this library

Attribution

Much of the core SMP code was baked from byuu's higan source code: http://byuu.org/emulation/higan/

Likewise, some of the DSP code (envelopes in particular) was deep-fried from blargg's snes_spc code: http://blargg.8bitalley.com/libs/audio.html#snes_spc

Without their awesome work, this project wouldn't exist!

License

This code is licensed under the BSD2 license (see LICENSE).

You can’t perform that action at this time.