4 ms·
I'm not as knowledgeable about the Amiga as I am about other classic systems, but the Copper was (according to Wikipedia) a component of the Amiga's graphics co
by ANTSANTS 14y ago
I'm not as knowledgeable about the Amiga as I am about other classic systems, but the Copper was (according to Wikipedia) a component of the Amiga's graphics coprocessor that took very simple commands that one could make "programs" out of that would update video registers at times synchronized to the rendering of the display.
Back in the day, most cool graphical effects were done by using the CPU to update video memory at the precisely timed moments during the rendering of a frame. For example, if you changed the "scrolling speed" of a background between the drawing of every line, you could get a nifty "parallax scrolling" effect out of a machine with only 1 background layer. Or, you could change a color palette halfway through the screen to make it look like that part was underwater.
Some systems had interrupts that would fire in-between the drawing of lines to facilitate this. Other, simpler ones, like the NES and the C64, basically required the programmer to write perfectly timed, cycle accurate code that would poke the right values into video registers within a very small timing window.
The Amiga had a number of custom chipsets to make it easier to produce effects like this, and free the CPU from spinning idly and poking registers all the time. Looking at the wikipedia summary of its capabilities, I imagine console game programmers of the time would have killed for the ability to say "please write this value here at this exact moment, thank you."
It reminds me a bit of the SNES's HDMA (horizontal interrupt DMA) function, which allowed programmers to specify tables of data to be copied to certain VRAM registers in between the rendering of scanlines. Pretty much every SNES game with cool "mode 7" effects relied heavily on it.
- justinlloyd 14y agoThere is a reason that classic game developers don't become front-end web developers. We've already dealt with bitchy little machines that demand precise instructions to get the flashy results we want out of them, why do we want to do that all over again for a web browser? :) Before most of us had an idea what a coprocessor was, or independent GPUs, we approached the copper (blew my mind when a month after deving for the Amiga I figured out that copper was being used as a diminutive of co-processor) as a brain-dead but stupidly fast CPU with only three instructions.
- kleiba 14y agoSlight correction: the C64 certainly had raster interrupts, see http://www.c64-wiki.com/index.php/Raster_interrupt http://www.c64-wiki.com/index.php/Raster_interrupt
- ANTSANTS 14y agoWhoops, that's a pretty big oversight. I was aware that the C64 had vblank and timer interrupts, but not that it could do hblank interrupts.
- Kaali 14y agoNES does not have a true scanline interrupt, but it had this weird sprite #0 hit flag. The flag is set if the sprite #0 contains non-transparent pixels, and it overlaps something on the background. When the PPU hits the first pixel where those conditions are true, it sets a bit and fires an non-maskable interrupt. This way you could do once per frame scanline detection for split screen effects, but you still have to time your code correctly, as NMI handling is not clock accurate, and neither is the actual sprite #0 hit detection. For more advanced effects, Nintendo developed mappers for their cartridges, calles memory management controllers, which increased cartridge memory with banking, and also added custom interrupts and features. MMC3 contained a scanline counter which makes it possible to do fun effects with NES. Megaman 3 to 6 used MMC3. I'm really just a beginner with NES programming, so I hope there is no significant factual errors in that.