diff --git a/LR35902/fusetest_LR35902/FuseTestRunner.cpp b/LR35902/fusetest_LR35902/FuseTestRunner.cpp index 9b275c6..c887c37 100644 --- a/LR35902/fusetest_LR35902/FuseTestRunner.cpp +++ b/LR35902/fusetest_LR35902/FuseTestRunner.cpp @@ -181,12 +181,9 @@ void Fuse::TestRunner::run() { initialise(); auto allowedCycles = m_test.registerState.tstates; try { - auto cycles = 0; - do { - cycles += m_cpu.step(); - } while (allowedCycles > cycles); + m_cpu.run(allowedCycles); check(); - } catch (std::logic_error& error) { + } catch (std::logic_error& error) { m_unimplemented = true; std::cerr << "**** Error: " << error.what() << std::endl; } diff --git a/LR35902/inc/LR35902.h b/LR35902/inc/LR35902.h index 0be15c8..ca02dc2 100644 --- a/LR35902/inc/LR35902.h +++ b/LR35902/inc/LR35902.h @@ -69,8 +69,9 @@ namespace EightBit { return cycles; } - protected: int run(int limit); + + protected: virtual int execute(uint8_t opcode); int step();