puNES Emulator

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

Here's how I'd implement a pop reducer:

Make a sixth channel. If $4011 is written, and it hasn't been written in the past few frames, take the difference (new $4011 value - old $4011 value) and subtract that from the sixth channel. This way, the $4011 write before a DMC playback is exactly canceled out by the sixth channel, but timed $4011 writes (as in Joshua or Big Bird) and intentional pops used as kick drums come through fine. Then the value of this sixth channel decays exponentially over time with a half life of about a frame.

Or instead of a time criterion, you can use whether or not a sample was started along with the $4011 write.
FHorse
Posts: 232
Joined: Sat May 08, 2010 9:31 am

Version 0.41

Post by FHorse »

Changelog:
0.41 (bugfix release)
In the previous release I have fixed many bugs but it is also true that others have been added, such as an annoying disturbance of sound that, under certain circumstances, could afflict the windows version. Fixed.
User avatar
Eugene.S
Posts: 317
Joined: Sat Apr 18, 2009 4:36 am
Location: UTC+3
Contact:

Post by Eugene.S »

Thank you, FHorse.
DPCM POP reducer is very good.
But Castlevania II still have some pops.

I've found a resize-bug with OpenGL renderer
Linux Mint 9 / GMA4500 (intel G41 Video).

download example
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

I have what tepples said about the pop reducer, but it only reduces the volume by half and it decays. In short words, I had to put a flag on $4011 to manually disable writes into.

(I smell a topic split)
FHorse
Posts: 232
Joined: Sat May 08, 2010 9:31 am

Post by FHorse »

Zepper, I'm sorry for not having replied earlier but I was not convinced of my solution of the pop-reducer and in fact Eugene has confirmed my doubts. I tried the method of tepples and I think it works great (by the way, do you mind if I shamelessly steal the idea? Tepples please :) ).
Last edited by FHorse on Sat Nov 12, 2011 4:48 pm, edited 1 time in total.
User avatar
Eugene.S
Posts: 317
Joined: Sat Apr 18, 2009 4:36 am
Location: UTC+3
Contact:

Post by Eugene.S »

This version is better.
Can you add simply bilinear intepolation filter and TV-aspect window proportions? (4:3, when NTSC filter is disabled)
----

whoops, battletoads/bt&dd haven't DPCM-sound in latest build.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

FHorse wrote:I tried the [pop reduction] method of tepples and I think it works great (by the way, do you mind if I shamelessly steal the idea? Tepples please :) ).
Go ahead.
Eugene.S wrote:Can you add simply bilinear intepolation filter and TV-aspect window proportions? (4:3, when NTSC filter is disabled)
NTSC TV aspect means rescaling the image to 584x480.
whoops, battletoads/bt&dd haven't DPCM-sound in latest build.
These games play samples with timed writes to $4011, as do Big Bird and Joshua. Only the first write to $4011 after a few frames of no writes should result in a change to the sixth channel.
FHorse
Posts: 232
Joined: Sat May 08, 2010 9:31 am

Post by FHorse »

Eugene please you can try this version? (Battletoads, Castelvania II etc.)
Last edited by FHorse on Sun Nov 13, 2011 4:44 pm, edited 2 times in total.
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

How do I open that file?
User avatar
Dwedit
Posts: 4921
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

It's an elf file, presumably for Linux.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
Eugene.S
Posts: 317
Joined: Sat Apr 18, 2009 4:36 am
Location: UTC+3
Contact:

Post by Eugene.S »

Eugene please you can try this version? (Battletoads, Castelvania II etc.)
Soft and nice sound. Probably best build.
FHorse
Posts: 232
Joined: Sat May 08, 2010 9:31 am

Post by FHorse »

Eugene.S wrote:Soft and nice sound. Probably best build.
I've used always tepples solution with one difference: enabling the writing of 4011 after 110 cycles (APU) from last write other than a few frames. I chose 110 after several trials with different values​​. With small values, some games still do pop and with higher values, other games were cut effects of the DMC.
Last edited by FHorse on Sun Nov 13, 2011 4:22 am, edited 1 time in total.
User avatar
Eugene.S
Posts: 317
Joined: Sat Apr 18, 2009 4:36 am
Location: UTC+3
Contact:

Post by Eugene.S »

Interesting, how it's realized in Nestopia?
FHorse
Posts: 232
Joined: Sat May 08, 2010 9:31 am

Version 0.42

Post by FHorse »

Changelog:
0.42
Added a popping sound reducer for games (like Castelvania II, Batman, Ninja Gaiden 3) that have a drum imitation that causing a large jump in the output level for a short period of time through the register $4011 (thx to Eugene.s for the report and Tepples for the help).
Added "Overscan" option in the video menu that reduce the visible scanline from 240 to 224 by cutting the first and the last 8 scanlines. This setting is specific for the rom in use. If you change it, will be remembered when you open them again. If you set to "Default", puNES will always use the setting checked in "Default value" menu.

P.s.
Eugene.S wrote:Can you add simply bilinear intepolation filter and TV-aspect window proportions? (4:3, when NTSC filter is disabled)
I'll do it in a future release, thanks for the suggestion :wink:
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

Is the "overscan" as simple as cutting off the top/bottom 8 lines, ina hardware level?
Post Reply