A.D.A. Amiga Demoscene Archive

        Welcome guest!

  

  

  

log in with SceneID

  

Demos Amiga Demoscene Archive Forum / Coding / Context switching for framesync c2p

 

Author Message
noname
Member
#1 - Posted: 7 Mar 2010 05:01
Reply Quote
I'm trying to get my head around doing framesyncronized c2p. By this I mean running the c2p only when the chipmem is fast, i.e. when the beam is off the bitplanes (as proposed by SP on Amycoders many years ago).

My first tests went really well and I had program counters modified and alternating colour 0 on screen in no time. But when I started to do implement context loading and storing in a reusable way, and inserted c2p, I kind of lost track.

Maybe some of you have implemented framesync c2p on 68060 and could give me some tips?
So far I have saved/restored: D0-A6, USP, SR, PC

It seems like I need to modify the CACR to invalidate the branch caches on 68060, but I am not sure I am doing it correctly.
Kalms
Member
#2 - Posted: 7 Mar 2010 15:38
Reply Quote
You don't need to do anything cache related. I presume you're not using the FPU in both tasks (in that case you are best served saving/restoring the entire FPU state).
noname
Member
#3 - Posted: 7 Mar 2010 16:59
Reply Quote
Thats good news that I don't have to touch the cache!

I am not using any FPU at this stage, but of course I wouldl want to use that as well as soon as things get going. Btw. how would I best handle context switching the FPU? Is that just FMOVEM/FRESTORE (as page D-13 ff of the MC68060 user manual suggest) or also something else?
Kalms
Member
#4 - Posted: 8 Mar 2010 15:18
Reply Quote
Hmm I think so yes. FMOVEM to save FPn, and FSAVE/FRESTORE for the rest of the FPU state.
Crumb
Member
#5 - Posted: 11 Mar 2010 20:03
Reply Quote
Would it be possible to enable Blitter&Sprites when the beam is on the bitplanes and disable them when it's not? That way it would be possible to show some logos on top of the chunky gfx without stealing chipmem bandwitch.

BTW, what did happen with Doom's c2p that used fpu to be faster than copy speed? did he finish it?

 

  Please log in to comment

  

  

  

 

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