#c64 #commodore #emulator #resid #sid

resid-rs

Port of reSID, a MOS6581 SID emulator engine, to Rust

10 releases (breaking)

0.8.0 Aug 31, 2018
0.7.0 Jul 24, 2018
0.6.0 Jun 21, 2018
0.5.0 Jan 2, 2018
0.1.0 Dec 5, 2017

#3 in Emulators

Download history 63/week @ 2018-06-15 22/week @ 2018-06-22 24/week @ 2018-06-29 7/week @ 2018-07-06 10/week @ 2018-07-13 24/week @ 2018-07-20 38/week @ 2018-07-27 18/week @ 2018-08-03 56/week @ 2018-08-10 17/week @ 2018-08-17 11/week @ 2018-08-24 11/week @ 2018-08-31

100 downloads per month
Used in 4 crates (1 directly)

GPL-3.0+

381KB
2K SLoC

resid-rs

Build Status Crates.io

Overview

Port of reSID, a MOS6581 SID emulator engine, to Rust.

Story

This project originated from zinc64, a Commodore 64 emulator, around Jan 2017. It evolved to the point where it can be useful to others working on C64 sound/emulation so it is packaged and shipped as a standalone crate.

Status

The port has reached compliance with the original resid implementation as of version 0.3. Output has been tested and verified to match the original implementation. Full sampler support has been added to v0.4 which reached feature parity with resid. Performance gap largely due to resampling has been closed in v0.5. SIMD optimization added in v0.6. Continuous integration and GPLv3 were brought to v0.7. v0.8 changes include documentation and api refinements/internal cleanup.

Usage

Once SID register read/writes are wired up to resid, all that is left to do is to generate audio samples and push them to audio output buffer.

while delta > 0 {
    let (samples, next_delta) = self.resid.sample(delta, &mut buffer[..], 1);
    let mut output = self.sound_buffer.lock().unwrap();
    for i in 0..samples {
        output.write(buffer[i]);
    }
    delta = next_delta;
}

Components

Component Status
Envelope Done
ExternalFilter Done
Filter Done
Sampler Done
Spline Done
Wave Done
Sid Done

Credits

  • Thanks to Dag Lem for his reSID implementation
  • Thanks to Daniel Collin for motivating me to put this out and helping out with code optimization
  • Commodore folks for building an iconic 8-bit machine
  • Rust developers for providing an incredible language to develop in

Dependencies