pub fn new(game_name: &str) -> CHIP8 {
        let cpu = Cpu::default();
        let display = Display::default();
        let memory = Memory::default();
        let keyboard = KeyBoard::default();
        let keymap = KeyMap::default();
        let settings = Settings::new(game_name);
        let cpu_clock = Clock::new(settings.cpu_freq);
        let st_clock = Clock::new(settings.sound_timer_freq);
        let dt_clock = Clock::new(settings.delay_timer_freq);
        CHIP8 {
            cpu,
            display,
            memory,
            keyboard,
            keymap,
            settings,
            cpu_clock,
            st_clock,
            dt_clock,
        }
    }
/// create a chip-8 instance
create a chip-8 instance
create a chip - 8 instance
pub fn new(game_name: &str) -> CHIP8 {
        let cpu = Cpu::default();
        let display = Display::default();
        let memory = Memory::default();
        let keyboard = KeyBoard::default();
        let keymap = KeyMap::default();
        let settings = Settings::new(game_name);
        let cpu_clock = Clock::new(settings.cpu_freq);
        let st_clock = Clock::new(settings.sound_timer_freq);
        let dt_clock = Clock::new(settings.delay_timer_freq);
        CHIP8 {
            cpu,
            display,
            memory,
            keyboard,
            keymap,
            settings,
            cpu_clock,
            st_clock,
            dt_clock,
        }
    }
pub fn new ( game_name : & str ) -> CHIP8 { let cpu = Cpu :: default ( ) ; let display = Display :: default ( ) ; let memory = Memory :: default ( ) ; let keyboard = KeyBoard :: default ( ) ; let keymap = KeyMap :: default ( ) ; let settings = Settings :: new ( game_name ) ; let cpu_clock = Clock :: new ( settings . cpu_freq ) ; let st_clock = Clock :: new ( settings . sound_timer_freq ) ; let dt_clock = Clock :: new ( settings . delay_timer_freq ) ; CHIP8 { cpu , display , memory , keyboard , keymap , settings , cpu_clock , st_clock , dt_clock , } }
create a chip-8 instance
create a chip - 8 instance
game_name
&str
game_name
&str