SNES NTSC Composite Video Filter

Strictly for discussing ZSNES development and for submitting code. You can also join us on IRC at irc.libera.chat in #zsnes.
Please, no requests here.

Moderator: ZSNES Mods

Post Reply
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

The 'real' PAL filter would also stretch less the input buffer vertically while keeping the same resolutiion as output, so that the black bars appear.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Blasingame
Hazed
Posts: 61
Joined: Mon Mar 13, 2006 1:44 am

Post by Blasingame »

is there, or is it in the works, to make a clean stretch of the NTSC filter in fullscreen mode??
Cornellius
Rookie
Posts: 11
Joined: Fri May 19, 2006 5:36 am

Post by Cornellius »

The filter is awesome. However, I have some questions. To get the best results, which settings should I use ? I run at 60 Hz and I use Zsnes in fullscreen with 800 x 600. I also noticed that using Vsync can disable the "pixel dancing". What about tripple buffering ? Is it supposed to do something, while using NTSC I mean ?
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

Triple Buffering is a special version of VSync, using an additional buffer to speed up the drawing.
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
blackmyst
Zealot
Posts: 1161
Joined: Sun Sep 26, 2004 8:36 pm
Location: Place.

Post by blackmyst »

While we're on that topic....is "double buffering" the same as vsync?
[size=75][b]Procrastination.[/b]
Hard Work Often Pays Off After Time, but Laziness Always Pays Off Now.[/size]
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

Yes. link
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
paulguy
Zealot
Posts: 1076
Joined: Sat Jul 02, 2005 2:01 am
Contact:

Post by paulguy »

luniks p0rt plz :p
UnduTheGun
New Member
Posts: 6
Joined: Fri Mar 24, 2006 12:05 am

Post by UnduTheGun »

I thought pagefault told us to wait :p
Firon
Trooper
Posts: 361
Joined: Fri May 05, 2006 4:37 pm
Contact:

Post by Firon »

The only thing I wish ZSNES would do was change the refresh rate to 60Hz when switching to fullscreen mode with this filter on.

I've noticed that if you use 768x672 DR W and turn on the filter, the screen stretches out to 1152x864 or something. Using it with 800x600 W makes it shrink to something smaller than 640x480, and 1024x768W makes it stretch out to the same size it stretched to with 768x672. Pretty much every single windowed resolution is wonky (and it no longer lets you use it with 512x448)
franpa
Gecko snack
Posts: 2374
Joined: Sun Aug 21, 2005 11:06 am
Location: Australia, QLD
Contact:

Post by franpa »

pass the command line -T to zsnes.exe
Last edited by franpa on Sat May 27, 2006 1:54 am, edited 1 time in total.
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

pass the command line parameter -6 to zsnesw.exe
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
pagefault
ZSNES Developer
ZSNES Developer
Posts: 812
Joined: Tue Aug 17, 2004 5:24 am
Location: In your garden

Post by pagefault »

How do I stretch in 600x448 in fullscreen withoun scaling the scanlines. and
how do I scale this in fullscreen at say 1024x768. Is it possible or do we place black bars around everything so the image is directly 2x scales from 600x448. Because this wouldn't work. We would have 1.80x scaling which causes with DirectDraw filtering a nasty mess.

My solutions are: Scale the image with no scanline and add my own

output the same surface size as res (no interpolation), will require filter to do this. Only limit NTSC filter to reoslutions that can support it and letterbox. 1200x896 would be res after 640x480. Or let me stretch it and add my own scanlines again it will probably be filtered but scanlines would be working

I guess what I am asking is there is a snes_ntsc that can take a source and output any surface size I want? This would solve all my problems.
byuu

Post by byuu »

The 600x448 size is hardcoded into the filter. Let people bitch about letterboxing. Those of us with eyes will appreciate the proper aspect ratio and non-blurry scanlines.

But, if you insist ... render the 600x448 image to an offscreen plain, then scaled blit that to the screen, and then use another offscreen plain as your scanlines and blit those onto the screen as well. You'd need D3D for the fast hardware alpha blending. You at least have a bit more control over the scanline appearance this way, but you'll never have it looking just right unless you use the ever elusive 1792x1344 video mode :D
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

If a proper scanline display is roughly 1/3 line off, why not turn the NTSC filter into a 3x filter ?
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
byuu

Post by byuu »

Because 224*2=672, a height that doesn't exist? :P

The only perfect multiple height resolution for NTSC is 1792x1344, and it also has correct aspect ratio as well. Great mode, horribly taxing even on my GeForce 6600 LE.

