SNES NTSC Composite Video Filter
Moderator: ZSNES Mods
-
- ZSNES Developer
- Posts: 6747
- Joined: Tue Dec 28, 2004 6:47 am
-
- ZSNES Developer
- Posts: 6747
- Joined: Tue Dec 28, 2004 6:47 am
Yeah, the Blend Frames option never completely disabled flickering; I fixed that in the code I send to pagefault a couple of days ago. I'm not sure why the GUI would need updating, because I didn't add/remove any options (I just changed the "hue warping" slider to do "enhancement" instead, which adjusts the amount of artifacts, useful in combination with increasing the sharpness). If I could access the damn CVS without a lot of trouble, I'd take a look at the rest of the code.
-
- ZSNES Developer
- Posts: 6747
- Joined: Tue Dec 28, 2004 6:47 am
blargg, we have an SVN thread: http://board.zsnes.com/phpBB2/viewtopic.php?t=7371blargg wrote:Yeah, the Blend Frames option never completely disabled flickering; I fixed that in the code I send to pagefault a couple of days ago. I'm not sure why the GUI would need updating, because I didn't add/remove any options (I just changed the "hue warping" slider to do "enhancement" instead, which adjusts the amount of artifacts, useful in combination with increasing the sharpness). If I could access the damn CVS without a lot of trouble, I'd take a look at the rest of the code.
If you have any troubles, please let us know.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
-
- Seen it all
- Posts: 2302
- Joined: Mon Jan 03, 2005 5:04 pm
- Location: Germany
- Contact:
I guess it's the same for 120 Hz? Will have to try later...
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
bsnes launcher with recent files list
120 Hz will probably also work well with blend OFF.
OK, I was just able to look at the current NTSC code using the Safari web browser on Mac OS X (that Bounty Source SVN viewer apparently puts some heavy requirements on the web browser, preventing older ones from working). I see that several presets have been added and every NTSC control exposed in the UI. This makes it a bit more complex to configure, though I guess some people might want full control of everything.
By the looks of the source, when the user has selected a preset, the sliders are ignored. It'd be nice if the presets were (momentary) pushbuttons that simply moved the relevant sliders to the appropriate positions, so that they could then be fine-tuned as desired. This would also make it clearer how the sliders affect the image, so you could see for example the difference in going from S-Video to RGB (color bleed eliminated, higher resolution). Here is a function to implement the presets that way. After calling this the GUI should be updated with the new values (the same way it is when first opening, where it uses the last saved values):
I don't have a machine to run ZSNES on, but is there some way to see a live preview of what the picture will look like as you move the sliders? I seem to remember the UI covering the SNES image; if so, perhaps a small portion of the image or a fixed example image could be shown below the sliders.
If you have access to Mac OS X, take a look at how QuickNES implements the NTSC filter controls. Open an iNES file and choose Edit->Emulator Setup, then click on the Video tab. There's a popup menu of presets, with a Custom option at the bottom. Selecting a preset moves the sliders appropriately. If you then move any of the sliders, the preset popup changes to Custom, making it clear that you're not using a preset anymore. Further, if you select a preset, the sliders move as before, and if you then select Custom from the popup, they move back to your previous custom settings. This allows you to compare with a preset without losing your custom settings.
OK, I was just able to look at the current NTSC code using the Safari web browser on Mac OS X (that Bounty Source SVN viewer apparently puts some heavy requirements on the web browser, preventing older ones from working). I see that several presets have been added and every NTSC control exposed in the UI. This makes it a bit more complex to configure, though I guess some people might want full control of everything.
By the looks of the source, when the user has selected a preset, the sliders are ignored. It'd be nice if the presets were (momentary) pushbuttons that simply moved the relevant sliders to the appropriate positions, so that they could then be fine-tuned as desired. This would also make it clearer how the sliders affect the image, so you could see for example the difference in going from S-Video to RGB (color bleed eliminated, higher resolution). Here is a function to implement the presets that way. After calling this the GUI should be updated with the new values (the same way it is when first opening, where it uses the last saved values):
Code: Select all
void set_ntsc_preset( int i )
{
static const signed char presets [4] [6] = {
/*Sharp Sat Res Art Fringe Bleed */
{ 0, 0, 0, 0, 0, 0},/* Composite */
{20, 0, 20, -100, -100, 0},/* S-Video */
{20, 0, 70, -100, -100, -100},/* RGB */
{20, -100, 20, -20, -20, -100} /* Monochrome */
};
if ( i >= 0 && i < 4 )
{
NTSCSharp = presets [i] [0];
NTSCSat = presets [i] [1];
NTSCRes = presets [i] [2];
NTSCArt = presets [i] [3];
NTSCFringe = presets [i] [4];
NTSCBleed = presets [i] [5];
NTSCFilterInit();
}
}
If you have access to Mac OS X, take a look at how QuickNES implements the NTSC filter controls. Open an iNES file and choose Edit->Emulator Setup, then click on the Video tab. There's a popup menu of presets, with a Custom option at the bottom. Selecting a preset moves the sliders appropriately. If you then move any of the sliders, the preset popup changes to Custom, making it clear that you're not using a preset anymore. Further, if you select a preset, the sliders move as before, and if you then select Custom from the popup, they move back to your previous custom settings. This allows you to compare with a preset without losing your custom settings.
yep moving the sliders in the windows version allow us to (with the "refresh" option ticked and with having the gui filtering option turned on aswell.) see the change on the gui while adjusting slidersblargg wrote:I don't have a machine to run ZSNES on, but is there some way to see a live preview of what the picture will look like as you move the sliders? I seem to remember the UI covering the SNES image; if so, perhaps a small portion of the image or a fixed example image could be shown below the sliders.
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
Blargg thanks for the advice. I was originally going to do this but I ran out of time and needed to get to bed last night so I will finish implmenting this feature today. Currently you can see your changes as the sliders move. I must say the new filter is very impressive.
I just wanted to make sure everyone had it working first as well.
I just wanted to make sure everyone had it working first as well.
-
- ZSNES Developer
- Posts: 6747
- Joined: Tue Dec 28, 2004 6:47 am
More power!blargg wrote:OK, I was just able to look at the current NTSC code using the Safari web browser on Mac OS X (that Bounty Source SVN viewer apparently puts some heavy requirements on the web browser, preventing older ones from working). I see that several presets have been added and every NTSC control exposed in the UI. This makes it a bit more complex to configure, though I guess some people might want full control of everything.

