cge_nes 0.1.0

Cycle-accurate NES (Nintendo Entertainment System) emulator library: CPU, PPU, cartridge, input, and iNES ROM loading.
Documentation
//! Input handling module for the NES emulator
//!
//! This module provides functionality for managing controller input,
//! including gamepad state tracking and input register management.

#![deny(missing_docs)]

mod gamepad;
mod host_input;
mod input_register;

pub use gamepad::GamepadButtonsPressedFlags;
pub use gamepad::GamepadState;
pub use host_input::HostInput;
pub use input_register::InputDeviceState;
pub use input_register::InputRegisters;

/// Represents the available controller ports on the NES
///
/// The NES has two controller ports, typically used for Player 1 and Player 2
#[derive(Clone, Copy, Debug, Eq, PartialEq, Default)]
pub enum ConnectedSocket {
    /// First controller port (default)
    #[default]
    Player1 = 0,
    /// Second controller port
    Player2 = 1,
}