PAL is of course easier if you actually like the black bar. 640x480 and above looks acceptable with proper aspect ratio.
Firon
Trooper
Posts: 361
Joined: Fri May 05, 2006 4:37 pm
Contact:

Post by Firon »

creaothceann: thanks for the tip!
franpa
Gecko snack
Posts: 2374
Joined: Sun Aug 21, 2005 11:06 am
Location: Australia, QLD
Contact:

Post by franpa »

oh... mental block... sorry firon.
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
kick
Trooper
Posts: 550
Joined: Wed Mar 01, 2006 8:47 pm

Post by kick »

The 600x448 size is hardcoded into the filter. Let people bitch about letterboxing. Those of us with eyes will appreciate the proper aspect ratio and non-blurry scanlines.
I appreciate proper aspect ratio,and I don't mind letterboxing.Actually,I love to see the black bars in PAL mode.
The only perfect multiple height resolution for NTSC is 1792x1344
Having this option will be great. I'll use that mode when it's available.

It really depends on your video card.Having great pixel shader performance does not always give you a better performance in 2D (SNES) emulation.For example,a "mighty" (at the time) DX9 Radeon 9600 (Pro) was actually way slower than a much older DX8.1 Radeon 8500 LE.
pagefault
ZSNES Developer
ZSNES Developer
Posts: 812
Joined: Tue Aug 17, 2004 5:24 am
Location: In your garden

Post by pagefault »

Well I can pull a full 60 fps and even faster with fast forward on my 9800 pro. So I would assume most people should be able to.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

byuu wrote:Because 224*2=672, a height that doesn't exist? :P

The only perfect multiple height resolution for NTSC is 1792x1344, and it also has correct aspect ratio as well.
Surely you meant 224*3 = 672.

But why would "1792x1344" exist and not "896x672" ? ZSNES can do 768x672, I really don't see why it couldn't do 896x672.
Actually I don't even know what you mean by 'height that doesn't exist'. A height is just a value, why would a number not exist ?
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

grinvader wrote:
byuu wrote:Because 224*2=672, a height that doesn't exist? :P

The only perfect multiple height resolution for NTSC is 1792x1344, and it also has correct aspect ratio as well.
Surely you meant 224*3 = 672.

But why would "1792x1344" exist and not "896x672" ? ZSNES can do 768x672, I really don't see why it couldn't do 896x672.
Actually I don't even know what you mean by 'height that doesn't exist'. A height is just a value, why would a number not exist ?
Might have something to do with DirectDraw/Direct3D not allowing the screen to be any size you can dream of, a limitation OpenGL does not have.
But then again, what do I know from these things?
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
kick
Trooper
Posts: 550
Joined: Wed Mar 01, 2006 8:47 pm

Post by kick »

The closest I can select with DDraw/D3D is 848x480,but not 896x672.It is a limitation of DD/D3D .
Well I can pull a full 60 fps and even faster with fast forward on my 9800 pro.
9800Pro,on the other hand is a different kind of beast :)
pagefault
ZSNES Developer
ZSNES Developer
Posts: 812
Joined: Tue Aug 17, 2004 5:24 am
Location: In your garden

Post by pagefault »

pagefault wrote:
grinvader wrote: But why would "1792x1344" exist and not "896x672" ? ZSNES can do 768x672, I really don't see why it couldn't do 896x672.
Actually I don't even know what you mean by 'height that doesn't exist'. A height is just a value, why would a number not exist ?
The windows port in SVN uses 1200x892 as a 2x and it's perfectly aspect ratio correct for the scanlines.
byuu

Post by byuu »

1200x892 is a tiny bit off, but close enough. Unfortunately, none of my five systems support that resolution :(

I'd love to get a monitor+video card combo that did either 50+60hz or 100+120hz, and supported 1200x892 as well as interlaced modes. Amazing how common NTSC is and yet we don't have any generic resolutions to support playing video made for it. Mode X has plenty, but of course you can't do interlaced / hires modes that way.
Surely you meant 224*3 = 672.
Of course. Funny how I proofread all of my posts and still miss things like that.
Might have something to do with DirectDraw/Direct3D not allowing the screen to be any size you can dream of, a limitation OpenGL does not have.
OpenGL might not have the limitation, but your video card as well as your monitor will. That, or OpenGL is just picking the next highest resolution and interpolating the result. Which would of course ruin the scanlines in the process.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

byuu wrote: OpenGL might not have the limitation, but your video card as well as your monitor will. That, or OpenGL is just picking the next highest resolution and interpolating the result. Which would of course ruin the scanlines in the process.
From what I've seen, if the image is too big it won't work. But any size that fits within, it will display that, although it will center the picture within the size next supported by 4:3 or something.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Post Reply