The new PPU

I have completed recoded the PPU, as well as made updates to other logic in preparation for the PPU changes. Although graphically, the games look a lot worse, they are actually a lot better now. Before, the PPU render code was about 250 lines, with lots of bit shifting and logic. Now it's about 12 lines of code, consisting mainly of updating the vram pointer. The reason the graphics are messed up is due mainly to timing issues. I've got a full day tomorrow (well later today technically) working on my new place, so I'm not sure how much I'll get done on Saturday; but next on the list is to get the sprite engine in -- as well as getting CPU and video clocks syncd properly, which should fix the rendering issues; at which point scrolling should also be supported inherently.

Here's what it looks like with the new PPU:

5 comments:

nerd_boy said...

Hullo! Started following your blog this-morning/yesterday-evening after seeing the post in the Lounge. Probably be following along, as I planned on doing something along these lines after my current(eternal) project. Though I was going to start with SCHIP8, quite a bit less ambitious.

Anywho, as for your post, is the discoloring also part of the timing issue? o_O I haven't done any research on the NES/PPU/6502 in quite a long time, I'd be interested to know how/why it is only black/white if it is the timing.

Cheers,
~nerd_boy

Tim Sarbin said...

No, the coloring is due to the fact that I am not loading color bits 2-3 from the attribute table (I'm only loading bits 0-1 from the name table). As this table only affects which "subpalette" each pixel uses, I'm not that worried about getting that code in until the graphics are physically correct.

And thanks for following -- once I'm done with this emulator I will be creating a giant manual that describes everything in exact and correct detail. Of course, I'll also release the emulator itself when I'm done.

Have a good one!
Tim

Anonymous said...

Are you still working on the emulator, or have you taken a break?

nerd_boy said...

Teach me to comment in someones blog.

Now I'll have to mark another blog-kill up. :<

Unknown said...

I guess this blog is probably dead....I've been working on an emulator on and off for a while...an hour here, an hour there...random decisions to rewrite the thing from scratch >_< Anyhow, if you have any hints of which games seem to be good for testing, I'd appreciate it. I'm using Super Mario Bros, but I've heard that it used some odd programming tricks, so I'm not convinced that it's the best idea for me to try that as a first goal.

Post a Comment