27 lines
438 B
Odin
27 lines
438 B
Odin
package simulator
|
|
|
|
import emu "../machine"
|
|
import rl "vendor:raylib"
|
|
|
|
Simulator :: struct {
|
|
machine: ^emu.System,
|
|
rom_loaded: bool,
|
|
running: bool,
|
|
paused: bool,
|
|
cycles_per_second: int,
|
|
font: rl.Font,
|
|
}
|
|
|
|
// Requires an initilized emulatore System Struct
|
|
run_simulator :: proc(s: ^emu.System) {
|
|
sim := Simulator {
|
|
machine = s,
|
|
rom_loaded = false,
|
|
running = false,
|
|
paused = true,
|
|
cycles_per_second = 12
|
|
}
|
|
|
|
run_gui(&sim)
|
|
}
|