pinmame-nvram

Crates.iopinmame-nvram
lib.rspinmame-nvram
version0.4.4
created_at2024-12-04 08:17:30.039242+00
updated_at2025-12-16 21:33:44.88516+00
descriptionRust library handling PinMAME NVRAM files
homepage
repositoryhttps://github.com/francisdb/pinmame-nvram
max_upload_size
id1471690
size6,641,447
Francis De Brabandere (francisdb)

documentation

https://docs.rs/vpin

README

pinmame-nvram

Rust library handling PinMAME NVRAM files.

Usage

Add the pinmame-nvram dependency to your project

cargo add pinmame-nvram

Example code for reading scores:

use pinmame_nvram::Nvram;

fn main() {
    let mut nvram = Nvram::open(Path::new("afm_113b.nv")).unwrap().unwrap();
    let scores = nvram.read_highscores().unwrap();

    for score in &scores {
        println!("{} {} {}", score.label.unwrap(), score.initials, score.score);
    }
}

Attributions

This library makes use of the PinMAME NVRAM Maps project. The maps are embedded in the library and are used to look up values in the nvram files.

Development

Make sure you have Rust and Cargo installed. Then clone the repository.

Check out the submodules:

git submodule update --init --recursive

Run the tests:

cargo test
Commit count: 124

cargo fmt