Black line - annoying!

General area for talk about ZSNES. The best place to ask for related questions as well as troubleshooting.

Moderator: ZSNES Mods

gladwarez
New Member
Posts: 9
Joined: Mon Feb 20, 2006 5:07 pm

Black line - annoying!

Post by gladwarez »

My ZSNES has a black line on the very bottom of my emulator screen. is there any way to get rid of this?

Image
Agozer
16-bit Corpse | Nyoron~
Posts: 3534
Joined: Sun Aug 01, 2004 7:14 pm
Location: Nokia Land

Post by Agozer »

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? :roll:
Last edited by Agozer on Tue Feb 21, 2006 1:04 am, edited 1 time in total.
whicker: franpa is grammatically correct, and he still gets ripped on?
sweener2001: Grammatically correct this one time? sure. every other time? no. does that give him a right? not really.
Image
gladwarez
New Member
Posts: 9
Joined: Mon Feb 20, 2006 5:07 pm

Post by gladwarez »

I turned off the scanlines and the black line is still there. I've experimented with other emulators and the only two this happens with is Snes9x and ZSNES. I perfer ZSNES because of the features, and that's why i'm reluctant to just switch emulators again.

Here it is without the scanlines:

Image
Jipcy
Veteran
Posts: 768
Joined: Thu Feb 03, 2005 8:18 pm
Contact:

Post by Jipcy »

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.
[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]
Clements
Randomness
Posts: 1172
Joined: Wed Jul 28, 2004 4:01 pm
Location: UK
Contact:

Post by Clements »

For me, the black line changes size depending on whether I have a hq filter enabled or not. Without the filter, the black line is taller, and with, it is shorter.
gladwarez
New Member
Posts: 9
Joined: Mon Feb 20, 2006 5:07 pm

Post by gladwarez »

Clements wrote:For me, the black line changes size depending on whether I have a hq filter enabled or not. Without the filter, the black line is taller, and with, it is shorter.
The same thing happens to me. Is this just a problem that isn't fixable?
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

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).
So there are 224 or 239 lines, and one of them is not displayed. ZSNES doesn't seem to do that right now.

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
PHoNyMiKe
Retrosexual
Posts: 1011
Joined: Wed Jul 28, 2004 2:09 am
Location: Rapture

Post by PHoNyMiKe »

no there is no way to get rid of it.
[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]
kieran_
Mugwump
Posts: 824
Joined: Fri Jul 30, 2004 9:05 pm

Post by kieran_ »

Is a single line that noticable?
pagefault
ZSNES Developer
ZSNES Developer
Posts: 812
Joined: Tue Aug 17, 2004 5:24 am
Location: In your garden

Post by pagefault »

I will fix this for $20.
SquareHead
Veteran
Posts: 970
Joined: Fri Jan 21, 2005 11:15 am
Location: Montana, United States

Post by SquareHead »

pagefault wrote:I will fix this for $20.
:lol:
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

Probably the rendering loop stopping too early... the issue is finding where the #*~&"! in the source the value is.
皆黙って俺について来い!!

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
Jipcy
Veteran
Posts: 768
Joined: Thu Feb 03, 2005 8:18 pm
Contact:

Post by Jipcy »

pagefault wrote:I will fix this for $20.
Man, we could start having auctions for feature requests, or something...
[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]
byuu

Post by byuu »

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.
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

byuu wrote:It's best to just render 256x223, but 256x224 is a nicer resolution to use...
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.

"223" is just ... ew.
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
byuu

Post by byuu »

I somewhat agree, but the black line would annoy a lot more people than you think. See this thread, for instance.
Overscan support is even worse :/
Changing the window size every time the game toggles overscan is hideous, and the constant black bar in 90% of games like SNES9x is worse still.
Jipcy
Veteran
Posts: 768
Joined: Thu Feb 03, 2005 8:18 pm
Contact:

Post by Jipcy »

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.
[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]
pagefault
ZSNES Developer
ZSNES Developer
Posts: 812
Joined: Tue Aug 17, 2004 5:24 am
Location: In your garden

Post by pagefault »

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.
PHoNyMiKe
Retrosexual
Posts: 1011
Joined: Wed Jul 28, 2004 2:09 am
Location: Rapture

Post by PHoNyMiKe »

[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]
pagefault
ZSNES Developer
ZSNES Developer
Posts: 812
Joined: Tue Aug 17, 2004 5:24 am
Location: In your garden

Post by pagefault »

Who said it was a defect?
byuu

Post by byuu »

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.
PHoNyMiKe
Retrosexual
Posts: 1011
Joined: Wed Jul 28, 2004 2:09 am
Location: Rapture

Post by PHoNyMiKe »

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?
[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]
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

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.
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 »

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.
Not to mention games compensate for the missing scanline in VOFS.
byuu

Post by byuu »

Not to mention games compensate for the missing scanline in VOFS.
Many of them do, many of them don't, especially PDROMs :/
Post Reply