pub fn run(&mut self) {
        loop {
            trace!("@ {:04X}", self.state.borrow().pc);

            {
                let block = self.cache.get_or_compile_block(&self.state);
                block.run();

                self.ops += block.len as i32 / 2;
            }

            {
                let mut state = self.state.borrow_mut();
                let inv_start = state.inv_start;
                let inv_len = &mut state.inv_len;
                if *inv_len != 0 {
                    // JIT cache invalidation required
                    self.cache.invalidate_range(inv_start, *inv_len as u16);
                    *inv_len = 0;
                }
            }

            while self.ops >= OPS_PER_TICK as i32 {
                self.tick();
                self.ops -= OPS_PER_TICK as i32;
            }
        }
    }
/// Begins execution of CHIP-8 instructions.
Begins execution of CHIP-8 instructions.
Begins execution of CHIP - 8 instructions .
pub fn run(&mut self) {
        loop {
            trace!("@ {:04X}", self.state.borrow().pc);
            {
                let block = self.cache.get_or_compile_block(&self.state);
                block.run();
                self.ops += block.len as i32 / 2;
            }
            {
                let mut state = self.state.borrow_mut();
                let inv_start = state.inv_start;
                let inv_len = &mut state.inv_len;
                if *inv_len != 0 {
                    // JIT cache invalidation required
                    self.cache.invalidate_range(inv_start, *inv_len as u16);
                    *inv_len = 0;
                }
            }
            while self.ops >= OPS_PER_TICK as i32 {
                self.tick();
                self.ops -= OPS_PER_TICK as i32;
            }
        }
    }
pub fn run ( & mut self ) { loop { trace ! ( " " self state borrow ( ) pc ) ; { let block = self . cache . get_or_compile_block ( & self . state ) ; block . run ( ) ; self . ops += block . len as i32 / 2 ; } { let mut state = self . state . borrow_mut ( ) ; let inv_start = state . inv_start ; let inv_len = & mut state . inv_len ; if * inv_len != 0 { // JIT cache invalidation required self . cache . invalidate_range ( inv_start , * inv_len as u16 ) ; * inv_len = 0 ; } } while self . ops >= OPS_PER_TICK as i32 { self . tick ( ) ; self . ops -= OPS_PER_TICK as i32 ; } } }
Begins execution of CHIP-8 instructions.
Begins execution of CHIP - 8 instructions .
&mut self
&mut self