|
Author |
Message |
Reloaded
Member |
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 |
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 |
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 |
What is in your bplcon0?
|
Reloaded
Member |
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 |
And what about this?:
http://eab.abime.net/showthread.php?t=76191
|
noname
Member |
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 |
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 |
@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 |
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 |
@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.
|
|
|