It is currently Sat Oct 20, 2018 8:37 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Wed Jan 24, 2018 8:27 pm 
Offline
User avatar

Joined: Sun Nov 09, 2008 9:18 pm
Posts: 1107
Location: Pennsylvania, USA
I've been making improvements to GGSound and was certain what I was seeing must have been a regression, only the way in which I make it happen can't possibly have anything to do with my NES code. Here's what I noticed:

-I play a song that is nothing but a drum loop on the noise channel and observe the perceived volume coming from my speakers, playing this song using ggsound from Nestopia.

-I click on the title bar of Nestopia in Windows and drag it, doesn't matter how far, and let go.

-Suddenly the audio is noticeably louder. I did not notice this occur on any other channels, and yet when I isolate just the noise channel using Nestopia's volume settings, I can't seem to reproduce the issue any longer.

I can't imagine simply dragging the emulator (which presumably would pause emulation) and observing different behavior could have anything to do with my NES code...

just wondered if anybody has noticed this with Nestopia or not. It's kinda subtle, and for all I know I'm hallucinating from coding too much this evening :lol:

*edit* I can also reproduce the sudden increase in volume by restarting the song, which would point back to my NES code. I'm wondering if there's some subtle setting in the APU I am neglecting which could affect the volume. I am not familiar with or understand the "sweep unit" that couldn't affect this, could it...?

*edit* Yet, I can't seem to make this happen in any other emulator.


Top
 Profile  
 
PostPosted: Wed Jan 24, 2018 8:34 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7671
Location: Seattle
Any chance the problem you're encountering is that nestopia uniquely accurately emulates the DPCM DAC nonlinearity (accidental volume control) and other emulators don't?

(The nonlinearity not only changes the volume of the triangle channel but the noise channel also)


Top
 Profile  
 
PostPosted: Wed Jan 24, 2018 8:37 pm 
Offline
User avatar

Joined: Sun Nov 09, 2008 9:18 pm
Posts: 1107
Location: Pennsylvania, USA
lidnariq wrote:
Any chance the problem you're encountering is that nestopia uniquely accurately emulates the DPCM DAC nonlinearity (accidental volume control) and other emulators don't?

(The nonlinearity not only changes the volume of the triangle channel but the noise channel also)


That seems possible. I can make the problem happen when no DPCM samples are playing, however, though they would have played previously (one of the first tracks that plays as you advance towards this drum loop track would have played some DPCM samples).

Is there a way to control this behavior?


Top
 Profile  
 
PostPosted: Wed Jan 24, 2018 8:42 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7671
Location: Seattle
If it is the DPCM+triangle+noise channel nonlinearity, you should be able to explicitly write to $4011 to set the volume.

It's a little premature to address handling techniques until you've verified whether that's what's going on.


Top
 Profile  
 
PostPosted: Wed Jan 24, 2018 8:43 pm 
Offline
User avatar

Joined: Sun Nov 09, 2008 9:18 pm
Posts: 1107
Location: Pennsylvania, USA
lidnariq wrote:
If it is the DPCM+triangle+noise channel nonlinearity, you should be able to explicitly write to $4011 to set the volume.

It's a little premature to address handling techniques until you've verified whether that's what's going on.

This is making me suspect something odd with the emulator, potentially. All channels explicitly set their volume on every frame (I store their current channel state and upload it once per frame to the apu registers). Plus, this problem can happen just from dragging the window. I don't see how dragging the window would trigger NES quirk emulation behavior...


Top
 Profile  
 
PostPosted: Wed Jan 24, 2018 8:49 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7671
Location: Seattle
I've noticed that recent builds of Nestopia (i.e. UE) have grown some weird bugs with audio, especially when interacting with save states, high speed, or rewinding.

No idea if that's related.

Also, writing to $4011 isn't the same "set the volume" that the pulse and noise channels have.


Top
 Profile  
 
PostPosted: Wed Jan 24, 2018 8:50 pm 
Offline
User avatar

Joined: Sun Nov 09, 2008 9:18 pm
Posts: 1107
Location: Pennsylvania, USA
Actually if anybody else wants to try the ggsound demo in Nestopia, advance to the last track (just hit up a bunch of times until you hear nothing but a looping drum track). You can restart the song by continuing to hit up. It sometimes suddenly gets loud just doing this. You can also try dragging the window and it'll get loud in that case too.

I know it's not a regression now because the demo linked there has none of the changes I've been working on this evening.

I forget which registers do what; just that all of their volume settings are uploaded once per frame.


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

All times are UTC - 7 hours


Who is online

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