pavros Posted November 8, 2009 Share Posted November 8, 2009 I would like to ask you to measure number of screen lines visible above and below standard 240-lines area on real TV-set. My goal is to determine the number of lines visible to all (or most) of us and for which it makes sense to display anything there. To allow you to measure it easily I've created a program called Screen Height Meter wich displays sort of ruler on the screen. Initially it'a aligned to ANTIC line numbers, but you can move it using arrows to position 0 point in right place for measurement. If you can help then please give results as X=? for number of lines above standard 240 and Y=? respectively for number of lines below. If you use (S)VIDEO->VGA converter then your results are still interesting. I've proved that GTIA can display some content in each of 312 lines so even in VSYNC lines. The question is how many lines can real TV-sets display. Below is a picture of Atari frame split into particular areas. Here is a short manual for the program: arrows - move ruler vertically and horizontally A - aligns ruler to ANTIC line numbers B - toggles display during VBLANK C - changes color scheme S - toggles vsync signal on/off Esc - quits to DOS The program detects if it is run on emulator and informs that it is only useful on real computers. It works only with PAL computers. Here is the program: SHMETER.zip 1 Quote Link to comment Share on other sites More sharing options...
Rybags Posted November 8, 2009 Share Posted November 8, 2009 Hey, you're utilising the old "scanline 240" bug, aren't you? I can't be much help... I adjusted the V-Height of all my TVs when doing work on my 480i mode. Always found though that a "good" setting that had correct aspect ratio and didn't have badly noticable scanlines left about 6-8 pixels vertical top/bottom of black outside the normal 240 line area. Quote Link to comment Share on other sites More sharing options...
HiassofT Posted November 8, 2009 Share Posted November 8, 2009 On my 16:9 CRT (set to 4:3 mode) I measured X=11 and Y=15. so long, Hias Quote Link to comment Share on other sites More sharing options...
Rybags Posted November 8, 2009 Share Posted November 8, 2009 From capture card... I think you still have the VBlank NMI running, so it's messing your ruler up a bit. Quote Link to comment Share on other sites More sharing options...
pavros Posted November 8, 2009 Author Share Posted November 8, 2009 Rybags, So you say X=8, Y=8, right? Yes, I'm utilising 240-line bug. Not only for ruler but also for detecting if it is emulator or real machine in the beginning. It's done by checking collisions of PMG objects outside of standard 240-line area. No NMI is messing ruler up. I'm just not refreshing PMG data registers in 12 VBLANK lines. Initially I didn't intend to display anything here assuming that GTIA can't display during VBLAN. Then I discovered that GTIA displays content in each of 312 lines, but was too lazy to extend the ruler. :-) Quote Link to comment Share on other sites More sharing options...
Xuel Posted November 9, 2009 Share Posted November 9, 2009 From a PAL 800XL captured on a Pinnacle Dazzle DVC 100: So is that X=23 and Y=24? Quote Link to comment Share on other sites More sharing options...
Rybags Posted November 9, 2009 Share Posted November 9, 2009 Capture cards tend to grab much more than a TV shows (esp CRTs), so will give a very skewed result. Most do 480 (NTSC), 576 (PAL) lines, by 720 horizontal. My card shows everything the Atari generates horizontally, except for about 1 colour-clock on the left/right. Quote Link to comment Share on other sites More sharing options...
+therealbountybob Posted November 9, 2009 Share Posted November 9, 2009 UK Pal TV 100Hz (130XE) - I'm asuming you set the 0 just in to the top of the light grey border - I have x=10 y=18 Quote Link to comment Share on other sites More sharing options...
oky2000 Posted November 9, 2009 Share Posted November 9, 2009 Capture cards tend to grab much more than a TV shows (esp CRTs), so will give a very skewed result. Most do 480 (NTSC), 576 (PAL) lines, by 720 horizontal. My card shows everything the Atari generates horizontally, except for about 1 colour-clock on the left/right. Isn't PAL overscan a standard figure of 768x576? Quote Link to comment Share on other sites More sharing options...
atariksi Posted November 9, 2009 Share Posted November 9, 2009 UK Pal TV 100Hz (130XE) - I'm asuming you set the 0 just in to the top of the light grey border - I have x=10 y=18 Which PAL TV (130XE) is 100Hz? I don't see how x=10, Y=18 translates to how many scanlines are visible. Quote Link to comment Share on other sites More sharing options...
PeteD Posted November 10, 2009 Share Posted November 10, 2009 UK Pal TV 100Hz (130XE) - I'm asuming you set the 0 just in to the top of the light grey border - I have x=10 y=18 Which PAL TV (130XE) is 100Hz? I don't see how x=10, Y=18 translates to how many scanlines are visible. 240+10+18 I presume reading the instructions in the 1st post. Pete Quote Link to comment Share on other sites More sharing options...
+therealbountybob Posted November 10, 2009 Share Posted November 10, 2009 (edited) UK Pal TV 100Hz (130XE) - I'm asuming you set the 0 just in to the top of the light grey border - I have x=10 y=18 Which PAL TV (130XE) is 100Hz? I don't see how x=10, Y=18 translates to how many scanlines are visible. 240+10+18 I presume reading the instructions in the 1st post. Pete Yes that's correct, 10 above the 240 and 18 below, making a total of 268 lines. The TV is a Toshiba CRT unit, model number is hard to read with a mirror in a dark corner, there's dedication, something like 35ZH47P (and don't ask me to move the beast!) but runs at 100Hz (as I found out when I thought my light-guns were not working) Edited November 10, 2009 by therealbountybob Quote Link to comment Share on other sites More sharing options...
atariksi Posted November 10, 2009 Share Posted November 10, 2009 UK Pal TV 100Hz (130XE) - I'm asuming you set the 0 just in to the top of the light grey border - I have x=10 y=18 Which PAL TV (130XE) is 100Hz? I don't see how x=10, Y=18 translates to how many scanlines are visible. 240+10+18 I presume reading the instructions in the 1st post. Pete Yes that's correct, 10 above the 240 and 18 below, making a total of 268 lines. The TV is a Toshiba CRT unit, model number is hard to read with a mirror in a dark corner, there's dedication, something like 35ZH47P (and don't ask me to move the beast!) but runs at 100Hz (as I found out when I thought my light-guns were not working) So you get minimum of 240 lines on PAL display devices. I guess 100Hz didn't reduce the resolution... so maybe it's repeating frames which would reduce the flicker. Rybag's image looks weird for determining visible scanlines. Quote Link to comment Share on other sites More sharing options...
+Philsan Posted November 10, 2009 Share Posted November 10, 2009 Atari 130XE PAL, s-video, Samsung LCD TV Syncmaster 711MP X=16 Y=17 Quote Link to comment Share on other sites More sharing options...
Rybags Posted November 10, 2009 Share Posted November 10, 2009 I disabled VSync to illustrate the missing ruler parts - it's from a capture card, so screen size would be 288 normal Atari scanlines anyway. 100 Hz CRT TVs were a common high-end feature for a while... they just buffer and repeat each field to improve image quality/reduce flicker. Quote Link to comment Share on other sites More sharing options...
atariksi Posted November 11, 2009 Share Posted November 11, 2009 I disabled VSync to illustrate the missing ruler parts - it's from a capture card, so screen size would be 288 normal Atari scanlines anyway. 100 Hz CRT TVs were a common high-end feature for a while... they just buffer and repeat each field to improve image quality/reduce flicker. How many DMA-able lines are you getting for the sprites on the PAL system (before you resort to GRAFn method)? I think it's 248 on NTSC. Quote Link to comment Share on other sites More sharing options...
Rybags Posted November 11, 2009 Share Posted November 11, 2009 I'm pretty sure it can only be 240 lines for both systems, ie what's regarded as the normal display in the docs. GTIA relies on Antic asserting the /HALT line shortly after a HBLANK command on AN0-2 for when to snoop the data bus for the burst of PMG data. When using the "Scanline 240 bug", you need to have the lower 2 bits of DMACTL = 00 (no screen DMA) or 11 (wide mode) for Antic to generate HBlank at the correct intervals (or you can use software control on a cycle-exact basis). Using Wide mode, you'll likely get a rolling display since the VSYNC becomes corrupted because Antic resumes sending display data for those lines. For quick proof (need TV or capture card that can show large area), try something like: 10 POKE 559,63:POKE 560,0: . POKE 560,0 quick/dirty way of generating tall screen with Scanline 240 bug 20 POKE 53248,140:POKE 53277,3:POKE 53279,200: . Map PMBASE to 2nd charset on XL - try something like 240 on 400/800 30 POKE 704,138:POKE 709,0:POKE 710,38: . Colours Quote Link to comment Share on other sites More sharing options...
pavros Posted November 13, 2009 Author Share Posted November 13, 2009 PMG DMA is only active during 240 lines of standard display. Standard display starts at line 8. First visible byte of PMG data is loaded from 'object address' + 8 and the last from 'object address' + 247. Quote Link to comment Share on other sites More sharing options...
atariksi Posted November 13, 2009 Share Posted November 13, 2009 PMG DMA is only active during 240 lines of standard display. Standard display starts at line 8. First visible byte of PMG data is loaded from 'object address' + 8 and the last from 'object address' + 247. Is there a quicker way to disable sprites for particular scanlines (invisible) without having to use up 34 cycles to modify all the HPOSes or use up normal memory by directing PMBase to a zero memory area? I tried to set PMBase to 0 and double line resolution, but the IRQ vectors can't be zero in this particular application although upper 128 bytes of stack can be set to 0. Quote Link to comment Share on other sites More sharing options...
+Stephen Posted November 13, 2009 Share Posted November 13, 2009 PMG DMA is only active during 240 lines of standard display. Standard display starts at line 8. First visible byte of PMG data is loaded from 'object address' + 8 and the last from 'object address' + 247. Is there a quicker way to disable sprites for particular scanlines (invisible) without having to use up 34 cycles to modify all the HPOSes or use up normal memory by directing PMBase to a zero memory area? I tried to set PMBase to 0 and double line resolution, but the IRQ vectors can't be zero in this particular application although upper 128 bytes of stack can be set to 0. Can you stuff the GRAFPn registers with 0 while DMA is still turned on? That's only 18 cycles provided you can trash the Accumulator. All irrelevant if you can't do this with DMA on. Hmm - on second thought that's a dumb idea since DMA is on, the registers will get reloaded every scanline. Just thinking out loud. Stephen Anderson Quote Link to comment Share on other sites More sharing options...
Rybags Posted November 14, 2009 Share Posted November 14, 2009 Zeroing GRAFPn is a good method since you don't need to worry about any restore operation. Also, if you have a case where you only want blank data for certain scanlines, ie only even or odd, you can use VDELAY which will tell GTIA not to bother about refreshing data for a particular object. Of course you still need to zero the particular GRAF register, but using VDELAY you can do the zero store to GRAF earlier and not worry about it getting overwritten. Quote Link to comment Share on other sites More sharing options...
atariksi Posted November 14, 2009 Share Posted November 14, 2009 PMG DMA is only active during 240 lines of standard display. Standard display starts at line 8. First visible byte of PMG data is loaded from 'object address' + 8 and the last from 'object address' + 247. Is there a quicker way to disable sprites for particular scanlines (invisible) without having to use up 34 cycles to modify all the HPOSes or use up normal memory by directing PMBase to a zero memory area? I tried to set PMBase to 0 and double line resolution, but the IRQ vectors can't be zero in this particular application although upper 128 bytes of stack can be set to 0. Can you stuff the GRAFPn registers with 0 while DMA is still turned on? That's only 18 cycles provided you can trash the Accumulator. All irrelevant if you can't do this with DMA on. Hmm - on second thought that's a dumb idea since DMA is on, the registers will get reloaded every scanline. Just thinking out loud. Stephen Anderson But the lines are consecutive (and in double resolution sprite mode). I have an overlay of the 5 sprites covering entire screen being used to produce colored characters in Gr.8. If I write to GRAFn, it would be 22 cycles per scanline (how did you get 18?). Now, that I think about it, setting priority register to 4 might just work (and then reset back to 1). Quote Link to comment Share on other sites More sharing options...
+Stephen Posted November 14, 2009 Share Posted November 14, 2009 But the lines are consecutive (and in double resolution sprite mode). I have an overlay of the 5 sprites covering entire screen being used to produce colored characters in Gr.8. If I write to GRAFn, it would be 22 cycles per scanline (how did you get 18?). Now, that I think about it, setting priority register to 4 might just work (and then reset back to 1). 0600 LDA #$00 ; 2cyc ; A9 00 0602 STA $D00D ;GRAFP0 ; 4cyc ; 8D 0D D0 0605 STA $D00E ;GRAFP1 ; 4cyc ; 8D 0E D0 0608 STA $D00F ;GRAFP2 ; 4cyc ; 8D 0F D0 060B STA $D010 ;GRAFP3 ; 4cyc ; 8D 10 D0 Not sure if this is correct or not. Stephen Anderson Quote Link to comment Share on other sites More sharing options...
atariksi Posted November 15, 2009 Share Posted November 15, 2009 But the lines are consecutive (and in double resolution sprite mode). I have an overlay of the 5 sprites covering entire screen being used to produce colored characters in Gr.8. If I write to GRAFn, it would be 22 cycles per scanline (how did you get 18?). Now, that I think about it, setting priority register to 4 might just work (and then reset back to 1). 0600 LDA #$00 ; 2cyc ; A9 00 0602 STA $D00D ;GRAFP0 ; 4cyc ; 8D 0D D0 0605 STA $D00E ;GRAFP1 ; 4cyc ; 8D 0E D0 0608 STA $D00F ;GRAFP2 ; 4cyc ; 8D 0F D0 060B STA $D010 ;GRAFP3 ; 4cyc ; 8D 10 D0 Not sure if this is correct or not. Stephen Anderson You also need to write a 0 to $D011 (53265) to zero out the missiles. Here's some sample code I wrote some time ago and I put in the priority toggling and it works great. In fact, you can even get different palettes just be toggling priority from 0,1,16,17,etc. and of course 4 to disable sprites. You can even get black using conflicting priorities by writing a 3 to the priority register. ;Example of display list interrupt on atari 800/400/600XL/800XL/XE/XEGS © 2005-2009 KSI ;Compile and boot this as an image disk on your atari computer. If you boot with BASIC cartridge, ;you should see 128 colors in the background while the BASIC cartridge is running normally. It also puts up ;P/M graphics so they occupy text screen w/o multiplexing to see how color of sprites/background affect ;foreground color of text. This program also compilable as a boot cassette loadable with START and allows ;using BASIC as well. ORG_ = 1529 CASINI = 2 ;for trapping reset vector VCOUNT EQU $D40B WSYNC EQU 54282 COLBK EQU 53274 WARMSTART = 58484 ;HDR_ = 6 ;DW 0FFFFh ;DW ORG ;DW LastOffset-1 DB 0,2 ;# of sectors to load for boot disk DW ORG_ DW StartAdr Rts Pla ;rem out above 5 lines to compile for boot cassette (select D1: is bootable C: in the ; the compile dialog box). 6-byte header will be automatically placed at ORG-6. ; You can also compile as boot disk and upload as boot cassette. StartAdr: LDA 560 ;LSB of ptr to display list (DL) STA 203 LDA 561 ;MSB of ptr to display list (DL) STA 204 LDY #2 ;intr on 3rd item of DL NXTDLVAL: LDA (203),Y ;CMP #65 ;BEQ DLISET ;EOR #$80 ORA #$80 ;set DLI bit in ANTIC display list STA (203),Y ;AND #$70 ;CMP #64 ;BNE NOTLMS ;INY ;INY NOTLMS: ;INY ;BNE NXTDLVAL DLISET: LDA #0 STA 54286 ;NMIEN LDA #KSIDLI,L STA 512 LDA #KSIDLI,H STA 513 Lda #0 Sta 580 LDA #192 STA 54286 ;NMIEN Lda #1 Sta 9 Lda #StartAdr,L ;get LSB of StartAdr Sta CASINI Lda #StartAdr,H ;get MSB of StartAdr Sta CASINI+1 ;rts ;test P/M graphics by creating sprite backdrop in text mode Lda #3 ;use #3 to enable p/m dma or 0 for fixed p/m backdrop Sta 53277 Lda #128 Sta 54279 ;PMBASE at 32768 Sta 204 Ldx #0 Stx 203 Lda #255 Sta 53256 ;quadruple size players and missiles Sta 53257 Sta 53258 Sta 53259 Sta 53260 Sta 53261 ;if 53277=0 above, then use these 5 registers to fill sprite data Sta 53262 Sta 53263 Sta 53264 Sta 53265 Ldx #8 Ldy #0 Nxt256: Sta (203),Y ;fill data at PMBASE Iny Bne Nxt256 Inc 204 Dex Bne Nxt256 Ldx #8 Ldy #132 Sty 204 ;beginning of color map for background color of text (player #0) Ldy #48 ;Char row*8 + 32 for line to set background color to original (710) Lda #129 ;show original background for middle 6 chars of 8 RealBAK: Sta (203),Y Iny Dex Bne RealBAK Lda #48 ;visible range is 48..207 color clocks Sta 53248 Lda #80 Sta 53249 Lda #112 Sta 53250 Lda #144 Sta 53251 Lda #176 Sta 53252 Lda #184 Sta 53253 Lda #192 Sta 53254 Lda #200 Sta 53255 Lda #16+8 Sta 704 Lda #32+4 Sta 705 Lda #48+2 Sta 706 Lda #64 Sta 707 ;Lda #0 ;Sta 711 Lda #15 Sta 709 ;text brightness Lda #62 ;use 46 for double line resolution or 62 for single line Sta 559 Lda #1+16 ;0 does color PF2/PF3 OR P2/P3 & PF0/PF1 OR P0/P1 Sta 623 ;set priority (53275) (bit 4= 5th player using PF3, bit 5 = multicolor) ;Lda #MyDL,L ;Sta 560 ;Lda #MyDL,H ;Sta 561 Rts ;ALN 8 MyDL: ;DB 112+128,120 dup(0) ;DB 65,MyDL,MyDL,H ;*** Our display list interrupt subroutine; VCount register is not as accurate as POKEY POT counter so we ;*** we use the POT(4) to get 8-bit scan-line count 0..228. KSIDLI: PHA TYA Pha ;LDA VCOUNT ;54283 is scan line count / 2 ;Adc 20 Ldy #128 Sty WSYNC Sta 53771 ;start 8 pot counters (53760..53767) NxtScanLine: Lda 53764 Rol STA WSYNC ;54282 is wait for end of scanline STA COLBK ;53274 is Background color register Dey Bne NxtScanLine Lda #4 ;put sprites behind playfields Sta 53275 ;if player #5 enabled (+16) then it will remain at top since Pla ; it uses PF3. Tay PLA RTI LastOffset: ;DW 2E2,2E3,StartAdr NOTE: The above compiles to a boot disk of 2 sectors. Quote Link to comment Share on other sites More sharing options...
pavros Posted February 16, 2010 Author Share Posted February 16, 2010 Survey summary All the measurements concern PAL computers only. Similar thread I've created on Polish forums AtariOnline and AtariArea. Here is a table of results got from the forums as well as done by myself: X Y 11 17 12 12 15 17 17 24 13 9 14 17 11 15 8 8 23 24 10 18 16 17 20 20 29 28 12 8 15 18 15 18 The number of results is not high which makes conclusions may not be fully true. However the conclusions are as follows: 1. 8 lines above and 8 lines below standard 240 are visible to all (256 lines in total). 2. 15 lines above standard 240 are visible most often. 3. 17 lines below standard 240 are visible most often. 4. For simplicity we could assume that 16 lines above and below standard 240 are visible most often (272 lines in total). 5. 24 lines above and 24 lines below standard 240 is the maximum where we can display anything according to PAL system norm (288 lines in total). That number of lines is mostly seen on Commodore 1084 and Philips 8833 monitors (depends on adjustments). This limitation actually concerns only the bottom of the screen and the limitation for top of the screen is only for keeping symmetry. Just to remind, in additional lines only sprites (PMG) can be displayed and sprite DMA does not work there. The details can be found in my article about Atari screen border (in Polish, unfortunately). Here is a link to an example how additional lines can be used on C64. Only sprites are used there as well. Thanks Irwin for the link. 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.