More Ramblings from a Los Angeles Programmer

April 9, 2007

NES has better colors now

Filed under: coding — Josh DeWald @ 4:00 pm

Did a couple of hours of hacking on the NES emulator and managed to get the color to (mostly) look right. I had multiple little issues in the way I was handling the Name Table Attributes and palettes. I had misunderstood the documentation and that there was only one 16 byte set of palette data (that was mirrored) but there is actually 2 16-byte ones (which gets mirrored a few times). This allows for a separate set of background and sprite palettes. However, even after fixing that, I still had whacky reddish clouds! Thankfully that was a simple fix, I had swapped the two blocks of memory and was using the background Attribute Table as the sprite’s and vice versa. Naturally as is the case with this project, things still aren’t quite right. Namely the screen should be blue, rather than black, and there are lines where the sprites aren’t being fully read. In addition, the plant that is supposed to come out one of the tubes doesn’t show up.

Mario Demo 1Dig Dug playing

No doubt I’m making this project harder than it necessarily needs to be, but I’m having fun doing it (when I actually work on it). I’m always getting distracted with other little hobby projects, especially when the “going gets rough”. I’ve been playing around with the proverbial Ant simulation that is always popular among us geeks… it’s amazing to watch emergent behavior come out of simple rules. Of course, mine isn’t working quite right.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at

%d bloggers like this: