It is currently Mon Oct 16, 2017 3:14 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: how to render efficently
PostPosted: Sat Sep 17, 2005 7:48 pm 
Offline
User avatar

Joined: Tue Dec 21, 2004 8:35 pm
Posts: 600
Location: Argentina
Im little stuck with ppu rendering. I have a few questions:

- are the first two tiles rendered on scanline 20? (i mean the scanline wich runs just before the 240 (0 - 239) on screen lines) and the rest 30 in the current scanline cycles plus the 2 that are rendered for the next scanline and so on...

- How to implement well this way of rendering? i understand the concept but im a little confused when i have to write the code.

"2C02 reference" talks about 2 16 bit shift registers where fit the two pattern tables bytes. As i disch me told me a little time ago, these 2 16 bit shift registers shift left (altought the reference says that shif right). The reference also mention that the fineX (which has no latch) "serves as a index to the bit of the tile". But again i cant get it to work.

All this is becouse i want the ppu reads all the tiles so PunchOut!! become emulated accuratly

Some help please?

_________________
ANes


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 18, 2005 3:23 am 
Offline

Joined: Thu Sep 15, 2005 9:23 am
Posts: 1194
Location: Behind you with a knife!
ALL scanlines before the main 240 are NOT rendered at all. So only worry about the main 240. The rest are just there for VBlank time when nothing is rendered to the screen.

As far as good methods for rendering go, you'll just have to practice programming it yourself. It would be wrong for someone to tell you how to write your program but one good piece of advice it to write a scanline emulator, one that takes the current scanline number + vertical scroll + horizontal scroll and processes from that. Currently, WedNESday's scanline renderer is on it's 10th or so rewrite...

_________________
http://www.jamesturner.de/


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 18, 2005 1:34 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19081
Location: NE Indiana, USA (NTSC)
I think Anes was asking for clarification about the tile prefetch for the first visible scanline (y=0). Not rendering those scanlines is not an option because MMC2 and MMC4 auto-bankswitch after pattern table fetches in $0FD0-$0FEF and $1FD0-$1FEF.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 18, 2005 3:13 pm 
Offline
User avatar

Joined: Tue Dec 21, 2004 8:35 pm
Posts: 600
Location: Argentina
Thats right, the problem is that if i use PPU Counters to render tiles the most right tile it is never read, so punchout will never bankswitch. There is a hack to do that and is to check tile + 1 (nt) if it is 0xFE or 0xFD, but i dont like that method and that suppouse that i have to add more code and compromises code modularity (it has to be done inside the proc that read tiles from memory) and of course as mappers are external to the NES my idea is that when the mapper function reads a tile (PT) do the bankswitch.

So my question is how to read all tiles.

Apart from that games with scrolling like SMB3 doesnt show tiles at right of the screen if fineX has a value != 0.

_________________
ANes


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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