pub fn initialize(pc: u16, sp: u16) -> GameState {
    GameState {
        pc: pc,
        sp: sp,
        ticks: 0,
        flags: Flags {
            zero: false,
            subtract: false,
            halfcarry: false,
            carry: false,
        },
        regs: Registers{
            a: 0, b:0, c:0, d:0, e:0, h:0, l:0
        },
        memory: [0; 0x10000],
        hardware_regs: [0; 0x80],
    }
}
/* Constructor for new state starting with given pc and sp */
Constructor for new state starting with given pc and sp
Constructor for new state starting with given pc and sp
pub fn initialize(pc: u16, sp: u16) -> GameState {
    GameState {
        pc: pc,
        sp: sp,
        ticks: 0,
        flags: Flags {
            zero: false,
            subtract: false,
            halfcarry: false,
            carry: false,
        },
        regs: Registers{
            a: 0, b:0, c:0, d:0, e:0, h:0, l:0
        },
        memory: [0; 0x10000],
        hardware_regs: [0; 0x80],
    }
}
pub fn initialize ( pc : u16 , sp : u16 ) -> GameState { GameState { pc : pc , sp : sp , ticks : 0 , flags : Flags { zero : false , subtract : false , halfcarry : false , carry : false , } , regs : Registers { a : 0 , b : 0 , c : 0 , d : 0 , e : 0 , h : 0 , l : 0 } , memory : [ 0 ; 0x10000 ] , hardware_regs : [ 0 ; 0x80 ] , } }
Constructor for new state starting with given pc and sp
Constructor for new state starting with given pc and sp
pc
u16
sp
u16
pc
u16
sp
u16