Crate plastic_core

Crate plastic_core 

Source
Expand description

§Plastic NES Core

This is the core of the Plastic NES emulator. It contains the CPU, PPU, APU, and other components and can be used standalone to run/emulate NES games if you want to handle your own input/output.

A very simple example of how to use this crate:

use plastic_core::NES;

fn main() {
   let mut nes = NES::new("path/to/rom-file.nes").unwrap();
    
   loop {
       nes.clock_for_frame();

       let pixel_buffer = nes.pixel_buffer();
       display(&pixel_buffer);

       let audio_buffer = nes.audio_buffer();
       play_audio(&audio_buffer);
   }
}

In the

Modules§

cpu
Structures used when interacting with the CPU, see also NES::clock
nes_audio
Helper variables related to handling audio buffers from the emulator
nes_display
Helper variables related to handling pixel buffers from the emulator

Structs§

NES
The main NES emulator struct, containing all components and what is actually doing the emulation.

Enums§

CartridgeError
Error happening when loading a NES cartridge.
NESKey
Represents the keys on an NES controller.
SaveError
Error happening when saving/loading a state