#emulation #mame #pinmame #virtual-pinball

pinmame-nvram

Rust library handling PinMAME NVRAM files

15 releases

new 0.3.9 Jan 11, 2025
0.3.8 Jan 10, 2025
0.3.6 Dec 27, 2024
0.2.2 Dec 9, 2024
0.1.1 Dec 4, 2024

#370 in Game dev

Download history 293/week @ 2024-12-01 579/week @ 2024-12-08 300/week @ 2024-12-15 332/week @ 2024-12-22 130/week @ 2024-12-29 237/week @ 2025-01-05

1,051 downloads per month

MIT license

310KB
2.5K SLoC

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.

Dependencies

~8MB
~298K SLoC