pub fn new<'n>(inter: Interconnect<'n>) -> Cpu<'n> {
        // Default register values at startup. Taken from the
        // unofficial Game Boy CPU manual.
        let regs = Registers {
            pc: 0,
            sp: 0,
            a : 0,
            b : 0,
            c : 0,
            d : 0,
            e : 0,
            hl: 0,
        };

        Cpu {
            regs: regs,
            flags: Flags { z: false,
                           n: false,
                           h: false,
                           c: false,
            },
            inter:            inter,
            iten:             true,
            iten_enable_next: true,
            halted:           false,
            instruction_cycles: 0,
        }
    }
/// Create a new Cpu instance and reset it
Create a new Cpu instance and reset it
Create a new Cpu instance and reset it
pub fn new<'n>(inter: Interconnect<'n>) -> Cpu<'n> {
        // Default register values at startup. Taken from the
        // unofficial Game Boy CPU manual.
        let regs = Registers {
            pc: 0,
            sp: 0,
            a : 0,
            b : 0,
            c : 0,
            d : 0,
            e : 0,
            hl: 0,
        };
        Cpu {
            regs: regs,
            flags: Flags { z: false,
                           n: false,
                           h: false,
                           c: false,
            },
            inter:            inter,
            iten:             true,
            iten_enable_next: true,
            halted:           false,
            instruction_cycles: 0,
        }
    }
pub fn new < ' n > ( inter : Interconnect < ' n > ) -> Cpu < ' n > { // Default register values at startup. Taken from the // unofficial Game Boy CPU manual. let regs = Registers { pc : 0 , sp : 0 , a : 0 , b : 0 , c : 0 , d : 0 , e : 0 , hl : 0 , } ; Cpu { regs : regs , flags : Flags { z : false , n : false , h : false , c : false , } , inter : inter , iten : true , iten_enable_next : true , halted : false , instruction_cycles : 0 , } }
Create a new Cpu instance and reset it
Create a new Cpu instance and reset it
inter
Interconnect<'n>
inter
Interconnect<'n>