12 October 2021, 18:41 | #1 |
Registered User
Join Date: Feb 2018
Location: Northumberland, UK
Posts: 272
|
Switching Copperlists
Hey all!
During specific positions in my game I am switching between two copper lists, which is working to a degree; the problem is I get a nasty flicker when the switch occurs. I set the initial list using Code:
move.l #PrimaryCopper,COP1LCH(a6) Code:
move.l #SecondaryCopper,COP1LCH(a6) Something doesn't quite seem right though, so is this a valid way to switch between two copper lists using the CPU? Cheers |
12 October 2021, 19:07 | #2 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,113
|
How and when are you switching? The new copperlist won't be active until the next vblank (unless you explicitly jump to it by strobing COPJMP1). If you're doing this in the visible area and immediate start updating PrimaryCopper or if SecondaryCopper isn't ready for the next frame you'll get interesting results.
Make sure SecondaryCopper is fully initialized and switch after PrimaryCopper has finished (but before line 0) and you should be good. Last edited by paraj; 12 October 2021 at 19:24. Reason: Y DIWSTOP -> PrimaryCopper |
12 October 2021, 20:16 | #3 | |
Registered User
Join Date: Feb 2018
Location: Northumberland, UK
Posts: 272
|
Quote:
Would I wait until the end of a frame? |
|
12 October 2021, 20:43 | #4 | |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,113
|
Quote:
The easy answer is: wait for an Y position that's later than the last line you care about. I.e. just beyond the end of the visible frame. You wrote PrimaryCopper so you know when it's done. Find the last WAIT in it and wait for a line just below that (unless you're doing really complicated stuff). I.e. if you're changing the background color on line 301 just after your playfield has finished displaying, wait for line 302. If in doubt, post your copper list (starting from at least the last WAIT). |
|
13 October 2021, 12:39 | #5 |
Registered User
Join Date: Feb 2018
Location: Northumberland, UK
Posts: 272
|
Fixed The bitplane pointers in the second copperlist were uninitialised and obviously containing garbage, so that's what was initially showing when I switched it over.
Thanks for the pointers, it all helped! |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to do multiple copperlists | Havie | Coders. Blitz Basic | 5 | 25 April 2020 10:54 |
Copperlists and screen sizes | Jherek Carnelia | Coders. Asm / Hardware | 2 | 12 November 2019 18:59 |
Multiple Copperlists and Sprites | Havie | Coders. Blitz Basic | 4 | 03 October 2018 21:10 |
Switching Discs | ghost_of_war | New to Emulation or Amiga scene | 2 | 19 May 2009 20:19 |
Switching from 1.3 to 2.04!!! Im confused! | Galatran | New to Emulation or Amiga scene | 18 | 08 October 2008 13:30 |
|
|