It is currently Mon Dec 18, 2017 1:30 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Tue Sep 06, 2016 12:59 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
This might be a confusing question to answer, because it's also a confusing question to ask.

We all know that you can toggle PPU A12 (and thus manually clock the MMC3 IRQ counter) with repeated writes to $2006. My question is basically "why?". Specifically... why does the NES put the address on the bus after the 2nd $2006 write? There's no memory access taking place, is there?

And what happens during rendering when memory accesses (those UNRELATED to the current PPU address, mind you) are taking place? Does the address still get pushed on the bus and conflict with the address currently being read from?


Top
 Profile  
 
PostPosted: Tue Sep 06, 2016 2:43 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
Disch wrote:
Specifically... why does the NES put the address on the bus after the 2nd $2006 write? There's no memory access taking place, is there?

Isn't that something that belongs to the loopy's ppu scrolling logic?


Top
 Profile  
 
PostPosted: Tue Sep 06, 2016 3:20 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
Loopy's doc talks about updating the PPU address. That's no problem. But it doesn't make any mention as to what is put on the bus and when.

The PPU would need to update the bus for the below things:
1) Rendering fetches (NT/CHR/Attribute)
2) $2007 writes
3) Refilling the read buffer after $2007 reads

For #2 and #3, LoopyV (ie: the PPU address) is put directly on the bus. But for #1 (specifically the attribute reads), LoopyV and the PPU bus hold two very different values. So they must be two different things internally.

So why do $2006 writes touch the bus? Not only do they not need to, it seems like it would be problematic. But they must, because it can be observed through the MMC3 IRQ counter.


Top
 Profile  
 
PostPosted: Tue Sep 06, 2016 5:09 pm 
Online

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19356
Location: NE Indiana, USA (NTSC)
If the bus isn't 3-state, the PPU has to output something on the address bus at all times. A rule "whenever rendering is disabled, put v on the bus" probably takes fewer gates than "when rendering is disabled, hold the last value that happened to be on the bus".


Top
 Profile  
 
PostPosted: Tue Sep 06, 2016 11:05 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7321
Location: Chexbres, VD, Switzerland
Quote:
And what happens during rendering when memory accesses (those UNRELATED to the current PPU address, mind you) are taking place?

They are very related. The "current PPU address" is the NT tile which is being rendered, and on attribute table and pattern table fetch, the adress is replaced by something else, I guess with an internal multiplexer.


Top
 Profile  
 
PostPosted: Tue Sep 06, 2016 11:47 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
I know these things, Bregalad... and I think you know what I meant. But hey, if you want to get into a technicality war.... I'm game... ;P

Bregalad wrote:
They are very related. The "current PPU address" is the NT tile which is being rendered


Not entirely. Only the low 10 bits. A10 and A11 are in fact completely unrelated to LoopyV, as they are forced to %10 for NT reads.

Quote:
and on attribute table and pattern table fetch, the adress is replaced by something else, I guess with an internal multiplexer.


For attributes, the address could be derived from LoopyV, so in that sense I suppose it is related (except for A10 and A11 as above).

CHR fetches, however, use only 3 bits from LoopyV, making them the least related of all.



So I suppose those fetches are "partially related" to LoopyV. :D



EDIT:

Also tepples, your answer makes sense, I guess. :) Thanks.


Top
 Profile  
 
PostPosted: Wed Sep 07, 2016 2:50 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7321
Location: Chexbres, VD, Switzerland
Quote:
CHR fetches, however, use only 3 bits from LoopyV, making them the least related of all.

So I suppose those fetches are "partially related" to LoopyV. :D

No, the 3 bits are from the fine scrolling, and are not part of the current adress, which only increase by 32 once the fine scrolling reach 7. Anyhow, how the PPU internally drive it's adress lines is still some black magic, I guess.


Top
 Profile  
 
PostPosted: Wed Sep 07, 2016 4:41 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1393
Taking a brief look at Visual 2C02, A0-A13 are not tristated and output the contents of the V register whenever rendering is disabled.

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
PostPosted: Wed Sep 07, 2016 7:54 am 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
@Bregalad:

Fine Y scrolling is absolutely part of the address, as can be evidenced by the first $2006 write's impact on it (forces high bits to zero and changes the low bit). Also, doing a $2007 write when the PPU address is $2FFF will increment the fine Y scroll.


@Quietust:

Cool, so tepples was right. That makes sense. Thanks. I assume that happens during VBlank as well.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: tepples, zxbdragon and 5 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:  
cron
Powered by phpBB® Forum Software © phpBB Group