It is currently Thu Jul 19, 2018 10:23 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sun Mar 18, 2018 7:47 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3127
Location: Brazil
Do you remember this? Well, reading or writing $2007 during rendering triggers a Y increment and a coarse X increment, but is the PPU write* performed? Ignored?

*a write to CHR RAM, nametables or color ram

In other words... is this correct?
Code:
      //2007W I/O
      case 7:
        if(ppuisrendering) {
           _clock_y(); _clock_x();
        } else {
           unsigned int tempaddr = ppu->address & 0x3FFF;
           ppu->address = (ppu->address + ppu->inc) & 0x7FFF;
           if(tempaddr < 0x2000) {
 /* CHR RAM write */
           } else if(tempaddr < 0x3F00) {
/* nametable write */
           } else {
/* color ram write */
           }
        }


Top
 Profile  
 
PostPosted: Sun Mar 18, 2018 10:42 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2155
Location: DIGDUG
Quote:
reading or writing $2007 during rendering triggers a Y increment and a coarse X increment


That would explain a lot (tests that I've done on reading / writing during rendering causing y scroll errors).

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Sun Mar 18, 2018 12:03 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7316
Location: Seattle
Zepper wrote:
but is the PPU write* performed?
Approximately yes.

The PPU's ALE signal is high when appropriate according to either the write sequence or the ordinary fetch cadence. This will smear addresses and data all over each other during the time.

The PPU's /WR strobe goes low. The /RD strobe is controlled entirely separately—this will yield a situation in which both /RD and /WR are low. For most RAMs this causes a write.

I don't know whether it can cause a write to palette memory. There aren't quite enough named nodes in Visual2C02 for me to easily track down whether the address logic to enable palette writes can be easily tickled.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: Gilbert and 2 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