English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. General (https://eab.abime.net/forumdisplay.php?f=37)
-   -   Using the Copper to mangle the bitplanes. (https://eab.abime.net/showthread.php?t=58276)

Andy_C 15 March 2011 06:10

Using the Copper to mangle the bitplanes.
 
I had an idea years ago and was thinking of coding it now... Before I get serious with it I'm wondering if it is possible - so I thought I would just ask :)

With the Copper List is it possible to rearrange the screen address to emulate the Atari ST bitplanes?

This way you could use the movep trick to do a Atari ST C2P trick and let the Copper mangle the screen addresses around.

Will the Copper be able to have the timings to do this? I know it can do colour changes in a similar type of way.

Thanks for any input.

pmc 15 March 2011 08:06

I'm not familiar with Atari ST bitplane layout or the ins and outs of movep c2p but I do have some experience using the copper to contantly update the bitplane pointers per scanline.

I'm not sure if this is what you would need to do for what you're thinking of trying but one thing I can say is that using the copper to do that takes a hell of a lot of DMA time. And obviously that's without doing any other clever stuff outside of the copper list. That's where you might start to struggle I reckon.

StingRay 15 March 2011 09:18

Quote:

Originally Posted by Andy_C (Post 742739)
With the Copper List is it possible to rearrange the screen address to emulate the Atari ST bitplanes?

This way you could use the movep trick to do a Atari ST C2P trick and let the Copper mangle the screen addresses around.

It is possible and has been done at least once. There are better/faster ways for A500/68000 c2p though (cpu/blitter).

Andy_C 15 March 2011 09:47

Quote:

Originally Posted by StingRay (Post 742752)
It is possible and has been done at least once. There are better/faster ways for A500/68000 c2p though (cpu/blitter).

So it is possible :) I always wanted to try it but I moved onto different platforms all those years ago and never bothered.

I'm going back to England on holiday in the next couple of months and will be raiding a loft to get my old A500 and A1200 to bring back to Australia. I fancy having a play around with programming as a hobby interest thing.

So the blitter is the way to go on this. I guess you could use the movep trick and use the blitter to convert, doing 4 passes. I presume that's how you would do a 4 bitplane C2P?

Codetapper 15 March 2011 11:03

Just remember that the movep command doesn't exist on some higher CPU's! So your code isn't going to work on all Amigas.

Siggy999 15 March 2011 20:23

Quote:

Originally Posted by Codetapper (Post 742774)
Just remember that the movep command doesn't exist on some higher CPU's! So your code isn't going to work on all Amigas.

I did not know this! Thanks for the heads up!

Kalms 16 March 2011 00:25

For 68000 Amigas, you can use MOVEP to trade one blitter pass for some extra CPU consumption.

For 68020-68040 Amigas, you need to be careful with memory accesses. You'll find that MOVEP (which does 4 byte-sized accesses in one instruction) is wasteful in that regard.

For 68060 Amigas, you'll find that MOVEP is not implemented in hardware. Executing the instruction will either cause the machine to crash horribly, or invoke a very slow software emulation of the instruction.

Given that your focus seems to be 68000 Amigas - you have three things you can trade against each other: CPU time, blitter time, and memory consumption. If you find that your code is too slow, ask yourself: how can I change the input data and rendering loop, to require fewer blitter passes (without the increased CPU cost eating up the savings from the reduced blitting)?

kamelito 16 March 2011 12:58

Quote:

Originally Posted by StingRay (Post 742752)
It is possible and has been done at least once. There are better/faster ways for A500/68000 c2p though (cpu/blitter).

Only once, strange I'd imagine that Atari port where done this way, can you please name the game/demo doing this?

Thanks
Kamel


All times are GMT +2. The time now is 19:33.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04147 seconds with 11 queries