LittleSoundDj, or LSDJ for short, is popular music tracker software for the original Nintendo Game Boy. While the handheld console originally was released in 1989, (chiptune) musicians still use its hardware to create and perform electronic music nowadays.
While LSDJ has a built-in filesystem for managing tracks, you need tools to get out the individual files for back-ups or constructing new save files from exported tracks. This crate provides a library for manipulating LSDJ save files/SRAM, in combination with a command-line utility crate for managing your songs. It was inspired by my work on liblsdj, an equivalent library in C.
The developer behind LSDJ has also made LSDPatcher, a GUI package for managing your songs.
use lsdj::{
sram::SRam,
fs::{Index, File}
};
// Load a save file from disk
let sram = SRam::from_path("bangers.sav").expect("Could not load SRAM");
// Access one of the files
if let Some(file) = sram.filesystem.file(Index::new(0)) {
// Convert the file to an .lsdsng (common song format)
let lsdsng = file.lsdsng().expect("Could not convert file to LsdSng");
// Store the song on disk
lsdsng.to_path("put_yo_hands_up.lsdsng").expect("Could not save LsdSng");
}
The crate currently supports the following functionality:
SRAM
serialization and deserializationFilesystem
manipulation (querying, inserting and removing files)LsdSng
serialization and deserialization- Full implementation of the compression algorithm (verified with tests)
These are features I'm interested in exploring/adding at a certain point:
SongMemory
parsing into song structures per format version. (This would allow manipulating songs.).lsdprj
supportROM
handling, mainly for sample manipulation
If you like this crate and want to support me somehow, consider buying some of my music.