nesdev.com
http://forums.nesdev.com/

Odd Problem with nametables
http://forums.nesdev.com/viewtopic.php?f=3&t=9726
Page 1 of 1

Author:  miguelfsp [ Mon Jan 21, 2013 12:40 pm ]
Post subject:  Odd Problem with nametables

Hello guys, I'm kinda stuck with a messed up problem concerning the PPU... Please check this out:

I started the PPU few days ago and I'm now creating a debug window where I'll draw the palletes, tiles, nametables, etc... in order to learn more about the PPU itself, before "compiling" everything to draw the actual game.

However I'm stuck with some sort of name tables bug. Guys please check out the screenshots. As you see Nestest nametable loads correctly (and I got horizontal and vertical mirroring implemented), except for the facto that if you notice, the nametable is drawn a little more to the left then it should (can't understand why). But please check the "Mario bros" (not SMario) and the Donkey Kong games... The nametable seems to be completely messed up, and I really can't figure out where the problem is :/ My CPU passes nestest (tested without the PPU, comparing with nintendulator's log) so I assume that the cpu is not the cause... I generate NMIs when I reach scanline no. 242, so I don't know if there is something wrong about it.

I also just finished implementing the colors by reading the attribute tables.

Do you guys have any ideas from where this problem is being caused? It looks like the games are not filling up the nametables correctly or something like that, but don't understand why because nestest screen is showing the right tiles.

Thanks a lot for reading!

Attachments:
File comment: donkey kong
donkeykong.png
donkeykong.png [ 39.52 KiB | Viewed 1209 times ]
File comment: running "mario bros"
screenmario.png
screenmario.png [ 47.96 KiB | Viewed 1209 times ]
File comment: running nestest
screennestest.png
screennestest.png [ 42.42 KiB | Viewed 1209 times ]

Author:  tepples [ Mon Jan 21, 2013 1:37 pm ]
Post subject:  Re: Odd Problem with nametables

When $2006 is written, are you making sure that the first/second write flag is set properly?

Author:  miguelfsp [ Mon Jan 21, 2013 2:18 pm ]
Post subject:  Re: Odd Problem with nametables

You know, I spent the entire day trying to figure this out, and in the matter of minutes you point me exacly in the right direction. I just had to remove a stupid line of code (I was anding the result address with a value) and suddenly everything worked :) :)

Many thanks!!!!! I gotta include you guys in my About Box when I finish this!

How do you guys know so much about this platform?

Thank you very much! :)

Attachments:
WORKS.png
WORKS.png [ 323.5 KiB | Viewed 1189 times ]

Author:  Zelex [ Tue Jan 22, 2013 5:17 pm ]
Post subject:  Re: Odd Problem with nametables

miguelfsp wrote:
You know, I spent the entire day trying to figure this out, and in the matter of minutes you point me exacly in the right direction. I just had to remove a stupid line of code (I was anding the result address with a value) and suddenly everything worked :) :)

Many thanks!!!!! I gotta include you guys in my About Box when I finish this!

How do you guys know so much about this platform?

Thank you very much! :)


They are wizards :)

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/