TV safe area

For anything related to VDP (plane, color, sprite, tiles)

Moderators: BigEvilCorporation, Mask of Destiny

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Wed Oct 10, 2007 2:07 am

Shiru wrote:
Eke wrote:This is supposed to be 262 and 313 (for PAL megadrive) but maybe this is something more like 262.5 or 312.5 ?
Afaik, for PAL it must be 312 for even and 313 for odd frames (that gives overall 312.5).
It's 262 for non-interlaced, and 262.5 for interlaced. They literally start the vblank in the middle of a horizontal line at the bottom. If your TV shows all the lines, you'll see a half a line at the bottom. That's how they do the interlacing on a TV. It displaces the electron beam half a line vertically because it was reset to the top of the display in the middle, not the left side.

By not doing the half line at the bottom in non-interlaced mode, the next frame starts at the same place as the previous frame, thus becoming non-interlaced.

Eke
Very interested
Posts: 885
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Wed Oct 10, 2007 8:01 am

Are you speaking about how interlaced display generally work or about the specific Genesis interlaced modes ?
I also wonder how the interlaced VDP modes 1&2 both work and the differences between them ...

Anyway, I thought the genesis display was not interlaced, ie it displayed the same half amount of lines (262 or 312) at each frame, and as television are usually interlaced, there is scanlines between those lines to fit the whole 525 (or 625) lines screen :?:

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Wed Oct 10, 2007 3:49 pm

Eke wrote:Are you speaking about how interlaced display generally work or about the specific Genesis interlaced modes ?
I also wonder how the interlaced VDP modes 1&2 both work and the differences between them ...

Anyway, I thought the genesis display was not interlaced, ie it displayed the same half amount of lines (262 or 312) at each frame, and as television are usually interlaced, there is scanlines between those lines to fit the whole 525 (or 625) lines screen :?:
Both. TV's don't have any ability to "naturally" interlace signals. It's all in the vertical retrace timing. Start the retrace at the start of a line, it's non-interlaced. Start it at the middle of the last line, it's interlaced. Note that it's every OTHER frame that would need to be started in the middle. Whichever frame is started from the middle is the top frame. Those are opposites between NTSC and PAL. NTSC is a little odd in that they show the lower (even) frame first, then the upper (odd) frame.

The two Genesis interlaced modes are simple to understand. Mode 1 simply shows the same frame twice. An 8x8 cell has its lines shown exactly the same on each frame. In Mode 2, the cell is 8x16 and every other line is shown on each frame for a true interlaced display. So instead of the display being 320x224 at 60Hz, it's now 320x448 at 30Hz interlaced. I THINK the Sonic games use this for competition mode so that they don't have to do half-size patterns. Just switch to interlace mode 2 - the sections will be half as tall, but contain the same data. You get some flicker, but most TVs use long persistence phosphors, so it's not as bad as a monitor.

Mask of Destiny
Very interested
Posts: 616
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Wed Oct 10, 2007 6:01 pm

Chilly Willy wrote:I THINK the Sonic games use this for competition mode so that they don't have to do half-size patterns.
Only Sonic 2 uses this feature. Sonic 1 had no competition mode and Sonic 3/S&K use a separate tile and stick with the normal progressive mode. In fact, I'm pretty sure Sonic 2 is one of only a very small number of games that use interlace mode.

Fonzie
Genny lover
Posts: 323
Joined: Tue Aug 29, 2006 11:17 am
Contact:

Post by Fonzie » Wed Oct 10, 2007 6:43 pm

There is a racing game (championship pro arm?) that is using this mode for two player too... If I remember.

Steve said a nice thing some time ago... Was about making a vertical scrolling shooter, using interlaced display (mode1) would improve a lot the scrolling "precision"...

It's a bit sad that no game used those modes to have bigger rez (mode2 was designed for that, seems).

PS : on a side note, I'm still searching for a game that stop display to get bigger dma bandwidth, again, some potential was wasted too...

Eke
Very interested
Posts: 885
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Wed Oct 10, 2007 7:51 pm

Fonzie wrote:There is a racing game (championship pro arm?) that is using this mode for two player too... If I remember.
I think it's Combat Cars... it also relies on a proper vcounter emulation to display properly (note that the sega's manual seems wrong about this when using interlaced 2 mode)

so, if I understand well what you said:

1/ in non-interlaced mode, in each frame (1/60 sec), the VDP display 262 lines at the same location on the TV screen: that is, as a NTSC TV is 525 lines, each two lines is filled with the genesis output, the others remain blank, which give these "scanline" effect

2/ in interlaced mode (1& 2), the VDP display 262.5 lines per frame so this time, the lines from the "second" frame will be shifted from the ones of the ^revious frame, and the whole 525 line TV would be filled by the genesis output in 2 frames (1/30sec). The difference between mode 1&2 being that only mode 2 is able to output different pixels in two successive frames as patterns are 8x16 pixels only in mode2.


is that right ?

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Wed Oct 10, 2007 8:43 pm

For PAL, there is 15625 lines per second, so each frame contains only 312.5 lines, not 625. 625 is full frame, but TV is interlaced, so there is 25/30 full (in terms of full interlaced resolution) frames per second, and 50/60 half-frames. In 320x224 each line of frame buffer corresponds to line of one of 50 (60) TV frames. In hi-res (interlaced) modes one frame shows even lines, next frame shows odd lines. There is no blank lines between lines of picture in 320x224 (but there is blank lines above and under actual picture).

If you shift image for half-line (make delay by half line from HSYNC), you only get shifted picture and nothing more. If you shift HSYNC time by half line, nothing changes or TV just lost sync (depends from TV).

