Crate opl3_rs

Source
Expand description

§opl3-rs

opl3-rs is a small library to provide bindings for the Nuked-OPL3 library.

§Usage

Nuked-OPL3 is not a turn-key implementation of the OPL3 chip - functions such as the status register, timers and interrupts are left as implementation details.

You can access the Nuked-OPL3 API via the Opl3Chip struct, if needed, but with the caveat that directly writing registers to Nuked-OPL3 will prevent you from reading the OPL registers correctly.

If you intend to utilize opl3-rs in an emulator, you will probably want to use the Opl3Device wrapper which provides a full OPL3 implementation including the status registers and timers.

§Credits

Nuked-OPL3 is (C) 2013-2020 Nuke.YKT and licensed under LGPL 2.1

Structs§

Opl3Chip
The Opl3Chip struct provides a safe interface for interacting with the Nuked-OPL3 library.
Opl3Device
The Opl3Device struct provides convenience functions for fully implementing an OPL3 device on top of Nuked-OPL3. By keeping a copy of all registers written, we can implement a read_register function.
Opl3DeviceStats
The Opl3DeviceStats struct contains statistics about the OPL3 device. It can be retrieved via the get_stats function on Opl3Device.

Enums§

OplError
The OplError enum represents errors that can occur when using the opl3-rs library.
OplRegisterFile
The Opl3RegisterFile enum represents the two register files available on the OPL3 chip. If in OPL2 mode, only the primary register file is available.