It is currently Fri Oct 20, 2017 7:33 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Sat Jul 04, 2015 5:07 pm 
Offline
User avatar

Joined: Wed Nov 19, 2014 9:00 am
Posts: 40
Location: Mexico
Hi guys,

I'm working in implementing the PPU of my emulator. CPU is already tested and it works good (according to the nestest.nes log, and Blargg's official/unofficial instructions tests).

I managed to get VBlank and NMI up and running, so now i'm working on getting some background displayed in the screen. The problem is that i don't know why these couple of tiles (screenshot attached) are displayed wrong :S. As you will be able to see, the title screen and the screen before donkey starts moving are displayed perfectly. But when the animation starts, the tile is wrong.

I checked my name table mirroring and seems to be right. I have implemented registers just as in loopy's scrolling doc. No attribute tables or sprites implemented yet. Also, checked with a couple of other games, and the tiles are displayed OK.

Can you guys point me to the right direction based on your vast experience :).

Thanks in advance.


Attachments:
File comment: Screen with the wrong tile.
Donkey_2.png
Donkey_2.png [ 7.18 KiB | Viewed 1196 times ]
File comment: Screen before animation starts.
Donkey_1.png
Donkey_1.png [ 6.91 KiB | Viewed 1196 times ]
File comment: Title screen.
Donkey_0.png
Donkey_0.png [ 8.37 KiB | Viewed 1196 times ]

_________________
*** O-Nes-Sama emulator team ***


Last edited by Fumarumota on Mon Jul 13, 2015 10:23 am, edited 2 times in total.
Top
 Profile  
 
PostPosted: Sat Jul 04, 2015 7:16 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3943
Make sure you have the increment mode (1 byte vs 32 bytes) correct, I guess.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Mon Jul 13, 2015 8:51 am 
Offline
User avatar

Joined: Wed Nov 19, 2014 9:00 am
Posts: 40
Location: Mexico
It seems that I had timed my frames wrongly. Substraction of odd frames' last cycle when render is enabled was done wrong, and because of that my frame was way shorter than normal:

Instead of making only the last scan line shorter, I was substracting last cycle from every scan line when rendering enabled (Duh!).

I fixed it and the issue appears to be gone.

I also double checked my 2006h/2007h accesses to vRam, and they look OK.
Thank you Dwedit.

_________________
*** O-Nes-Sama emulator team ***


Top
 Profile  
 
PostPosted: Tue Jul 21, 2015 12:34 pm 
Offline
User avatar

Joined: Mon Dec 22, 2008 10:45 pm
Posts: 311
Location: Argentina
Fumarumota wrote:
Substraction of odd frames' last cycle when render is enabled was done wrong

That's strange, in the first versions of my PPU the odd cycle was simply ignored and nothing like this happened.


Top
 Profile  
 
PostPosted: Tue Jul 21, 2015 2:51 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10064
Location: Rio de Janeiro - Brazil
Petruza wrote:
That's strange, in the first versions of my PPU the odd cycle was simply ignored and nothing like this happened.

This means your emulator was off by only 1 cycle, while his was subtracting 1 cycle from every scanline, for a total error of 240 cycles. That's a significant difference.


Top
 Profile  
 
PostPosted: Wed Jul 22, 2015 7:40 am 
Offline
User avatar

Joined: Mon Dec 22, 2008 10:45 pm
Posts: 311
Location: Argentina
Oh right, every scanline, ok.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group