pub struct GameBoy { /* private fields */ }
Expand description

The GameBoy is the main interface to the emulator.

Everything regarding emulation can be controlled from here.

Implementations

Initiate a builder object with a cartridge file.

Clocks the Gameboy clock for the duration of one PPU frame.

This is good for timing emulation, you can call this function once and then render it.

Return the game title string extracted from the cartridge.

The cartridge file path.

Return the pixels buffer of the PPU at the current state.

The format of the pixel buffer is RGB, i.e. 3 bytes per pixel.

Return the audio buffer of the APU at the current state.

Change the state of the joypad button to pressed.

Change the state of the joypad button to released.

Connect a serial device to the Gameboy.

Currently the gameboy can only be master, so the other device must be implemented as slave.

Disconnects the serial device if any is connected, else, nothing is done

Saves the whole current state of the emulator.

Loads the whole state of the emulator, if an error happened in the middle the emulator will keep functioning like normal, as it stores a backup recovery state before loading the new state.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.