SNES NTSC Composite Video Filter
Moderator: ZSNES Mods
It would be cooler if it supported automatic aspect correction, too. Modes like 1280x1024 throw an extra level of difficulty into the mix. Here you have a 4:3 monitor, with a 5:4 video mode trying to display an 8:7 video game in the proper aspect ratio.
So far, I just pretend all modes are 4:3. But I think what really needs to be done is to specify what the per-pixel dimensions are, eg height_size / width_size * height = width (5/4*1024=1280), and use that number to convert the pixel size to 8:7, and then multiply that by height to get your final width. And -then- add an option to recursively go through all possible x224 height combinations to find the best fit for the current mode. Fun, hm?
So far, I just pretend all modes are 4:3. But I think what really needs to be done is to specify what the per-pixel dimensions are, eg height_size / width_size * height = width (5/4*1024=1280), and use that number to convert the pixel size to 8:7, and then multiply that by height to get your final width. And -then- add an option to recursively go through all possible x224 height combinations to find the best fit for the current mode. Fun, hm?
Sorry if this is a stupid suggestion, but have you tried creating a custom resolution with powerstrip? I've had no trouble creating a 1200x892 @ 60hz mode on my machine (again, sorry if I'm being completely off-track here)byuu wrote:1200x892 is a tiny bit off, but close enough. Unfortunately, none of my five systems support that resolution![]()
If I remember correctly, they weren't black in real hardware.kick wrote:I appreciate proper aspect ratio,and I don't mind letterboxing.Actually,I love to see the black bars in PAL mode.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.
Perhaps there's something that can be done here to make it more accurate, like filling the unused screen border with the proper color?

They look pretty black to me.ICEknight wrote:If I remember correctly, they weren't black in real hardware.kick wrote:I appreciate proper aspect ratio,and I don't mind letterboxing.Actually,I love to see the black bars in PAL mode.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.
Perhaps there's something that can be done here to make it more accurate, like filling the unused screen border with the proper color?
[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]
I invoke my level 10 "Sneaky Bastard" skill to take advantage of this bumped topic:
Any chance this filter could be upgraded to the latest, greatest version? I just don't have the kind of chutzpah it'd take to do it myself, but once it's done it will probably work on the Mac port. My futile attempts ended up producing weird, half-filled screens.
Any chance this filter could be upgraded to the latest, greatest version? I just don't have the kind of chutzpah it'd take to do it myself, but once it's done it will probably work on the Mac port. My futile attempts ended up producing weird, half-filled screens.
Only a couple screws loose.
-
- ZSNES Developer
- Posts: 6747
- Joined: Tue Dec 28, 2004 6:47 am
I'd like to think it would happen at some point. However, just plugging the code in simply won't work.BRPXQZME wrote:I invoke my level 10 "Sneaky Bastard" skill to take advantage of this bumped topic:
Any chance this filter could be upgraded to the latest, greatest version? I just don't have the kind of chutzpah it'd take to do it myself, but once it's done it will probably work on the Mac port. My futile attempts ended up producing weird, half-filled screens.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
Can you send me a copy of your current work? All I'm getting is crashing on my end. Although I see some obvious points why the new version isn't just drop in and play.BRPXQZME wrote: Any chance this filter could be upgraded to the latest, greatest version? I just don't have the kind of chutzpah it'd take to do it myself, but once it's done it will probably work on the Mac port. My futile attempts ended up producing weird, half-filled screens.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
All I did was drop in the new code and changed the line in NTSCFilterDraw to say 288 instead of 576 (this yields half a screen instead of 1/4 of a screen; changing it to 144 looks... interesting). Pretty much anything else I tried that seemed like it'd work caused crashage. And me being me, I didn't try anything besides really cheapass fixes. I didn't look into it too hard. (Also, after about 20 minutes of good ol' fiddlin' with it, I got it to the point where I only get crashing. With either enabling interpolation, enabling ntsc, but never both with the same executable. Hrrrrumph. This is why I hate technology. I'm a CS major, so unlike the Luddites I'm not entirely unfounded here.)
In the meantime, I figured out how to fix the crashing problem with the current code. Turns, out setting SDL_HWSURFACE instead of SDL_SWSURFACE (in sw_draw.c) will give the filter addresses it likes to write to (d'oh!). The SDL_DOUBLEBUF is still a bad idea for OS X, though; with it, HQ2X goes all seizure-licious in certain modes.
In the meantime, I figured out how to fix the crashing problem with the current code. Turns, out setting SDL_HWSURFACE instead of SDL_SWSURFACE (in sw_draw.c) will give the filter addresses it likes to write to (d'oh!). The SDL_DOUBLEBUF is still a bad idea for OS X, though; with it, HQ2X goes all seizure-licious in certain modes.
Only a couple screws loose.
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
That doesn't help me, I'm only using Linux.BRPXQZME wrote: In the meantime, I figured out how to fix the crashing problem with the current code. Turns, out setting SDL_HWSURFACE instead of SDL_SWSURFACE (in sw_draw.c) will give the filter addresses it likes to write to (d'oh!). The SDL_DOUBLEBUF is still a bad idea for OS X, though; with it, HQ2X goes all seizure-licious in certain modes.
This line is crashing for me:
SNES_NTSC_LORES_OUT( 0, line_out [0], SNES_NTSC_OUT_DEPTH );
And I've yet to figure out why...
Although I have yet to take out the really really big guns.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
Yay for progress!

Cookie if you know which game that's from.

Cookie if you know which game that's from.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
I am currently banging my head on the wall, however...


May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- Devil's Advocate
- Posts: 2293
- Joined: Mon Aug 02, 2004 7:51 pm
- Location: Hmo. Son.
-
- ZSNES Developer
- Posts: 6747
- Joined: Tue Dec 28, 2004 6:47 am
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
Cookies to byuu and Joe Camacho.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
Helps me, it doesn't crash anymoreNach wrote:That doesn't help me, I'm only using Linux.BRPXQZME wrote: In the meantime, I figured out how to fix the crashing problem with the current code. Turns, out setting SDL_HWSURFACE instead of SDL_SWSURFACE (in sw_draw.c) will give the filter addresses it likes to write to (d'oh!). The SDL_DOUBLEBUF is still a bad idea for OS X, though; with it, HQ2X goes all seizure-licious in certain modes.

(I do believe that deathlike has been denied a cookie, more importantly)
Only a couple screws loose.
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
There was no cookie offered for the Super Metroid pic, that was too obvious.
blargg, you know where to reach us if you want to discuss anything.
blargg, you know where to reach us if you want to discuss anything.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
Hey blargg, I have a question for you...
How are you outputting the graphics in this version, from what I can you are doing it per line? Does that mean I call this 60 times per second and build a buffer? How should I go about implementing this properly. Before it was easy just taking a buffer of the complete frame. I will have to do some rework on our blitters if this is the case.
Thanks.
How are you outputting the graphics in this version, from what I can you are doing it per line? Does that mean I call this 60 times per second and build a buffer? How should I go about implementing this properly. Before it was easy just taking a buffer of the complete frame. I will have to do some rework on our blitters if this is the case.
Thanks.