CPU Emulation and locking to a specific clock speed

前端 未结 7 1378
臣服心动
臣服心动 2020-12-04 14:58

If you had read my other question, you\'ll know I\'ve spent this weekend putting together a 6502 CPU emulator as a programming exercise.

The CPU emulator is mostly c

7条回答
  •  感动是毒
    2020-12-04 15:17

    I would use the clock cycles to calculate time and them sleep the difference in time. Of course, to do this, you need a high-resolution clock. They way you are doing it is going to spike the CPU in spinning loops.

提交回复
热议问题