Google AdSense

Friday, February 6, 2015

My Atari 2600 emulator written in Python failure version 2

Progresses

  • Changes debug infomation. Each line is an instruction and an empty line means a JUMP, CALL, or RETURN is executed.
  • Rewrite CPU by using global variable to speed up.

Download

Requirements

Resources

Comments

  • I use Pygame to speed up this time. It can run at 6 FPS in optimized mode and 0.02 FPS in debug mode. Because the calculations are more than my prediction and Python is slower than my thought, It can never achieve the objective which is 60 FPS.
  • I've got two things through this fail. First, because of the new debug information, i know that my implementation of TIA is wrong. Second, it's almost impossible to write a playable emulator by pure Python. I will use Pypy next time. Since Pypy is 40 times faster than Python, i think it's enough to write a playable Atari 2600 emulator.

Reviews

  • Actually, i did it in vain this time. The performance bottleneck is on TIA, not CPU. It will be clear by using Python Call Graph.

Related Posts

No comments:

Post a Comment