Copper Control Register: Difference between revisions
From SpecNext Wiki
m 2 revisions imported |
core 3.0 changes |
||
| Line 1: | Line 1: | ||
{{NextRegister | {{NextRegister | ||
|Number=$62 | |Number=$62 | ||
|Readable= | |Readable=Yes | ||
|Writable=Yes | |Writable=Yes | ||
|ShortDesc=Holds high byte of [[Copper]] control flags. | |ShortDesc=Holds high byte of [[Copper]] control flags. | ||
| Line 33: | Line 33: | ||
| %11 || Reset CPC to 0 and START Copper, reset CPC at each video frame at (0,0) (top left pixel of PAPER area) | | %11 || Reset CPC to 0 and START Copper, reset CPC at each video frame at (0,0) (top left pixel of PAPER area) | ||
|} | |} | ||
'''NEW in core 3.0:''' | |||
The register is now also readable. | |||
Revision as of 21:05, 3 October 2019
| Number | TBRegisterNumber::$62 |
|---|---|
| Readable | TBRegisterReadable::Yes |
| Writable | TBRegisterWritable::Yes |
| Short Description | [[ShortDesc::Holds high byte of Copper control flags.]] |
| Bit | Function |
|---|---|
| 7-6 | Control mode |
| 5-3 | Reserved, must be 0 |
| 2-0 | High three bits of Copper list index (value 0-2047) |
When "Control mode" bits are identical with previously set ones, they are ignored - allowing for index change without restarting currently running Copper program.
Copper has internally 10 bit "program counter" register (CPC), going through 0-1023 values, executing Copper instruction from the list at memory position (CPC*2). This will cause the Copper program to loop automatically. To "halt" program (avoiding possible loop), use WAIT instruction with non-existent horizontal line, like "WAIT 63,511 = 0xFF, 0xFF".
To change control mode, the new value must differ from previous, the possible control modes are:
| Bits 7-6 | Control mode |
|---|---|
| %00 | STOP Copper (CPC is kept at current value) |
| %01 | Reset CPC to 0 and START Copper |
| %10 | START Copper (does resume at current CPC) |
| %11 | Reset CPC to 0 and START Copper, reset CPC at each video frame at (0,0) (top left pixel of PAPER area) |
NEW in core 3.0:
The register is now also readable.