If the sample code had all the preset values, it would be nicer (details are always cool.By the looks of the source, when the user has selected a preset, the sliders are ignored. It'd be nice if the presets were (momentary) pushbuttons that simply moved the relevant sliders to the appropriate positions, so that they could then be fine-tuned as desired. This would also make it clearer how the sliders affect the image, so you could see for example the difference in going from S-Video to RGB (color bleed eliminated, higher resolution). Here is a function to implement the presets that way. After calling this the GUI should be updated with the new values (the same way it is when first opening, where it uses the last saved values):
Code: Select all
void set_ntsc_preset( int i ) { static const signed char presets [4] [6] = { /*Sharp Sat Res Art Fringe Bleed */ { 0, 0, 0, 0, 0, 0},/* Composite */ {20, 0, 20, -100, -100, 0},/* S-Video */ {20, 0, 70, -100, -100, -100},/* RGB */ {20, -100, 20, -20, -20, -100} /* Monochrome */ }; if ( i >= 0 && i < 4 ) { NTSCSharp = presets [i] [0]; NTSCSat = presets [i] [1]; NTSCRes = presets [i] [2]; NTSCArt = presets [i] [3]; NTSCFringe = presets [i] [4]; NTSCBleed = presets [i] [5]; NTSCFilterInit(); } }

Use the "None" preset option, though, that probably could be renamed to "Custom".I don't have a machine to run ZSNES on, but is there some way to see a live preview of what the picture will look like as you move the sliders? I seem to remember the UI covering the SNES image; if so, perhaps a small portion of the image or a fixed example image could be shown below the sliders.
I was thinking that could be added as I also thought it would be a requested feature. I was thinking more along the lines, as the presets set the settings, and then you go back to "None/Custom" to tweak off the base.If you have access to Mac OS X, take a look at how QuickNES implements the NTSC filter controls. Open an iNES file and choose Edit->Emulator Setup, then click on the Video tab. There's a popup menu of presets, with a Custom option at the bottom. Selecting a preset moves the sliders appropriately. If you then move any of the sliders, the preset popup changes to Custom, making it clear that you're not using a preset anymore. Further, if you select a preset, the sliders move as before, and if you then select Custom from the popup, they move back to your previous custom settings. This allows you to compare with a preset without losing your custom settings.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
I'm not following. set_ntsc_preset() changes all relevant values for each setting; the ones not changed (hue, brightness, etc.) are not relevant, and it would be annoying to the user anyway.If the sample code had all the preset values, it would be nicer (details are always cool).
The pushbutton method (same way as Nestopia implements it) is best; having it modal with radio buttons won't be as pleasant for the user. The key point is that the user can use the presets as a starting point for customization. "Let's try Composite. Hmmm, a bit grainy, how about S-Video? Better. Now let's increase sharpness and resolution. Perfect." The QuickNES implementation described simply makes it clear whether the preset has been customized at all, otherwise it's the same as the pushbutton.I was thinking that could be added as I also thought it would be a requested feature. I was thinking more along the lines, as the presets set the settings, and then you go back to "None/Custom" to tweak off the base.
-
- ZSNES Developer
- Posts: 6747
- Joined: Tue Dec 28, 2004 6:47 am
Don't worry about it.blargg wrote:I'm not following. set_ntsc_preset() changes all relevant values for each setting; the ones not changed (hue, brightness, etc.) are not relevant, and it would be annoying to the user anyway.If the sample code had all the preset values, it would be nicer (details are always cool).
I had it as buttons initially.The pushbutton method (same way as Nestopia implements it) is best; having it modal with radio buttons won't be as pleasant for the user. The key point is that the user can use the presets as a starting point for customization. "Let's try Composite. Hmmm, a bit grainy, how about S-Video? Better. Now let's increase sharpness and resolution. Perfect." The QuickNES implementation described simply makes it clear whether the preset has been customized at all, otherwise it's the same as the pushbutton.I was thinking that could be added as I also thought it would be a requested feature. I was thinking more along the lines, as the presets set the settings, and then you go back to "None/Custom" to tweak off the base.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
blargg, may I bother you to please post snes-ntsc_0.2.2, assuming it's finalized? I still have v0.2.1 from your page.
I was planning on redoing my GUI anyway, so I may as well add the latest version and controls for all of the options your library supports that my palette lookup table doesn't already.
Also, are the setting changes realtime? Or can you add a function that I can call to immediately recalculate all of the tables? I'd like the sliders to be adjustable while a game is playing so a user can observe them without a restart.
Excellent work, as always, by the way :)
I was planning on redoing my GUI anyway, so I may as well add the latest version and controls for all of the options your library supports that my palette lookup table doesn't already.
Also, are the setting changes realtime? Or can you add a function that I can call to immediately recalculate all of the tables? I'd like the sliders to be adjustable while a game is playing so a user can observe them without a restart.
Excellent work, as always, by the way :)
Heh, well, change things only when reason moves you.pagefault wrote:We have changed everything to meet your concerns.
Yeah, I should be posting several NTSC filters in a few days. I don't think there are any functional changes between snes_ntsc 0.2.1 and 0.2.2. It's mainly a switch to a version using a common set of code shared by all the NTSC filters (a huge help to me), and a nicer demo.byuu wrote:blargg, may I bother you to please post snes-ntsc_0.2.2, assuming it's finalized?
Yeah, call snes_ntsc_init() whenever you want to change the settings. I figured you already had live sliders by now.Also, are the setting changes realtime? Or can you add a function that I can call to immediately recalculate all of the tables? I'd like the sliders to be adjustable while a game is playing so a user can observe them without a restart.

