MCPcopy Create free account
hub / github.com/RIP-Comm/clementine / EmuThread

Class EmuThread

ui/src/emu_thread.rs:213–234  ·  view source on GitHub ↗

The emulator thread that owns and runs the GBA.

Source from the content-addressed store, hash-verified

211/// LCD frame buffer - RGB values for each pixel.
212/// Stored as [R, G, B] for each pixel, row by row.
213pub type FrameBuffer = [u8; LCD_WIDTH * LCD_HEIGHT * 3];
214
215#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
216struct Breakpoint {
217 address: u32,
218 kind: BreakpointKind,
219}
220
221#[derive(Clone, Copy)]
222enum HandleUpdate {
223 AddBreakpoint { address: u32, kind: BreakpointKind },
224 RemoveBreakpoint(u32),
225 SetSpeed(f32),
226}
227
228/// The emulator thread that owns and runs the GBA.
229struct EmuThread {
230 gba: Gba,
231 cmd_rx: rtrb::Consumer<EmuCommand>,
232 event_tx: rtrb::Producer<EmuEvent>,
233 shutdown: Arc<AtomicBool>,
234 // State
235 running: bool,
236 steps_remaining: u32,
237 breakpoints: BTreeSet<Breakpoint>,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected