I'm currently in the process of writing a series of test ROMs for both my emulator and my Famicom. The first one checks memory for basic things like RAM mirroring, whether or not a register can be read from and/or written to and open bus behaviour.
Everything listed on the wiki has been correct so far. However, one interesting discrepancy I've found is that the PPU register 'OAM address' ($2003) is both read and write on my RP2C02H-O even though the wiki maintains that it is write only. Can anyone else confirm if they've noticed the same thing? If the wiki is anything to go by, it seems that the read ability was only introduced in later PPU revisions.
It'll be interesting to be able to read from this register during rendering to see what the PPU sets it (even though I do believe that we already know the answer).
Correct PPU 2003/2004 functionality
Moderator: Moderators
Re: Correct PPU 2003/2004 functionality
If this can be shown to be consistent across different bootups, different PPU-CPU timing alignments, etc, then this is a neat discovery.
When hardware tests disagree with the wiki, edit the wiki.
When hardware tests disagree with the wiki, edit the wiki.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Re: Correct PPU 2003/2004 functionality
What type of tests did you perform that led you to this conclusion?
Are you certain that this is not an instance of PPU I/O open bus behavior?
Are you certain that this is not an instance of PPU I/O open bus behavior?
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
P.S. If you don't get this note, let me know and I'll write you another.
Re: Correct PPU 2003/2004 functionality
Wrong. Attempting to read from any write only register results in open bus behaviour. My Famicom confirms this.
I've just done another test using the following code:
Code: Select all
LDA #$FF
STA $2003
LDA #$00
LDA $2003
STA $10
Thought that having $FF return might just be some kind of coincidence so I tested the value $7E as well and got the exact same result.
I'll upload a screenshot when I can. My web hosting service is down right now.
Re: Correct PPU 2003/2004 functionality
This behavior is explained on the wiki as "PPU open bus", to which a link can be found in my post above (which I edited before you actually posted your reply so there's no "Edited" marker on it) - if you write a value to any PPU register ($2000-$2007) and then read from $2003 (or any other write-only register, such as $2000/$2001 or $2005/$2006), you will get that same value back for at least a few seconds.WedNESday wrote: ↑Thu Mar 03, 2022 11:01 am I've just done another test using the following code:
This results in $0010 = $FF. If the register were read-only, you would expect $0010 = $20 (i.e. open bus behaviour).Code: Select all
LDA #$FF STA $2003 LDA #$00 LDA $2003 STA $10
Thought that having $FF return might just be some kind of coincidence so I tested the value $7E as well and got the exact same result.
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
P.S. If you don't get this note, let me know and I'll write you another.
Re: Correct PPU 2003/2004 functionality
See also my previous topic "Riding the open bus", in which I too was initially confused about the difference between PPU open bus and CPU open bus.
Re: Correct PPU 2003/2004 functionality
I guess this just means that open bus has ways of being incredibly misleading. It can make write-only registers look like they are read-write by giving the same value back.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!