![]() |
![]() |
![]() |
#21 | |
Per aspera ad astra
![]() Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 2,241
|
Quote:
![]() Remember that apart interrupt overhead/registers saving/chip access, you have the slow E clock to acknowledge and clear as source IRQ. Too much CPU time wasted, if you do it a hundred times every frame... There are some games that use CPU IRQs, called by Copper, to do some video magia and often a patch is needed on fast processor to not desync.. For ex. in Lionheart the Copper also setup different 'unused' bits to signal to CPU what it want. |
|
![]() |
![]() |
#22 |
Registered User
![]() Join Date: Jul 2015
Location: The Netherlands
Posts: 1,388
|
|
![]() |
![]() |
#23 | |
Posts: n/a
|
Quote:
Good if your normal flux is implementing a copper fade every scanline; bad if it's waiting to reset bitplane pointers on display memory wrap. |
|
![]() |
#24 | ||
Per aspera ad astra
![]() Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 2,241
|
Quote:
Quote:
For every problem its solution ![]() In this thread two problems have been mainly raised: manage the overcoming of the next vertical blank and manage a copper line gradient with the copper at the same time with blitter queue. |
||
![]() |
![]() |
#25 | |
Posts: n/a
|
Quote:
![]() |
|
![]() |
#26 |
Registered User
![]() Join Date: Nov 2014
Location: Italy
Posts: 981
|
you are so talented developer. Nice game and, from video, great gameplay. this game remember me best successfull Amiga game. You could creat a great game
|
![]() |
![]() |
#27 |
Posts: n/a
|
Thank you! This was a game that Nick and I wrote for cellphones back in 2004. It's fun to come back to my favourite platform and find a way to squeeze this title on there.
|
![]() |
#28 | ||
Code Kitten
![]() ![]() Join Date: Aug 2015
Location: Montreal/Canadia
Age: 48
Posts: 1,143
|
Quote:
If I understand correctly, Copper1 waits on scanlines and changes colors then switches to Copper2 which waits on Blitter Finished but how do you make sure timings are right and that it will we finished before the next scanlines occur? I suppose re-reading the HRM chapter on Copper instructions should give me the answer but from memory I fail to see how to manage the switch back to Copper1 in the absence of a blit finished? Can Copper2 be made to switch back to Copper1 before the next scanline occurs even while it is waiting for the Blitter? This seems interesting but I clearly lack some knowledge there. ![]() Quote:
![]() (and yes, I need to peruse the HRM again ![]() |
||
![]() |
![]() |
#29 | |||
Per aspera ad astra
![]() Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 2,241
|
Quote:
In each line (or every how many I consider appropriate or useful) I have a point where I could set the blitter's registers, but only if the blitter is free. Then in a few cycles I setup and launch the operation, then return to my original copper list. In this way I have a flow for the blitter almost continuous. To make this I use in an advanced way the SKIP instruction and the two copper's pointers. Quote:
And yes Copper2 can switch back to Copper1, like in a subroutine, and is what I do ![]() Of course it is not a panacea that can work in all cases... Quote:
I put it specifically because the concept wouldn't have been so easy to understand. Usually in my small intros I always try to exploit Copper in an unusual way. Often the same thing could be done in much more banal (but slow) ways, but programming on Amiga means being creative. Well, have fun with copper in advanced mode. ![]() |
|||
![]() |
![]() |
#30 |
Registered User
![]() Join Date: Jul 2018
Location: Londonish / UK
Posts: 491
|
I'm trying to create a blitter queue copper list right now, based on what I've read in this thread. I'm struggling a bit, particularly with creating a split screen while still blitting, and with updating to point to a new blitter list when the next set of calculations are done. Could you guys please look over the following bit of pseudo code and tell me whether you think I've understood, or if there's anything in there that's going to balls it up?
Thanks. Code:
main() { front = 0 back = 1 flipping = 2 next_blitter_queue = NULL; update copper list to point to front set COP1LC to start set COP2LC to end screen_availble <- FALSE blitter_active <-FALSE for (;;) draw_screen(); } draw_screen() { next_blitter_queue = all_the_calculations(); if (!blitter_active) { blitter_active <- true COP2LC <- next_blitter_queue next_blitter_queue <- NULL hit COP2JMP } } VBLANK { set COP1LC to start if screen_available { swap front and flipping update copper list to point to new front screen available <- FALSE } } COPER { swap back and flipping screen_available <- TRUE if (next_blitter_queue) { COP2LC <- next_blitter_queue next_blitter_queue <- NULL hit COP2JMP } else blitter_active <- FALSE } // upper copper list // set up primary display start: wait for top set up upper screen set COP1LC to upper_loop upper_loop: wait for blitter skip if near middle jump to COP2LC // fall through to middle // lower copper list // set up instrument panel middle: wait for middle set up lower screen set COP1LC to lower_loop lower_loop: wait for blitter skip if near bottom jump to COP2LC // fall through to end // too close to bottom of screen to risk starting a blit end: sleep blit_done: set COP2LC to end trigger COPER sleep // a blitter queue copper list blit0: set COP2LC to blit1 set up blitter finish with BLTSIZE jump to COP1LC blit1: set COP2LC to blit2 set up blitter finish with BLTSIZE jump to COP1LC blit2: set COP2LC to blitn set up blitter finish with BLTSIZE jump to COP1LC ... blitn: set COP2LC to blit_done set up blitter finish with BLTSIZE jump to COP1LC |
![]() |
![]() |
#31 | |
Registered User
![]() Join Date: Sep 2015
Location: Germany
Posts: 224
|
Quote:
Wow, I know much about driving the blitter from the copper, but this idea using subroutines within the copperlist is really excellent! ![]() ![]() ![]() |
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Best way to mix blitting with copper and copper effects | roondar | Coders. Asm / Hardware | 3 | 12 September 2016 14:12 |
Blitter busy flag with blitter DMA off? | NorthWay | Coders. Asm / Hardware | 9 | 23 February 2014 22:05 |
Avoiding copper strobe/blitter bug | mc6809e | Coders. Asm / Hardware | 31 | 28 November 2013 09:09 |
Combining copper scrolling with copper background | phx | Coders. Asm / Hardware | 14 | 16 June 2013 08:26 |
Blitter using the copper... | h0ffman | Coders. Asm / Hardware | 9 | 23 February 2012 09:25 |
|
|