
Black line - annoying!
Moderator: ZSNES Mods
Black line - annoying!
My ZSNES has a black line on the very bottom of my emulator screen. is there any way to get rid of this?


Turn scanlines off from Config ---> Video. If you don't have scanlines enabled, then it has something to do with your video card drivers. (Which I doubt, but still)
What? people don't like a simulated TV effect?
What? people don't like a simulated TV effect?

Last edited by Agozer on Tue Feb 21, 2006 1:04 am, edited 1 time in total.
I think it's the unrendered last line of the internal screen size. The internal resolution of the SNES is 256x224 (most of the time). Except, the last line, line 224, is never rendered. Or something like that.
I'm not a developer so please excuse my imprecise terminology. I may also be completely wrong.
I'm not a developer so please excuse my imprecise terminology. I may also be completely wrong.
[url=http://zsnes-docs.sf.net]Official ZSNES Docs[/url] | [url=http://zsnes-docs.sf.net/nsrt]NSRT Guide[/url] | [url=http://endoftransmission.net/phpBB3/viewtopic.php?t=394]Using a Wiimote w/ emulators[/url]
-
- Seen it all
- Posts: 2302
- Joined: Mon Jan 03, 2005 5:04 pm
- Location: Germany
- Contact:
So there are 224 or 239 lines, and one of them is not displayed. ZSNES doesn't seem to do that right now.anomie wrote:Note that many games will set their vertical scroll values to -1 rather than 0.
This is because the SNES loads OBJ data for each scanline during the previous
scanline. The very first line, though, wouldn't have any OBJ data loaded! So
the SNES doesn't actually output scanline 0, although it does everything to
render it. These games want the first line of their tilemap to be the first
line output, so they set their VOFS registers in this manner. Note that an
interlace screen needs -2 rather than -1 to properly correct for the missing
line 0 (and an emulator would need to add 2 instead of 1 to account for this).
EDIT to clarify: ZSNES does indeed hide the first scanline, but it also removes the last one(s).
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
bsnes launcher with recent files list
-
- Veteran
- Posts: 970
- Joined: Fri Jan 21, 2005 11:15 am
- Location: Montana, United States
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Probably the rendering loop stopping too early... the issue is finding where the #*~&"! in the source the value is.
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Man, we could start having auctions for feature requests, or something...pagefault wrote:I will fix this for $20.
[url=http://zsnes-docs.sf.net]Official ZSNES Docs[/url] | [url=http://zsnes-docs.sf.net/nsrt]NSRT Guide[/url] | [url=http://endoftransmission.net/phpBB3/viewtopic.php?t=394]Using a Wiimote w/ emulators[/url]
For non-interlace lores, imagine the total screen size as 262 lines.
Line 0 is never rendered, not even by an SNES, it's just used to load addresses for future lines.
Lines 1 - 224 are rendered. But note that because we are missing the first line, that means line 224 is the first line of the next row of tiles. Most games don't bother updating this line that no TV will ever see, so it's often black or garbled data. It's best to just render 256x223, but 256x224 is a nicer resolution to use...
The rest are just vblank or whatever, not rendered. Overscan adds 15 horizontal lines, and on NTSC TVs pushes the display upwards.
Line 0 is never rendered, not even by an SNES, it's just used to load addresses for future lines.
Lines 1 - 224 are rendered. But note that because we are missing the first line, that means line 224 is the first line of the next row of tiles. Most games don't bother updating this line that no TV will ever see, so it's often black or garbled data. It's best to just render 256x223, but 256x224 is a nicer resolution to use...
The rest are just vblank or whatever, not rendered. Overscan adds 15 horizontal lines, and on NTSC TVs pushes the display upwards.
-
- Seen it all
- Posts: 2302
- Joined: Mon Jan 03, 2005 5:04 pm
- Location: Germany
- Contact:
If I was writing an emulator I'd set the window size to 256x224, with an option to render the last line normally or just black.byuu wrote:It's best to just render 256x223, but 256x224 is a nicer resolution to use...
"223" is just ... ew.
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
bsnes launcher with recent files list
Perhaps emulators could implement an option like "Render every line" or "Render only game lines" or something like that.
That would screw up resolution options, though, unless the emulator had free-form resolution options like bsnes.
That would screw up resolution options, though, unless the emulator had free-form resolution options like bsnes.
[url=http://zsnes-docs.sf.net]Official ZSNES Docs[/url] | [url=http://zsnes-docs.sf.net/nsrt]NSRT Guide[/url] | [url=http://endoftransmission.net/phpBB3/viewtopic.php?t=394]Using a Wiimote w/ emulators[/url]
Overscan support is required for some games. Besides where do you draw the line, what exactly is overscan? It varies from TV to TV. There is no definitive way to cut it off. For example I can see everything in overscan on all my TV's so I see no reason to not display it. It was a decision we made a while ago and we are sticking to it.
Then you must have a PAL TV, pagefault.
Overscan is an artifact from old TV sets. Basically, there was line noise showing up at the bottom of NTSC televisions (or something like that, been forever since I read up on it). So overscan basically draws a couple extra lines at the bottom and "shifts" the image up. If you think about it, there are the same number of vertical lines on your television with overscan on or off. If 224 lines (doubled for non-interlace) fills your entire screen, then 240 lines cannot possibly fit on it. Instead, the image is shifted upwards, so the top eight lines and the bottom eight lines are cut off. At least, this is what happens on NTSC televisions, and I've proven that with my own TV.
On PAL TVs, I have absolutely no idea what happens. I'm guessing the bottom 16 lines are black, and enabling overscan simply causes them to be drawn. My best guess for this is to give the user an option to select their TV type. NTSC mode will cut off the extra lines, and PAL mode will either center the image with overscan off, or show the big black bar at the bottom like SNES9x.
Oh, and I'm sorry if I gave you the impression I was telling you what to do for ZSNES. I was meaning more for my own purposes. You're obviously free to code ZSNES however you see fit.
As for the extra one line, who the hell knows. Make it an option, too? Then you have a problem with user-defined resolutions. You'd need to move to a system where you no longer go by resolutions, but features enabled.
e.g.
video.mode0 = "SWfilter=HQ2x;TVmode=NTSC;Mag=100%;ExtraLine=no;AspectCorrect=no" -> 512x446 (HQ2x doubles resolution)
video.mode1 = "SWfilter=none;TVmode=PAL;Mag=200%;ExtraLine=yes;AspectCorrect=yes" -> 640x480
AspectCorrect causes problems then for non-4:3 monitors, and again for non-4:3 video modes (1280x1024 et al). Fun, fun, fun.
Overscan is an artifact from old TV sets. Basically, there was line noise showing up at the bottom of NTSC televisions (or something like that, been forever since I read up on it). So overscan basically draws a couple extra lines at the bottom and "shifts" the image up. If you think about it, there are the same number of vertical lines on your television with overscan on or off. If 224 lines (doubled for non-interlace) fills your entire screen, then 240 lines cannot possibly fit on it. Instead, the image is shifted upwards, so the top eight lines and the bottom eight lines are cut off. At least, this is what happens on NTSC televisions, and I've proven that with my own TV.
On PAL TVs, I have absolutely no idea what happens. I'm guessing the bottom 16 lines are black, and enabling overscan simply causes them to be drawn. My best guess for this is to give the user an option to select their TV type. NTSC mode will cut off the extra lines, and PAL mode will either center the image with overscan off, or show the big black bar at the bottom like SNES9x.
Oh, and I'm sorry if I gave you the impression I was telling you what to do for ZSNES. I was meaning more for my own purposes. You're obviously free to code ZSNES however you see fit.
As for the extra one line, who the hell knows. Make it an option, too? Then you have a problem with user-defined resolutions. You'd need to move to a system where you no longer go by resolutions, but features enabled.
e.g.
video.mode0 = "SWfilter=HQ2x;TVmode=NTSC;Mag=100%;ExtraLine=no;AspectCorrect=no" -> 512x446 (HQ2x doubles resolution)
video.mode1 = "SWfilter=none;TVmode=PAL;Mag=200%;ExtraLine=yes;AspectCorrect=yes" -> 640x480
AspectCorrect causes problems then for non-4:3 monitors, and again for non-4:3 video modes (1280x1024 et al). Fun, fun, fun.
de·fect: The lack of something necessary or desirable for completion or perfection; a deficiency: a visual defect.
pun: A play on words, sometimes on different senses of the same word and sometimes on the similar sense or sound of different words.
hu·mor: The quality that makes something laughable or amusing; funniness: could not see the humor of the situation.
page·fault: See last example.
damn you'd think I typed this shit into dictionary.com by hand or something!
maybe the race card would be more to your liking?
pun: A play on words, sometimes on different senses of the same word and sometimes on the similar sense or sound of different words.
hu·mor: The quality that makes something laughable or amusing; funniness: could not see the humor of the situation.
page·fault: See last example.
damn you'd think I typed this shit into dictionary.com by hand or something!
maybe the race card would be more to your liking?
[url=http://www.alexchiu.com/affiliates/clickthru.cgi?id=phonymike]ultimate immortality[/url]
[url=http://www.sloganizer.net/en/][img]http://www.sloganizer.net/en/image,zsnes,white,purple.png[/img][/url]
[url=http://www.sloganizer.net/en/][img]http://www.sloganizer.net/en/image,zsnes,white,purple.png[/img][/url]
-
- Seen it all
- Posts: 2302
- Joined: Mon Jan 03, 2005 5:04 pm
- Location: Germany
- Contact:
I've finally updated my rendering code, and now I see that ZSNES gets it right. The first line is not drawn at all, so the entire screen content is shifted up by one pixel. Line 0 of the screen gets line 1 of the tilemap (if the scrolling register is set to zero). This makes the next line of tiles visible, which are is often garbage. Hence the black line.
Screenshots of SMW's title screen:
bsnes - 223 lines
SNES9x - 224 lines, last one is garbage
ZSNES - 224 lines, last one is black; screenshot files have 223 lines
vSNES - 224 lines, last one is garbage
IMO it'd be nice if there's an option in ZSNES for rendering the last line or not, and screenshot files would have the same number of lines as the emulator window. The documentation should mention the reason for the black line.
Screenshots of SMW's title screen:
bsnes - 223 lines
SNES9x - 224 lines, last one is garbage
ZSNES - 224 lines, last one is black; screenshot files have 223 lines
vSNES - 224 lines, last one is garbage
IMO it'd be nice if there's an option in ZSNES for rendering the last line or not, and screenshot files would have the same number of lines as the emulator window. The documentation should mention the reason for the black line.
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
bsnes launcher with recent files list
Not to mention games compensate for the missing scanline in VOFS.creaothceann wrote:I've finally updated my rendering code, and now I see that ZSNES gets it right. The first line is not drawn at all, so the entire screen content is shifted up by one pixel. Line 0 of the screen gets line 1 of the tilemap (if the scrolling register is set to zero). This makes the next line of tiles visible, which are is often garbage. Hence the black line.
Screenshots of SMW's title screen:
bsnes - 223 lines
SNES9x - 224 lines, last one is garbage
ZSNES - 224 lines, last one is black; screenshot files have 223 lines
vSNES - 224 lines, last one is garbage
IMO it'd be nice if there's an option in ZSNES for rendering the last line or not, and screenshot files would have the same number of lines as the emulator window. The documentation should mention the reason for the black line.