Google AdSense

Saturday, April 25, 2015

My NES emulator written in Python failure version 2


  • Can load and decode the tile without color.
  • Can display the background that is not scrolling.





  • The usage is just the same as PyGirl, a Game Boy emulator written for the PyPy Toolchain .
  • The decoding process of tile is easy, but the display process through PPU is not. I don't sure if i coded it correct.
  • The display of PPU is also based on scanline. As far as i know, the PPU will first load the data of the same row of two tiles to the register according to the scrolling position, then display according to the register. In fact, I don't exactly understand how PPU displays according to the register, but since it's based on the tiles, even if there are some bugs in it, the result is still good.
  • The result is still lacking one column. You can observe it by the pipe on the upper left which has no corner and the floor on the middle left which has only three tiles. I think it's a bug in my PPU implementation because the data in the memory is correct.
  • The performance of RPython is very good. It runs as fast as the real NES without any optimization. Here are some performance comparisons i don't know if it's meaningful or not. By using RPython, the time it takes to the title screen is 0 second, to the demo screen is 19 seconds. By using PyPy without optimizing, the time it takes to the title screen is 13 seconds, to the demo screen is 4067 seconds. RPython is about 214 times faster than PyPy in this case.

No comments:

Post a Comment