A.D.A. Amiga Demoscene Archive

        Welcome guest!

  

  

  

log in with SceneID

  

Demos Amiga Demoscene Archive Forum / Coding / Interlaced screens

 

Author Message
Reloaded
Member
#1 - Posted: 15 Dec 2014 23:07
Reply Quote
Hello. I'm trying to use an AGA high resolution interlaced screen (640x360) for some effects, but I can't set up the screen properly. I'm having problem with the copper and the bitplane pointers for the interlaced planes. Can anyone help me with a detailed explication to set up a 8 bitplanes high resolution interlaced screen?. Thanks.
noname
Member
#2 - Posted: 16 Dec 2014 18:14
Reply Quote
You have to alternatively display odd and even lines every other frame. Use btst #7,$dff004 in your level 3 interrupt to find out if you are in a long or short frame, then act accordingly, depending on how you setup your display.

I personally just added #80 to my bitplane base-pointer if the result was equal before I write the 8 bitplane-addresses out to the registers in my level 3 interrupt (Function _RefreshDisplay in my system).

My complete copper lists looks like this (from WickedOS source-distribution, file "sub/CopperLists_v0.6.s"):
	ifnd	NOMODE5	
Copm5:
dc.w $1fc,$d,$106,4
dc.w diwstrt,$4671,diwstop,$0ed1 ;16:9

dc.w ddfstrt,$38,ddfstop,$d0
dc.w bplcon0,%1000001000010100
dc.w bpl1mod,80
dc.w bpl2mod,80

sprm5: dc.w $120,0,$122,0
dc.w $124,0,$126,0
dc.w $128,0,$12a,0
dc.w $12c,0,$12e,0
dc.w $130,0,$132,0
dc.w $134,0,$136,0
dc.w $138,0,$13a,0
dc.w $13c,0,$13e,0

colm5: ds.b 256*16
dc.w $9c,$8004 ;call level2
dc.l -2
endc
Reloaded
Member
#3 - Posted: 16 Dec 2014 22:14
Reply Quote
Thanks for your reply. But I have a problem with btst #7,$dff004. It's 1 every frame, it never change to 0. Why?
noname
Member
#4 - Posted: 16 Dec 2014 23:45
Reply Quote
What is in your bplcon0?
Reloaded
Member
#5 - Posted: 17 Dec 2014 09:55 - Edited
Reply Quote
Copper   dc.w $0100,%1000001000010100	BPLCON0 (HIRES, LACED, Color ON
8 bitplanes)


        move.w	#$0000,($dff102)	BPLCON1
move.w #$0050,($dff108) BPL1MOD
move.w #$0050,($dff10a) BPL2MOD
move.w #$003c,($dff092) DDFSTRT
move.w #$00d4,($dff094) DDFSTOP
move.w #$4f81,($dff08e) DIWSTRT 640x360
move.w #$03c1,($dff090) DIWSTOP
move.w #$0001,($dff1fc) FMODE

Reloaded
Member
#6 - Posted: 17 Dec 2014 10:39 - Edited
Reply Quote
And what about this?:

http://eab.abime.net/showthread.php?t=76191
noname
Member
#7 - Posted: 19 Dec 2014 23:05
Reply Quote
Bplcon0 looks right. Since it is hard to remote debug your problem, I will just tell you how I would approach the solution (basically what I did when I coded it for myself) step by step:
1. correctly display a lores or hires screen without interlace from your incbin'd bitplane-data
2. turn on the laced bit and see that the display starts to flicker slightly
3. load in a hires interlace (here: 640x360) picture, adjust the modulos to make it display every 2nd line and thus cover the full picture
4. write another routine / copper-list that displays the even lines (as mentioned, I did it in the VBI)
5. switch between both routines in the vertical blanc interrupt, maybe by just relying on your vbi-timer

This will make your interlace screen work correctly 50% of the time (since that is the chance of hitting the "correct" lines). Even really well known demos only used this method, which is why interlaced pictures in demos sometimes looked strange.

There is not much to do wrong in steps 1-5, but just be sure to treat them on after the other. If you reached 5, the above mentioned btst #7,$dff004 should come naturally as a sixth step.

Just do it, and don't even bother about the linked in EAB article. It is not that complicated.

dodke
Member
#8 - Posted: 8 Nov 2016 16:16
Reply Quote
This is an old thread but I had a similar (/same?) bug and thought I'd mention it here in case it might help others.

I had trouble with setting up an interlaced screen and the interlace bit seemed to be turning off no matter what I did.
The cause was the vblank interrupt. Disabling it with INTENA fixed it. Also as I'm mainly accessing the hardware directly (setting copperlist / graphics modes etc) using a system routine to set up the vblank interrupt turned interlacing off too.
rloaderror
Member
#9 - Posted: 8 Nov 2016 23:30
Reply Quote
@dodke : as if there was another vblank interrupt installed by the system running after your vblank interrupt? Maybe that can explain some recent mysteries in my own code. I suppose it is possible to use the system SetIntVector instead of AddIntServer to install an exclusive interrupt handler and preventing other system installed handlers to run.
todi
Member
#10 - Posted: 9 Nov 2016 09:48 - Edited
Reply Quote
Problem when using SetIntVector and using system friendly code, is that the system crashes if you use SetIntVector for INTB_VERTB,.
To my knowledge SetIntVector, should only be used for interrupt's like INTB_AUDIO, INTB_BLIT & serial port interrupt's.
dodke
Member
#11 - Posted: 9 Nov 2016 11:08
Reply Quote
@loady exactly. I think the system was adding its own code that was resetting some bplcon bits (interlace, border blank) to values it thought they should be.

 

  Please log in to comment

  

  

  

 

A.D.A. Amiga Demoscene Archive, Version 3.0