NESDev and Strangulation Records messageboards
Forum Index | FAQ | New User | Login | Search

Previous ThreadView All ThreadsNext ThreadShow in Flat Mode*


SubjectRe: Possible alternative  
Posted byDisch
Posted on7/28/04 02:11 AM
From IP66.82.9.22  



Yes, you'd get a bit of a 50/60 Hz buzz when implementing the technique I suggested at face value, but wouldn't the square and noise channels overwhelm it in practice?

Well yeah.. if they're playing they'll dominate the sound, but the buzz would still be there... and even audible in many cases.

Or could it do the DC correction buzz in sub-frame, sub-DAC-quantum steps?

Not sure I follow.

I thought of just highpassing the DAC, but then you wouldn't get the nonlinearity in the signal, which some games use to control the volume of the triangle and noise channels.


Yeah you would... that's the beauty. Internally... the DMC is set to the value written... so everything it affects (including tri/noise volumes) is affected like normal. The only difference is the one sample generated at the time of the $4011 write needs to be adjusted.

When calculating the difference in sample output for your filter... you'd normally do something like:

dif = new_output - prev_output;

Instead, you could do:

dif = new_output - prev_output - dmc_adjust;

where 'dmc_adjust' is the output of the value written to $4011. So if $4011 was written with $7F... 'dmc_adjust' would be whatever value you output when the DMC is at level $7F. For all other times, dmc_adjust would be zero.

So for all purposes... the write to $4011 takes effect immediatly... and all the sideeffects and whatnot that come with the DMC's output being at a certain value take effect immediatly. The only difference is the pop isn't audible.

For example... say an NSF player inits with $00 at $4011, but the NSF writes to $7F first frame, then $7E second frame. Ordinarily it would output:
00->127->126 (00->127 creating a pop)

But working with differences and doing what I described, you'd output:
00->00->-1

But as far as the NSF is concerned... the value written takes effect immediately.



-
Entire Thread
Subject  Posted byPosted On
*NSF corrections  Disch7/23/04 04:38 AM
.*Re: NSF corrections  blargg7/25/04 6:47 PM
..*Clickless DAC init  tepples7/28/04 00:48 AM
...*Possible alternative  Disch7/28/04 01:03 AM
....*Re: Possible alternative  blargg7/28/04 03:44 AM
.....*Re: Possible alternative  koitsu7/28/04 07:00 AM
....*Re: Possible alternative  tepples7/28/04 01:12 AM
......Re: Possible alternative  Disch7/28/04 02:11 AM
..*Re: NSF corrections  Gil-Galad7/27/04 5:57 PM
...*Re: NSF corrections  blargg7/28/04 03:34 AM
.*Re: NSF corrections  Anonymous7/23/04 07:48 AM
Jump to

Memblers' homepage             Contact Me

Forums powered by WWWThreads Demo