Changes

Extra CPC Plus Hardware Information

272 bytes added, 07:25, 7 July 2024
Without any peripherals attached, the following readings were observed:
* ADC0: 0x03f* ADC1: 0x03f* ADC2: 0x03f* ADC3: 0x03f* ADC4: 0x03f* ADC5: 0x000* ADC6: 0x03f* ADC7: 0x000
Writing to these appears to have no effect, with the readings not changing.
The official documentation is not clear about the bits in the DCSR register (&6c0f), I found the following are correct:
{| class="wikitable"|-| Bit 7 || Raster Int|-| Bit 6 || DMA Channel 0 Interrupt|-| Bit 5 || DMA Channel 1 Interrupt|-| Bit 4 || DMA Channel 2 Interrupt|-| Bit 3 || not used|-| Bit 2 || DMA Channel 2 Enable|-| Bit 1 || DMA Channel 1 Enable|-| Bit 0 || DMA Channel 0 Enable|} 
Each DMA opcode is two bytes, and is always fetched from an even address. The top 4-bits of the opcode fetched in the DMA cycle are used to specify the function to perform by the DMA.
I found the following rule:
bit {| class="wikitable"|-| Bit 3 || not used|-| Bit 2 || Nop/loop/Int/Stop instruction|-| Bit 1 || Repeat N instruction|-| Bit 0 || Pause instruction.|} 
If (opcode & 0x07 == 0) then write data to register else perform function defined by bits.
For those who do not know this language, here is a quick list of the operators and their functions:
* | - bitwise/logical OR* & - bitwise/logical AND* << - shift left by number of bits specified* >> - shift right by number of bits specified* == - equals comparison* = - assign value to variable* && - and, as used in "if a==b and c==d ..."
Hex numbers are represented with a prefix of 0x. e.g. 0x0abcd is the hex number abcd.
In if statements, the operations enclosed in { } brackets following the if are executed if the condition is true, otherwise the operations enclosed in the brackets following the "else" statement are executed.
 
In the ASIC documentation it states that following the leading edge of the HSYNC, there is one dead cycle, followed by an instruction fetch for each channel. For each cycle 1 2 byte instruction is fetched.
When competition pro attached only.
* 6808 = left/right* 6809 = up/down* 680a = Z button* 680b = y button
pressing X button sets bit 4 of all keys on keyboard matrix, pressing A button sets bit 5 of all keys on keyboard matrix
pressing delete causes all lines to go to 0x080, except line 15. All keys except delete work as expected.
* keyboard normally all keys pressed gives 0-9 0x0ff* 10 is joystick* anything above 10 is zero.
=== joypad and analogue joypad ===
Microsoft sidewinder doesn't work!
 
[[Category:Hardware]] [[Category:CPC Plus]] [[Category:CPC Internal Components]]
13,173
edits