Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!USU.BITNET!FATQW From: FATQW@USU.BITNET (Bryan Ford) Newsgroups: comp.sys.amiga.tech Subject: Re: vports ,cmaps, views and buses Message-ID: <8808132257.AA02749@jade.berkeley.edu> Date: 13 Aug 88 22:54:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 38 Subject: Re: vports ,cmaps, views and buses >)How can I create several different LOFcprlists that use the same colortable >)copper instructions? I am using one view structure that handles various >)views for double-buffering, and by mistake each copper list has its own >)color load instruction list. I want them all to use the same one, so LoadRGB4( ) >)will work on all of them. > >Tough one. Maybe someone more Studly than I can shed better light, but >I think you're screwed, because there is no way a copper list can >call another one as a subroutine. No way. Were it so, this might >be easy. No way, huh? Try this: A. Copper List wants to call Subroutine. It first stores the address to return to in COP1LC. Then it stores the Subroutine address in COP2LC and accesses COP2JMP to jump to the Subroutine. B. Subroutine receives control, does whatever is necessary (in this case, sets the color registers), and then accesses COP1JMP to return to the main copper list. C. Copper List receives control and resumes executing. True, this may not be practical for some purposes, and it only works on a single level (subroutines can't call subroutines), but if you've got several big copper lists, in which much of the code is duplicated in each list, this might be a possibility. Also, it is "possible" to create a true copper "stack" in memory by having the copper use the blitter to push and pop addresses off the "copper stack". However, this would be very inefficientt and you wouldn't be able to use the blitter for anything else. Bryan