Difference between revisions of "Copper Control High Byte"
From SpecNext official Wiki
(Created page with "{{NextRegister |Number=$62 |Readable=No |Writable=Yes |ShortDesc=Holds high byte of Copper control flags. }}") |
(core 3.0 changes) |
||
(2 intermediate revisions by 2 users not shown) | |||
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. | ||
}} | }} | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! 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: | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! 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. |
Latest revision as of 21:05, 3 October 2019
Number | $62 |
---|---|
Readable | Yes |
Writable | Yes |
Short Description | 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.