Does CPU register access show up on address bus?

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
James
Posts: 434
Joined: Sat Jan 22, 2005 8:51 am
Location: Chicago, IL
Contact:

Does CPU register access show up on address bus?

Post by James »

Does access to the CPU I/O registers (e.g., APU registers or OAM DMA) show up on the address bus?
get nemulator
http://nemulator.com
3gengames
Formerly 65024U
Posts: 2284
Joined: Sat Mar 27, 2010 12:57 pm

Post by 3gengames »

I am not a hardware whiz, but when you do the sprite DMA, It freezes the processor and then does the 512-514? clocks, so you wouldn't see that on the bus? But yeah all registers take up address spaces. (the bus?)


Hope that helps. I'm sure the hardware gods will come in here soon to help. :wink:
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: the universe
Contact:

Post by thefox »

I'm not sure, but my guess is they do show up on the bus. Just seems like the most "natural" thing since it would require additional logic for them to not show up... OAM_DMA accesses themself of course show up since both RAM and PPU are external.
User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Re: Does CPU register access show up on address bus?

Post by kevtris »

James wrote:Does access to the CPU I/O registers (e.g., APU registers or OAM DMA) show up on the address bus?
Yes, they do show up. On the HardNES player I made ages ago, I mapped RAM under 4xxxh so that I could read back what was written to the registers. This worked fine.

The only caveat is on readback registers (4015) you will get the bits from 4015 instead of from the outside world. For the unimplemented bits of 4015 I am not sure what happens. They either come from the outside world or are set to a default level (0 or thereabouts).

Also it was brought up that 4018, 4019, and 401a are actually readable too and return the square volume and/or DPCM level somehow but I am not sure if it works. Q messaged me on IRC one day and said he thinks after studying the chips that this might happen.

Unfortunately my copyNES doesn't work any more due to a parallel port problem after I replaced the mobo on PC #2 so I have not checked yet.
/* this is a comment */
tepples
Posts: 22878
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Does CPU register access show up on address bus?

Post by tepples »

kevtris wrote:The only caveat is on readback registers (4015) you will get the bits from 4015 instead of from the outside world. For the unimplemented bits of 4015 I am not sure what happens. They either come from the outside world or are set to a default level (0 or thereabouts).
If $4015 is anything like $4016 and $4017 (and it might not be because those are the outside world), you get open bus on the unimplemented bits, which means the outside world comes through. I can't test this myself because open bus behaves differently with a PowerPak.
Last edited by tepples on Fri Mar 18, 2011 10:53 am, edited 1 time in total.
User avatar
James
Posts: 434
Joined: Sat Jan 22, 2005 8:51 am
Location: Chicago, IL
Contact:

Post by James »

thanks guys!
get nemulator
http://nemulator.com
User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Re: Does CPU register access show up on address bus?

Post by kevtris »

tepples wrote:
kevtris wrote:The only caveat is on readback registers (4015) you will get the bits from 4015 instead of from the outside world. For the unimplemented bits of 4015 I am not sure what happens. They either come from the outside world or are set to a default level (0 or thereabouts).
If $4015 is anything like $4016 and $4017 (and it might not be because those are the outside world), you get open bus on the unimplemented bits, which means the outside world comes through. I can't test this myself because open bus behaves differently with a PowerPak.
Yeah, 4016 and 4017 are different. They are external to the chip. 4015 is the only (known) register that is generated internally... unless 4018-401a allow reading. Those two 74HC368's on the NES board are what are used when 4016 and 4017 are read. There's two output signals that drive them from the CPU.
/* this is a comment */
Post Reply