pub fn new() -> Self {

        let mut chip8: Chip8 = Chip8 {
            registers: [0; 16],
            memory: [0; 4096],
            index_register: 0,
            program_counter: 0x200,
            stack: [0; 16],
            stack_pointer: 0,
            delay_timer: 0,
            sound_timer: 0,
            keypad: [0; 16],
            video: [0; 2048],
            op_code: 0,
            table: [Chip8::OP_ERR; 0xF+1],
            table0: [Chip8::OP_ERR; 0xE+1],
            table8: [Chip8::OP_ERR; 0xE+1],
            tableE: [Chip8::OP_ERR; 0xE+1],
            tableF: [Chip8::OP_ERR; 0x65+1],
            debug_mode: false,
        };

        chip8.load_fonts();
        chip8.add_table();


        return chip8;
    }
/// Create a new chip8 instance with an empty `rom`, ready for use
///
/// ## Values
///
/// * `registers`: all zeroes
/// * `memory`/`rom`: all zeroes
/// * `index_register`: 0
/// * `program_counter`: 0x200
/// * `stack`: all zeroes
/// * `stack_poionter`: 0
/// * `delay_timer`: 0
/// * `sound_timer`: 0
/// * `keypad`: all zeroes
/// * `video`: all zeroes
/// * `op_code`: 0
/// * `fontset_size`: 80
Create a new chip8 instance with an empty `rom`, ready for use
Create a new chip8 instance with an empty ` rom ` ready for use
pub fn new() -> Self {
        let mut chip8: Chip8 = Chip8 {
            registers: [0; 16],
            memory: [0; 4096],
            index_register: 0,
            program_counter: 0x200,
            stack: [0; 16],
            stack_pointer: 0,
            delay_timer: 0,
            sound_timer: 0,
            keypad: [0; 16],
            video: [0; 2048],
            op_code: 0,
            table: [Chip8::OP_ERR; 0xF+1],
            table0: [Chip8::OP_ERR; 0xE+1],
            table8: [Chip8::OP_ERR; 0xE+1],
            tableE: [Chip8::OP_ERR; 0xE+1],
            tableF: [Chip8::OP_ERR; 0x65+1],
            debug_mode: false,
        };
        chip8.load_fonts();
        chip8.add_table();
        return chip8;
    }
pub fn new ( ) -> Self { let mut chip8 : Chip8 = Chip8 { registers : [ 0 ; 16 ] , memory : [ 0 ; 4096 ] , index_register : 0 , program_counter : 0x200 , stack : [ 0 ; 16 ] , stack_pointer : 0 , delay_timer : 0 , sound_timer : 0 , keypad : [ 0 ; 16 ] , video : [ 0 ; 2048 ] , op_code : 0 , table : [ Chip8 :: OP_ERR ; 0xF + 1 ] , table0 : [ Chip8 :: OP_ERR ; 0xE + 1 ] , table8 : [ Chip8 :: OP_ERR ; 0xE + 1 ] , tableE : [ Chip8 :: OP_ERR ; 0xE + 1 ] , tableF : [ Chip8 :: OP_ERR ; 0x65 + 1 ] , debug_mode : false , } ; chip8 . load_fonts ( ) ; chip8 . add_table ( ) ; return chip8 ; }
Create a new chip8 instance with an empty `rom`, ready for use
Create a new chip8 instance with an empty ` rom ` ready for use
values
`registers`: all zeroes
`memory`/`rom`: all zeroes
`index_register`: 0
`program_counter`: 0x200
`stack`: all zeroes
`stack_poionter`: 0
`delay_timer`: 0
`sound_timer`: 0
`keypad`: all zeroes
`video`: all zeroes
`op_code`: 0
`fontset_size`: 80
` registers ` : all zeroes ` memory ` / ` rom ` : all zeroes ` index_register ` : 0 ` program_counter ` : 0x200 ` stack ` : all zeroes ` stack_poionter ` : 0 ` delay_timer ` : 0 ` sound_timer ` : 0 ` keypad ` : all zeroes ` video ` : all zeroes ` op_code ` : 0 ` fontset_size ` : 80