AtomicU32-based storage avoids unsafe while maintaining SPSC guarantees. Capacity: 4096 samples (~85ms at 48kHz). Exported from crate root.
44 lines
1.9 KiB
Rust
44 lines
1.9 KiB
Rust
//! `nesemu` is a core NES/Famicom emulation library.
|
|
//!
|
|
//! It exposes CPU/PPU/APU/bus primitives and ROM/mapper helpers so a host app
|
|
//! can provide platform-specific frontend (windowing, audio device, input).
|
|
//!
|
|
//! # API Stability
|
|
//! - `runtime` and root re-exports are the supported public `v0` API for external clients.
|
|
//! - `native_core` modules are available for advanced integrations, but treated as lower-level
|
|
//! surface that may evolve faster between minor releases.
|
|
|
|
pub mod native_core;
|
|
pub mod runtime;
|
|
|
|
#[cfg(feature = "adapter-api")]
|
|
pub use nesemu_adapter_api as adapter_api;
|
|
#[cfg(feature = "adapter-headless")]
|
|
pub use nesemu_adapter_headless as adapter_headless;
|
|
|
|
pub use native_core::apu::{Apu, ApuStateTail, ChannelOutputs};
|
|
pub use native_core::bus::NativeBus;
|
|
pub use native_core::cpu::{Cpu6502, CpuBus, CpuError};
|
|
pub use native_core::ines::{InesHeader, InesRom, Mirroring, parse_header, parse_rom};
|
|
pub use native_core::mapper::{Mapper, create_mapper};
|
|
pub use native_core::ppu::Ppu;
|
|
#[cfg(feature = "adapter-api")]
|
|
pub use runtime::{AudioAdapter, ClockAdapter, InputAdapter, VideoAdapter};
|
|
pub use runtime::{
|
|
AudioMixer, AudioOutput, ClientRuntime, EmulationState, FRAME_HEIGHT, FRAME_RGBA_BYTES,
|
|
FRAME_WIDTH, FrameClock, FramePacer, HostConfig, InputProvider, JOYPAD_BUTTON_ORDER,
|
|
JOYPAD_BUTTONS_COUNT, JoypadButton, JoypadButtons, NesRuntime, NoopClock, NullAudio, NullInput,
|
|
NullVideo, PacingClock, RingBuffer, RuntimeError, RuntimeHostLoop, SAVE_STATE_VERSION, VideoMode,
|
|
VideoOutput, button_pressed, set_button_pressed,
|
|
};
|
|
|
|
pub mod prelude {
|
|
#[cfg(feature = "adapter-api")]
|
|
pub use crate::{AudioAdapter, ClockAdapter, InputAdapter, VideoAdapter};
|
|
pub use crate::{
|
|
AudioOutput, ClientRuntime, EmulationState, HostConfig, InputProvider, JoypadButton,
|
|
JoypadButtons, NesRuntime, RuntimeError, RuntimeHostLoop, VideoOutput, button_pressed,
|
|
create_mapper, parse_rom, set_button_pressed,
|
|
};
|
|
}
|