#emulation #mame #virtual-pinball #pinmame

pinmame-nvram

Rust library handling PinMAME NVRAM files

31 releases

Uses new Rust 2024

new 0.4.6 Mar 3, 2026
0.4.4 Dec 16, 2025
0.4.3 Oct 10, 2025
0.4.1 Jul 11, 2025
0.3.6 Dec 27, 2024

#421 in Game dev

Download history 10/week @ 2025-11-11 65/week @ 2025-11-18 20/week @ 2025-11-25 2/week @ 2025-12-02 108/week @ 2025-12-09 37/week @ 2025-12-16 1/week @ 2025-12-23 30/week @ 2025-12-30 23/week @ 2026-01-06 34/week @ 2026-01-13 33/week @ 2026-01-20 68/week @ 2026-01-27 126/week @ 2026-02-03 52/week @ 2026-02-10 62/week @ 2026-02-17 77/week @ 2026-02-24

333 downloads per month
Used in vpxtool

MIT license

675KB
3K 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.

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

Dependencies

~8MB
~293K SLoC