It is currently Mon Nov 20, 2017 6:32 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: NES and $4017
PostPosted: Fri Feb 24, 2017 10:02 am 
Offline

Joined: Mon Dec 26, 2016 8:58 am
Posts: 17
Hi all:
Got a bit of confusion regarding NES address $4017.

I've made a nice horizontal scrolling prog, with parallax (distant objects scroll slowly, closer objects scroll, well..fastly?), and Sprite 0 hit to allow a static status bar at the bottom.

All works well, and I of course had to study-up on how to use the joystick, including the use of the $4016/$4017 combo.

Then I look at the APU to learn sound, and I see the use of...gasp!...$4017 (frame counter). OK, so I know that there is only one $4017 address, so I assume that the hardware at this address does BOTH the joystick and sound?

But no documentation I have found says the equivalent of "do THIS to use the joystick, but use THAT to use sound".

So, assuming I am not going bonkers and it IS the same $4017, are there any docs that actually indicate the dual usage of this address? (and why not? - wouldn't someone accessing that hardware want the specs on ALL its' functionality?) Or is it expected that you simply read the appropriate doc for joystick, and the other appropriate doc for sound?

Or am I totally off base?

Thanks
Charlie


Top
 Profile  
 
 Post subject: Re: NES and $4017
PostPosted: Fri Feb 24, 2017 10:08 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19234
Location: NE Indiana, USA (NTSC)
Read and write to the same MMIO port often do unrelated things. $4016 read and write and $4017 read are related to controllers. $4017 write is related to the APU frame counter. But a lot of music engines don't use the APU frame counter except to disable it because they don't use hardware envelope, pitch bends, or length counter. If anything, writing to the APU frame counter is most useful for an obscure trick related to smoothing out pitch bends and vibrato around A (NTSC) or A♭ (PAL).


Top
 Profile  
 
 Post subject: Re: NES and $4017
PostPosted: Fri Feb 24, 2017 12:41 pm 
Offline

Joined: Mon Dec 26, 2016 8:58 am
Posts: 17
Ok that certainly makes sense. It's just that I'm so used to working/thinking at the chip level (hardware engineer here), that I was unsure how the NES hardware would be explained based on the higher system-level thinking.

(Back with more later , I'm sure)

Thanks
Charlie


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: No registered users and 6 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