Programming Copper

Writing to one of the two registers COPJMPn (n = 1,2) causes a strobe and forces the copper to start operation and load the copper list beginning at the address in COPLCn. The commands in the copper list, that is the sequence of copper commands in chipmem, is executed one by one. The Copper is restarted at each vertical blanking, forcing it to reload the command COPLCn points to.

Copper can call the CPU's attention by filing an interrupt request in INTREQ. It can also move data into COPLCn to form a loop. To stop, Copper can either wait for the impossible, or turn its own access to DMA off.

Copper and Blitter

The CDANG bit in COPCON permits access to 1 the register address space between $40 and $7, including Blitter's registers.

15141312111009080706050403020100 151413121110090807060504030201 00
cdang

Copper Lists

Copper lists can consist of the following instructions:

WAIT

waits until video beam counter is greater or equal the argument During WAIT the memory bus will not be accessed, freeing it for different tasks. The bus is accessed at uneven memory cycles.

15141312111009080706050403020100 15141312111009080706050403020100
VP HP 1bfd VE HE 0
  • VP vertical position 0,…,255: since there are 262 beam positions in NTSC, 0,…,6 refer to the last 7 lines before vertical blanking
  • HP horizontal position 0,…,112: 4 or 8 lines are aggregated
  • bfd blitter finished disable bit: if 0 the Copper will wait until Blitter has set blitter finished flag
  • VE vertical compare enable: for each 0, the comparison with the according bit in VP is always true
  • HE horizontal compare enable: for each 0, the comparison with the according bit in HP is always true

MOVE

moves data word into secified data register

15141312111009080706050403020100 15141312111009080706050403020100
00000000 DA 0 data
  • DA: the destination register's address
  • data: one word of data to be written to the destination register

skip next instruction if video beam counter is greater or equal the argument

15141312111009080706050403020100 15141312111009080706050403020100
VP HP 1bfd VE HE 0

(see WAIT for reference)

Copper's registers

COPCON 02E word
COPJMP1 088 word
COPJMP2 08A word
COP1LC 080 2 words
COP2LC 080 2 words
/var/www/wiki/data/pages/hardware/copper_programming_model.txt · Last modified: 2010/03/09 14:53 by gilgamesh
Back to top
CC Attribution-Noncommercial-Share Alike 3.0 Unported
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0