Black line - annoying!

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

Moderator: ZSNES Mods

kode54
Zealot
Posts: 1140
Joined: Wed Jul 28, 2004 3:31 am
Contact:

Post by kode54 »

How does this overscan shifting behavior work if you enable overscan during NMI?
byuu

Post by byuu »

Good question. It probably only takes effect somewhere around the start of a new frame (or end of the current one), but the CPU-side effects (VRAM writing disabled, vblank flag being cleared again, etc) probably still occur.
That's how interlace works. It won't actually enable interlace if toggled mid frame, but it will still affect tile address lookups.
kode54
Zealot
Posts: 1140
Joined: Wed Jul 28, 2004 3:31 am
Contact:

Post by kode54 »

And suddenly, we're rendering again.

Needs more definite testing, preferrably not with hardware like a capture card will likely just center the image anyway. Or not.
Gil_Hamilton
Buzzkill Gil
Posts: 4295
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

byuu wrote:Then you must have a PAL TV, pagefault.
More likely, he got the service mode commands for his TV and manually adjusted the scan area to eliminate overscan.
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.
Actually, it's more to do with low cost of production.
It's difficul tto adjust a set so the image EXACTLY fills the screen. Consumers tend to object far more loudly if there's a black frame than if part of the image is missing. Hence, the display hardware is intentionally misadjusted so that a good portion of the image "hangs" off the screen in all 4 directions.

The actual locations of the cropping borders will vary signifigantly from model to model, or even set to set.

Some samples from my own home include...
A TV that crops the hell out of the top of the image.
Another set that does the same thing on the bottom.
And an NTSC monitor that eats far enough into the right side that I lose characters in Chrono Trigger dialog, but provides the full 480 visible lines spec'ed by NTSC.

The last one's actually rather distracting when I'm playing certain NES games.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

Since there's an unanswered question about PAL snes on PAL TVs:

We have large black bars at the top and bottom of the screen, and the actual display area is roughly vertically centered, varying with each set. Since the TVs are still 4:3, everything is squished.
We also have horizontal centering issues.
皆黙って俺について来い!!

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
Gil_Hamilton
Buzzkill Gil
Posts: 4295
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

grinvader wrote:Since there's an unanswered question about PAL snes on PAL TVs:
...
We also have horizontal centering issues.
You mean other than the normal TV variances?

I'm curious about this one, if you can describe it, or know what causes it.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

Gil_Hamilton wrote:
grinvader wrote:Since there's an unanswered question about PAL snes on PAL TVs:
...
We also have horizontal centering issues.
You mean other than the normal TV variances?

I'm curious about this one, if you can describe it, or know what causes it.
Nah, those are the same as yours.

It can get pretty awful... my current TV eats a great amount of the left pixel columns, and leaves a nice black vertical bar on the right. -_-
Totally screws games with big text windows like CT.
皆黙って俺について来い!!

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
whicker
Trooper
Posts: 479
Joined: Sat Nov 27, 2004 4:33 am

Post by whicker »

The funny thing about CRT televisions is that they are affected by the Earth's magnetic field. You could perfectly line up the picture in a factory in China, and then ship it over to, say, Mexico and suddenly the alignment is completely off.

Also, the orientation (electron gun pointing North, East, whatever) has a minor effect on shifting the picture too.

/end side_note
CloudRider
New Member
Posts: 9
Joined: Sun Aug 07, 2005 10:37 pm

Post by CloudRider »

That could explains what is wrong with my mom's new Ascent™ flat CRT.

So does this mean the SNEs's native resolution is 256x224? I always thought it was 320x240 :/
Agozer
16-bit Corpse | Nyoron~
Posts: 3534
Joined: Sun Aug 01, 2004 7:14 pm
Location: Nokia Land

Post by Agozer »

CloudRider wrote: So does this mean the SNEs's native resolution is 256x224?
Yes.
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
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

CloudRider wrote:So does this mean the SNEs's native resolution is 256x224? I always thought it was 320x240 :/
Actually there might be several*, depending on what your definition of "native" is.


* (256x224, 256x239, 256x448, 256x478, 512x224, 512x239, 512x448, 512x478)
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

creaothceann wrote:* (256x224, 256x239, 256x448, 256x478, 512x224, 512x239, 512x448, 512x478)
Well, all the higher res modes are special... native base res is 256x225 with 224 lines rendered.
皆黙って俺について来い!!

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

Post by creaothceann »

grinvader wrote:
creaothceann wrote:* (256x224, 256x239, 256x448, 256x478, 512x224, 512x239, 512x448, 512x478)
Well, all the higher res modes are special... native base res is 256x225 with 224 lines rendered.
Yep. (But wasn't it 224 lines with 223 rendered?)
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
stale
Rookie
Posts: 29
Joined: Sat Aug 07, 2004 4:57 pm
Location: mankato mn
Contact:

Post by stale »

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

Post by grinvader »

creaothceann wrote:
grinvader wrote:
creaothceann wrote:* (256x224, 256x239, 256x448, 256x478, 512x224, 512x239, 512x448, 512x478)
Well, all the higher res modes are special... native base res is 256x225 with 224 lines rendered.
Yep. (But wasn't it 224 lines with 223 rendered?)
Well since I finally understand all that crap i'll try to make it simple:

From a base vertical res of 225 (0-224), you can remove line 0 since it's not rendered on the real hardware. (-> 1-224)
If a game doesn't compensate for that missing line, the 8x8 tile rows will be displayed like this:

Code: Select all

row 0: lines 0-7
row 1: lines 8-15
...
row 27: lines 216-223
row 28: lines 224-231
Two issues: the first pixel line of row 0 will miss (line 0 not rendered), and one line only of row 28 is displayed (some games actually start a completely different screen in that area, which makes it looks like garbage). That's why zsnes and bsnes also drop line 224 for a total of 223 lines rendered. (-> 1-223)
On the real hardware, that last line is rendered but might be cut by your TV, so you never realized it was there (garbage or not).

BUT, if the game compensates for the first line, then everything becomes fine:

Code: Select all

row 0: lines 1-8
...
row 27: lines 217-224
The first line won't miss, and there is no extra row. According to TRAC, a lot of games do compensate their VOFS by 1 this way, and it's more faithful to the hardware to render the 224th line.

I hope I have been clear enough.
皆黙って俺について来い!!

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

Post by creaothceann »

grinvader wrote:I hope I have been clear enough.
You were. :wink:
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
Reznor007
Lurker
Posts: 118
Joined: Fri Jul 30, 2004 8:11 am
Contact:

Post by Reznor007 »

Just for the record, here's a shot from a real SNES showing the 1 line of garbage.

http://members.cox.net/rdawkins1/smwtitle.png
RealmRPGer
Rookie
Posts: 35
Joined: Thu Jul 13, 2006 2:41 pm

Post by RealmRPGer »

The normal ZSNES WIP gives me TWO black lines, but I compile it myself, I get ONE black line. Anybody know why this is?
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

"The normal zsnes WIP" uses older code than the current svn, duh. Are you even reading the commit messages to see what's being done ?
皆黙って俺について来い!!

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
Post Reply