LocalH
Very interested
Posts: 152
Joined: Tue Dec 19, 2006 5:04 pm

Post by LocalH » Wed Oct 10, 2007 9:37 pm

Chilly Willy wrote:So instead of the display being 320x224 at 60Hz, it's now 320x448 at 30Hz interlaced.
It's still 60Hz, just interlaced.

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Wed Oct 10, 2007 9:42 pm

LocalH wrote:
Chilly Willy wrote:So instead of the display being 320x224 at 60Hz, it's now 320x448 at 30Hz interlaced.
It's still 60Hz, just interlaced.
Yea, that's a tough one.

Because each field is only 30Hz, but total it's 60Hz (59.9?).

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Wed Oct 10, 2007 10:34 pm

Eke wrote: so, if I understand well what you said:

1/ in non-interlaced mode, in each frame (1/60 sec), the VDP display 262 lines at the same location on the TV screen: that is, as a NTSC TV is 525 lines, each two lines is filled with the genesis output, the others remain blank, which give these "scanline" effect

2/ in interlaced mode (1& 2), the VDP display 262.5 lines per frame so this time, the lines from the "second" frame will be shifted from the ones of the ^revious frame, and the whole 525 line TV would be filled by the genesis output in 2 frames (1/30sec). The difference between mode 1&2 being that only mode 2 is able to output different pixels in two successive frames as patterns are 8x16 pixels only in mode2.


is that right ?
Yes, precisely.

@LocalH - Semantics. The FRAME rate is 30Hz. The FIELD rate is 60Hz. The frame is interlaced. So I simply stated the frame rate and the fact that the frame is interlaced. You can call it 60Hz interlaced if you want.

The point is it takes two fields to show the entire frame. If you change the frame before it's shown both fields, you'll get motion artifacts from the interlace. You see this a lot in live broadcasts shot with older cameras. So you either keep the action at or below 30Hz, or put up with it.

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Wed Oct 10, 2007 10:38 pm

Chilly Willy wrote:The FRAME rate is 30Hz. The FIELD rate is 60Hz.
Are you sure it's not the other way around?

On an interlaced TV, if I play a video at both 30fps and 60fps, there is a difference, so 60fps can be seen. However, each field is being displayed only 30 times a second. (for example, even fields 30, odd fields 30, but total 60)

I never could understand this concept, my HS screwed me and didn't give me television science class.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Wed Oct 10, 2007 11:25 pm

evildragon wrote:
Chilly Willy wrote:The FRAME rate is 30Hz. The FIELD rate is 60Hz.
Are you sure it's not the other way around?

On an interlaced TV, if I play a video at both 30fps and 60fps, there is a difference, so 60fps can be seen. However, each field is being displayed only 30 times a second. (for example, even fields 30, odd fields 30, but total 60)

I never could understand this concept, my HS screwed me and didn't give me television science class.
You're thinking about it wrong: there are two fields that make up each frame, an even and an odd field. We say the field rate is 60Hz because every 60th of a second, ONE of the two fields is displayed. Since a single field is not the entire frame, the field rate is not the frame rate. It takes two fields to make a complete frame, so it takes two 60ths of a second to show a frame. So the frame rate is 60Hz/2, or 30Hz.

Yes, each field is only shown 30 times a second, but there are two fields shown in that time. The field rate refers to ALL fields, not one specific field.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Wed Oct 10, 2007 11:43 pm

Single field is a full frame for low-res picture (so, 320x240 can be displayed at 50/60 fps), but 'complete frame' in TV refers to interlaced hi-res (625 lines for PAL).

tomaitheous
Very interested
Posts: 256
Joined: Tue Sep 11, 2007 9:10 pm

Post by tomaitheous » Thu Oct 11, 2007 2:24 am

Chilly Willy wrote:
evildragon wrote:
Chilly Willy wrote:The FRAME rate is 30Hz. The FIELD rate is 60Hz.
Are you sure it's not the other way around?

On an interlaced TV, if I play a video at both 30fps and 60fps, there is a difference, so 60fps can be seen. However, each field is being displayed only 30 times a second. (for example, even fields 30, odd fields 30, but total 60)

I never could understand this concept, my HS screwed me and didn't give me television science class.
You're thinking about it wrong: there are two fields that make up each frame, an even and an odd field. We say the field rate is 60Hz because every 60th of a second, ONE of the two fields is displayed. Since a single field is not the entire frame, the field rate is not the frame rate. It takes two fields to make a complete frame, so it takes two 60ths of a second to show a frame. So the frame rate is 60Hz/2, or 30Hz.

Yes, each field is only shown 30 times a second, but there are two fields shown in that time. The field rate refers to ALL fields, not one specific field.
You're forgetting about the half line on the last scanline. For consoles of the 8 and 16 bit era ( and other consoles too), 240p is achieved by omitting the half scanline. So you output 262 or 263 scanlines, not 262.5. This causes the TV display to place all *fields* in the exact same place and this is why you see the scanline *gap* that emulaters try to simulate - called "scanlines". Thus fields become frames.

It's not technically a legal NTSC signal (out of all the NTSC books and docs I have anyway), but almost all (99.9999999%) TVs support it.

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Thu Oct 11, 2007 3:01 am

Wow, just realized how ugly my Atari 2600 outputs a picture.

Image

Anyways, I assume that bright dot here on my video monitor is the begining of the raster? It's there on EVERY game console, and is always shimmering left and right about half an inch (the screen is 13").

Image

Post Reply