Page 1 of 1

Posted: Tue Jul 27, 2010 8:13 am
by Eke
Another note: it seems like the VCounter roll back is coinciding with the end of bottom blanking / start of vsync.

Here are the values measured by Charles MacDonald:
NTSC, 256x192
-------------

Lines Description

192 Active display
24 Bottom border
3 Bottom blanking
3 Vertical blanking
13 Top blanking
27 Top border

V counter values
00-DA, D5-FF

NTSC, 256x224
-------------

Lines Description

224 Active display
8 Bottom border
3 Bottom blanking
3 Vertical blanking
13 Top blanking
11 Top border

V counter values
00-EA, E5-FF

NTSC, 256x240
-------------

This mode does not work on NTSC machines. All 30 rows of the name table are
displayed, there is no border, blanking, or retrace period, and the next
frame starts after the 30th row. The display rolls continuously though it
can be stabilized by adjusting the vertical hold.

V counter values
00-FF, 00-06

PAL, 256x192
------------

Lines Description

192 Active display
48 Bottom border
3 Bottom blanking
3 Vertical blanking
13 Top blanking
54 Top border

V counter values
00-F2, BA-FF

PAL, 256x224
------------

Lines Description

224 Active display
32 Bottom border
3 Bottom blanking
3 Vertical blanking
13 Top blanking
38 Top border

V counter values
00-FF, 00-02, CA-FF

PAL, 256x240
------------

Lines Description

240 Active display
24 Bottom border
3 Bottom blanking
3 Vertical blanking
13 Top blanking
30 Top border

V counter values
00-FF, 00-0A, D2-FF

Here are some details about what the different screen areas look like,
useful if you are emulating overscan or if you want to have a 'virtual'
vertical hold control in your emulator.

Active display - Where the display generated by the VDP goes.
Bottom border - Filled with border color from VDP register #7.
Bottom blanking - Filled with a light black color. (like display was blanked)
Vertical sync - Filled with a pure black color. (like display was turned off)
Top blanking - Filled with a light black color. (like display was blanked)
Top border - Filled with the border color from VDP register #7.
in case of NTSC H28 for example, active screen + bottom blanking is 224 +8 + 3 = 235 (lines 0-234).
Line 234 would be 234 = $0EA
Line 235 would be 235-262=-27=$1E5

same things works in all other modes, which makes vcounter implementation quite logical

Posted: Tue Jul 27, 2010 11:12 am
by Nemesis
(2) There is one line less (312) on even frames in both PAL interlaced modes and there is one line more (263) on odd frames in NTSC interlaced mode 2 only (are you sure it's not the case in both modes ?)
Thanks, you're right, there is one more line in odd frames in both NTSC interlace modes. Just like in the double interlace mode, the internal vcounter runs a line at 0xE4 in odd frames only, I just forgot to take into account that the lowest bit of the vcounter was being discarded on the output in that interlace mode when looking for an extra line. I can see that the external vcounter runs two lines at a value of 0xE4 in normal interlace mode in an odd frame, and only one line in an even frame, so that means that the internal vcounter runs an extra line at 0xE4 for odd frames only.