private void threadProc() { m_running = true; m_cpu.RDMEM_M1 = RDMEM; m_cpu.RDMEM = RDMEM; m_cpu.WRMEM = WRMEM; m_cpu.RDPORT = RDPORT; m_cpu.WRPORT = WRPORT; m_cpu.RESET = DUMMY; m_cpu.INTACK_M1 = DUMMY; m_cpu.NMIACK_M1 = DUMMY; m_cpu.RST = true; m_cpu.ExecCycle(); m_cpu.RST = false; long next = m_cpu.Tact; long nint = m_cpu.Tact; initGsbank(); while (m_running) { next += FRAME_LEN; while (m_cpu.Tact < next) { int intTact = (int)(m_cpu.Tact % (FRAME_LEN * 50 / 44100)); m_cpu.INT = intTact < 32; m_cpu.ExecCycle(); } m_event.WaitOne(); } }