pub struct Cpu {
pub reg_a: u8,
pub reg_b: u8,
pub reg_c: u8,
pub reg_d: u8,
pub reg_e: u8,
pub reg_h: u8,
pub reg_l: u8,
pub reg_sp: u16,
pub reg_pc: u16,
/* private fields */
}Fields§
§reg_a: u8§reg_b: u8§reg_c: u8§reg_d: u8§reg_e: u8§reg_h: u8§reg_l: u8§reg_sp: u16§reg_pc: u16Implementations§
Source§impl Cpu
impl Cpu
pub fn new(config: GameBoyConfig) -> Self
Sourcepub fn new_without_boot_rom(config: GameBoyConfig, is_cart_cgb: bool) -> Self
pub fn new_without_boot_rom(config: GameBoyConfig, is_cart_cgb: bool) -> Self
create a new cpu, with states that match the ones the CPU would have if the boot-rom would run (default values for registers)