home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!edcastle!dcs.ed.ac.uk!jxp
- From: jxp@dcs.ed.ac.uk (Joe Potter)
- Newsgroups: alt.sys.amiga.demos
- Subject: Re: Music and Code from Demos
- Message-ID: <BxLLGL.uF@dcs.ed.ac.uk>
- Date: 12 Nov 92 10:07:32 GMT
- References: <MKNIP.92Nov5110420@silver-surfer.hut.fi> <1992Nov05.155826.9766@crash> <MKNIP.92Nov9165110@blob.hut.fi>
- Sender: cnews@dcs.ed.ac.uk (UseNet News Admin)
- Organization: Department of Computer Science, University of Edinburgh
- Lines: 61
-
- In article <MKNIP.92Nov9165110@blob.hut.fi>, mknip@niksula.hut.fi (Mats Anders Knip) writes:
- > The copper, my dear PC-user, is what makes the Amiga so superior to
- > the PC when it comes to (among other things) scrolling and color-
- > cycling. The copper (Graphics CoProcessor) takes care of all bitmap
- > and color handling, and has direct access to chip-mem by DMA.
-
- Makes cups of tea as well? :-)
-
- > If you want to do anything with the screen, tell the copper about
- > it, and it takes care of it all. (well, almost...)
-
- Don't forget the blitter!
-
- > For example - let's imagine you have got a 1000-pixel wide bitmap that
- > you want to scroll from left to right. On the PC, each frame you copy
- > 200*320 (= 64k) bytes from memory to the graphics-handler (right?),
- > which takes a LOT of CPU time. You can't even make a 50hz scroll on a
- > slower PC. (the C64 could do that...poor work, PC-designers!)
-
- Ah, but the C64 could only do it on a character mapped screen.
- Try it with the bitmap mode!
-
- > On the
- > amiga, you tell the copper what part of memory you want to show, and
- > the number of pixels to step over before it starts drawing and - POOF!
- ^ after it finishes :-)
- And anyway, that's the display DMA that does that. Is it
- Agnus that does DMA? That's what's responsible for modulos.
-
- > There you go. This requires a total of 2 word-moves per bitmap + one
- > move for the fine-tune. Compare that to the PC's 64000...
-
- And when you want a block-mapped screen, do you unfold the
- *lot* at the start, into a Megs worth of screen data? At some point, in
- real time, you need to blit blocks about. It's the blitter that's fast in the
- Amiga!
-
- > And this steals nearly no proces-
- > sing time from the CPU at all, since the copper only works on odd cycles.
-
- Well, the copper uses whatever cycle is available, odd or even.
- The display DMA uses only odd cycles, unless you want to display lots of
- colours, when it starts pinching even cycles. The copper has priority over
- the 68000, since it requires synchronous operation with the display.
-
- > The blitter is another co-processor that has DMA access to the Amigas
- > chip-memory. It can be used to move big heaps of data and
- > perform operations on the data (like and, or etc...) at the same time
- > without any load on the CPU (not completely true, but basically.
- > Really complicated operations steal more cycles from the CPU, while
- > a simple operations like a plain copy steals nearly no time at all).
-
- A=>D copy uses every other cycle, and on a 4-bitplane lo-res
- screen, steals every positive clock edge from the 68000 for chipmem access.
- If the 68000 is running out of fast RAM, it is *never* bothered by the
- DMA processors. Except for their interrupts.
- If you've got a 4-colour lo-res screen, A->D is essentially free.
- Of course, you have to include the overhead for setting up the blitter.
-
- Joe.
- jxp@dcs.ed.ac.uk
-