English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 21 November 2011, 15:07   #1
TheDarkCoder
Registered User
 
Join Date: Dec 2007
Location: Dark Kingdom
Posts: 213
NTSC variable-length scanlines

the HRM says that, while in PAL all lines last for 227 "color clocks", in NTSC scanlines alternate between "short" (227 clocks) and "long" (228).
My understanding is that on long line the horizontal posizion read via VHPOSR reaches the value $e2 in short lines and the value $e3 in long. Is it right?

Now I have 2 questions for which I can't find answer in HRM.
1) Which lines are short and which are long?

2) What happens in "programmable scan rate modes"? Are all lines the same lenght as in PAL, or do they alternate as in NTSC, or is it configurable by some bit in BEAMCON0?
TheDarkCoder is offline  
Old 22 November 2011, 08:48   #2
TheDarkCoder
Registered User
 
Join Date: Dec 2007
Location: Dark Kingdom
Posts: 213
Quote:
Originally Posted by TheDarkCoder View Post
the HRM says that, while in PAL all lines last for 227 "color clocks", in NTSC scanlines alternate between "short" (227 clocks) and "long" (228).
My understanding is that on long line the horizontal posizion read via VHPOSR reaches the value $e2 in short lines and the value $e3 in long. Is it right?

Now I have 2 questions for which I can't find answer in HRM.
1) Which lines are short and which are long?

2) What happens in "programmable scan rate modes"? Are all lines the same lenght as in PAL, or do they alternate as in NTSC, or is it configurable by some bit in BEAMCON0?
I think to have found the answer for question 2: it should be configurable.
The HRM does describe the programmable scan rate modes very concisely, in particular BEAMCON0, so one has to interpret a bit. However the description of bit 11 of BEAMCON0 is "Disable long line/short toggle. This is useful for DUAL mode where even multiples are wanted, or in any single display where this toggling is not desired."

I think this what I have asked.

In the AGA guide I also found a partial answer to question 1.
The description of VPOSR given in the aga.guide is:
VPOSR p 004 R A Read vert most sig. bits (and frame flop) VPOSW 02A W A Write most sig. bits (and frame flop) BIT# 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 USE LOF I6 I5 I4 I3 I2 I1 I0 LOL -- -- -- -- -- V10 V9 V8 LOF = Long frame(auto toggle control bit in @{"BPLCON0" link BPLCON0}) I0-I6 Chip identitication: 8361 (Regular) or 8370 (Fat) (Agnus-ntsc) = 10 8367 (Pal) or 8371 (Fat-Pal) (Agnus-pal) = 00 8372 (Fat-hr) (agnushr),thru rev4 = 20 Pal, 30 NTSC 8372 (Fat-hr) (agnushr),rev 5 = 22 Pal, 31 NTSC 8374 (Alice) thru rev 2 = 22 Pal, 32 NTSC 8374 (Alice) rev 3 thru rev 4 = 23 Pal, 33 NTSC LOL = Long line bit. When low, it indicates short raster line. v9,10 -- hires chips only (20,30 identifiers)
So, the LOL bit is what I was looking for. But:
1) from the above description it is not clear which is the LOL bit:
number 7? 8?
2) this bit is not mentioned in the HRM. Is it a new feature of AGA,
or simply an undocumented one? It sounds strange that on OCS and ECS
there was no way to tell if a line is short or long.
TheDarkCoder is offline  
Old 22 November 2011, 16:13   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,515
Yes, BEAMCON0 bit 11 is LOLDIS (disable NTSC short/long toggle). VPOS LOL-bit (bit 7) can be used to set/get current line's "length". (Only works in NTSC mode, always reads as zero in PAL mode)

"LOL" is ECS Agnus feature, documented in 3rd edition HRM ECS chapter.

How to confirm/test NTSC line toggle easily:

Create copper list like this:

wait vpos x, hpos close to right border (for example 0xDF)
<lots of dummy moves here, at least 20 or so, skipping horizontal blank>
move to background color (some visible color)
move to background color (clear)
repeat above copper code (vpos+1) to see alternate line toggle

Now change LOLDIS and LOF bits to see how the pattern changes.
Toni Wilen is offline  
Old 23 November 2011, 15:51   #4
TheDarkCoder
Registered User
 
Join Date: Dec 2007
Location: Dark Kingdom
Posts: 213
Quote:
Originally Posted by Toni Wilen View Post
Yes, BEAMCON0 bit 11 is LOLDIS (disable NTSC short/long toggle). VPOS LOL-bit (bit 7) can be used to set/get current line's "length". (Only works in NTSC mode, always reads as zero in PAL mode)

"LOL" is ECS Agnus feature, documented in 3rd edition HRM ECS chapter.

How to confirm/test NTSC line toggle easily:

Create copper list like this:

wait vpos x, hpos close to right border (for example 0xDF)
<lots of dummy moves here, at least 20 or so, skipping horizontal blank>
move to background color (some visible color)
move to background color (clear)
repeat above copper code (vpos+1) to see alternate line toggle

Now change LOLDIS and LOF bits to see how the pattern changes.
Thanks a lot Toni, I had checked 3rd edition HRM but missed the LOL description. Didn't imagine it was also settable
TheDarkCoder is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
ARexx string length limit amiga support.Apps 5 15 August 2015 06:00
Join variable and string in scripts. olesio support.Apps 3 31 January 2013 11:44
Cable length: IDE vs SCSI bjavor support.Hardware 3 30 January 2013 18:32
Speedy. The variable speed accellerator. DDNI Hardware mods 9 18 June 2012 21:33
Variable Master Clock wiltshireguyuk request.UAE Wishlist 0 13 December 2004 16:40

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 00:25.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.06665 seconds with 13 queries