Awesome, thank you :DYeah, I should be posting several NTSC filters in a few days. I don't think there are any functional changes between snes_ntsc 0.2.1 and 0.2.2. It's mainly a switch to a version using a common set of code shared by all the NTSC filters (a huge help to me), and a nicer demo.
Hmm, I thought you said above you ironed out the blend frames option, but maybe you were meaning 0.2.0->0.2.1, since ZSNES was using the older one. Either way though, I'm happy to upgrade, especially if it makes things easier for you in the future.
Cool, will do. Unfortunately, I do not. Haven't really done much with my GUI in the last few months. I'm definitely interested in adding the options, though. The NTSC filter is the closest we can ever get to nostalgia on our high-resolution LCD monitors, so it would seem, heh.Yeah, call snes_ntsc_init() whenever you want to change the settings. I figured you already had live sliders by now.
Now we just need to add Richard Bannister's "TV tube curvature" effect in to our emulators :)
byuu: Take a look at the header file. Also, I e-mailed your gmail account about the filter.
pagefault: the composite profile matches closely what a video capture of my SNES looks like (which admittedly looks like crap as compared to how it looks on a TV). The presets are mainly a guide and convenience for a basic implementation of the filter; if you can come up with better settings, by all means use them (one can spend quite a bit of time fine-tuning these things to match a TV).
pagefault: the composite profile matches closely what a video capture of my SNES looks like (which admittedly looks like crap as compared to how it looks on a TV). The presets are mainly a guide and convenience for a basic implementation of the filter; if you can come up with better settings, by all means use them (one can spend quite a bit of time fine-tuning these things to match a TV).
Hahaha what? ...why would someone implement the entire NTSC filter for your desktop when all you want is a hue change (which can be achieved in many other infinitely simpler ways)? Do you even know what the point of the filter is? Do you even know what it does?GashouseGorilla wrote:I LOVE THIS FILTER!!!!
Now Blargg, could you please, PLEASE, make this filter so that it works for my entire desktop and all the programs that run under it? Because on my laptop, red looks pink, and I want to change the hue so that it's red once and for all!
[size=75][b]Procrastination.[/b]
Hard Work Often Pays Off After Time, but Laziness Always Pays Off Now.[/size]
Hard Work Often Pays Off After Time, but Laziness Always Pays Off Now.[/size]
-
- ZSNES Developer
- Posts: 6747
- Joined: Tue Dec 28, 2004 6:47 am
It is all about teh pretty colors!blackmyst wrote:Hahaha what? ...why would someone implement the entire NTSC filter for your desktop when all you want is a hue change (which can be achieved in many other infinitely simpler ways)? Do you even know what the point of the filter is? Do you even know what it does?GashouseGorilla wrote:I LOVE THIS FILTER!!!!
Now Blargg, could you please, PLEASE, make this filter so that it works for my entire desktop and all the programs that run under it? Because on my laptop, red looks pink, and I want to change the hue so that it's red once and for all!
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
-
- ZSNES Developer
- Posts: 6747
- Joined: Tue Dec 28, 2004 6:47 am
Your video card utilities (for ATI+NVidia video cards) are the solution more often than not. Unfortunately using crappy integrated Intel video wouldn't do you any good....GashouseGorilla wrote:All right then, tell be the BEST way to change the hue for my desktop and all the programs that run under it, because I've tried several of them and none of them worked.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...