It is currently Tue Dec 12, 2017 1:09 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Sat Oct 03, 2015 8:29 pm 
Offline

Joined: Thu Aug 20, 2015 3:09 am
Posts: 297
I'm trying to make my NSF player pass blargg's apu_mixer tests, starting with the square wave. The section of output that is meant to be silent is quiet, but certainly not silent. Visual inspection of the waveform shows a train of alternating positive and negative spikes, leading me to believe it's a phase issue, and logging the exact cycle of each transition shows that each channel is exactly four cycles out of phase: first the PCM, then Pulse 1, then Pulse 2.

But looking at the test source, I see this:
Code:
   ldx #$6F        ; period = 896*2
   ldy #$00
   stx $4002
   stx $4006
   sty $4003
   sty $4007
The phase-resetting writes occur exactly four cycles apart. Does this mean the output I'm hearing is an artifact of the test, or is there an obscure timing issue in the APU I'm not emulating properly?


Top
 Profile  
 
PostPosted: Sun Nov 08, 2015 2:45 pm 
Offline

Joined: Sat Jun 01, 2013 11:55 am
Posts: 27
Location: Maine, U.S.A.
First of all, the test wave isn’t silent, it’s mostly silent with close-cancelation artifacting (includes spikes), and grows more audible toward the end. There are recordings of these tests currently available on github.

As far as timing goes, the synth channels have a slight clocking delay, whereas the DMC 4011 write is a direct setting of the DA output, with immediate effect. It’s easiest to render a sample before clocking the period to simulate this delay.

Be sure to account for all of the CPU cycles when updating the sound results; the actual write occurs on the last instruction cycle.


Top
 Profile  
 
PostPosted: Tue Nov 10, 2015 9:44 pm 
Offline
User avatar

Joined: Mon May 19, 2014 11:46 pm
Posts: 37
I just want to say that it makes me happy that you're trying to make a perfectly accurate NSF player and I look forward to you reaching your goal!


Top
 Profile  
 
PostPosted: Wed Nov 11, 2015 2:59 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 750
Location: New York, NY
nothingtosay wrote:
I just want to say that it makes me happy that you're trying to make a perfectly accurate NSF player and I look forward to you reaching your goal!


Given that user name, I can't tell if this comment is a joke or not.


Top
 Profile  
 
PostPosted: Thu Nov 12, 2015 5:54 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
Possibly...


Top
 Profile  
 
PostPosted: Thu Nov 12, 2015 6:41 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2982
Location: Tampere, Finland
Why would you try to draw any conclusions based on a username? It's not like he can change it for every single post he makes.

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
PostPosted: Mon Nov 16, 2015 1:13 am 
Offline
User avatar

Joined: Mon May 19, 2014 11:46 pm
Posts: 37
I was being sincere, I assure everyone.


Top
 Profile  
 
PostPosted: Sat Nov 21, 2015 12:59 am 
Offline

Joined: Thu Aug 20, 2015 3:09 am
Posts: 297
ap9 wrote:
First of all, the test wave isn’t silent, it’s mostly silent with close-cancelation artifacting (includes spikes), and grows more audible toward the end. There are recordings of these tests currently available on github.
Thanks for the information, and links. My NSF player sounds almost exactly like the recording on the square test, so I guess I'm on target.

Sorry for not noticing your reply sooner; I haven't checked in for a while due to being very busy with other stuff.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 7 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