Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
documentations:devices:6821 [2014/03/26 20:57] – [TO System PIA] pulkomandy | documentations:devices:6821 [2018/08/17 09:10] (current) – pulkomandy | ||
---|---|---|---|
Line 12: | Line 12: | ||
The control registers have the following functions: | The control registers have the following functions: | ||
- | === Bit 7: interrpupt | + | === Bit 7: interrput |
This bit is set on transition (low> | This bit is set on transition (low> | ||
- | === Bit 6: interrpupt | + | === Bit 6: interrput |
This works the same as bit 7, but is only used when CA2 or CB2 is configured as an input pin. Otherwise, the pin can't be used as an interrupt source. | This works the same as bit 7, but is only used when CA2 or CB2 is configured as an input pin. Otherwise, the pin can't be used as an interrupt source. | ||
Line 43: | Line 43: | ||
===== Uses ===== | ===== Uses ===== | ||
==== MO " | ==== MO " | ||
- | === data port A === | + | === data port A (A7C0) |
* bit 0: /FORME - Switch the screen RAM mapping between pixel and attribute RAMs | * bit 0: /FORME - Switch the screen RAM mapping between pixel and attribute RAMs | ||
* bits 1-4: border color (R,G,B,P) | * bits 1-4: border color (R,G,B,P) | ||
Line 50: | Line 50: | ||
* bit 7: tape drive data input | * bit 7: tape drive data input | ||
- | Bit 7 is low when no tape drive is plugged, and high when there is one. The monitor loading and saving code checks for this to detect the ape drive. | + | Bit 7 is low when no tape drive is plugged, and high when there is one. The monitor loading and saving code checks for this to detect the tape drive. |
- | === data port B === | + | === data port B (A7C1) |
* bit 0: sound output | * bit 0: sound output | ||
* bits 1-3: keyboard column to scan | * bits 1-3: keyboard column to scan | ||
Line 58: | Line 58: | ||
* bit 7: state of key selected by the column and line | * bit 7: state of key selected by the column and line | ||
- | === Control ports === | + | === Control ports (A7C2, A7C3) === |
* CA1: lightpen interrupt (IRQA is wired to 6809 FIRQ) | * CA1: lightpen interrupt (IRQA is wired to 6809 FIRQ) | ||
* CA2: tape drive motor control (output) | * CA2: tape drive motor control (output) | ||
Line 65: | Line 65: | ||
==== TO " | ==== TO " | ||
- | === Data port B === | + | |
+ | === Data port A (E7C8) === | ||
+ | |||
+ | == PA0: KTEST == | ||
+ | This bit is set by the keyboard system while a key is pressed. This allows the keyboard handler code to know if it needs to do a full keyboard scan. | ||
+ | |||
+ | == PA1-PA7: printer data bits == | ||
+ | These bits are wired to printer port D1-D7. Bit 0 is PB0 (this would have been too simple!) | ||
+ | |||
+ | === Data port B (E7C9) === | ||
+ | |||
+ | == PB0-PB1: printer missing bits == | ||
+ | * PB0 is data bit 0 | ||
+ | * PB1 is /STROBE for the printer port. | ||
+ | == PB2: video incrustation control | ||
+ | set to 0 to enable video incrustation mode. Note this needs specific hardware for synchronizing the system clock to the external video. | ||
== PB3-PB6: memory expansion control == | == PB3-PB6: memory expansion control == | ||
Line 91: | Line 106: | ||
Seriously, this system is a mess. Use the new banking from the gate array if you can. | Seriously, this system is a mess. Use the new banking from the gate array if you can. | ||
- | === Control port B === | + | === Control port A (E7CA) |
- | * CB2: set to 0 to enable | + | == CA1: video incrustation sync == |
+ | This is connected | ||
+ | |||
+ | == CA2: Tape drive motor control == | ||
+ | Active low. | ||
+ | |||
+ | == CB1: Lightpen FIRQ == | ||
+ | Triggered when the lightpen sensor detects the screen refresh. | ||
+ | |||
+ | === Control port B (E7CB) === | ||
==== "Sound and Games" PIA ==== | ==== "Sound and Games" PIA ==== | ||
+ | Available as an expansion for the TO7, TO7/70, TO9 and MO5, this is built-in for the other machines. | ||
+ | |||
+ | < | ||
+ | |||
+ | === Data port A (x7CC) === | ||
+ | ^Bit^Joystick 0 ^Mouse | ||
+ | |PA0|Up | ||
+ | |PA1|Down | ||
+ | |PA2|Left | ||
+ | |PA3|Right | ||
+ | |PA4| | |Up | | ||
+ | |PA5| | |Down | | ||
+ | |PA6| | |Left | | ||
+ | |PA7| | |Right| | ||
+ | |||
+ | < | ||
+ | |||
+ | === Data port B (x7CD) === | ||
+ | |||
+ | ^Bit^Joysticks | ||
+ | |PB0|Common 0 | ||
+ | |PB1|Common 1 | ||
+ | |PB2|Joy0 button 2 |XA |DAC bit 2| | ||
+ | |PB3|Joy1 button 2 | |DAC bit 3| | ||
+ | |PB4| | |DAC bit 4| | ||
+ | |PB5| | |DAC bit 5| | ||
+ | |PB6|Joy0 button 1 |YA | | | ||
+ | |PB7|Joy1 button 1 | | | | ||
+ | |||
+ | </ | ||
- | === Data port A === | + | === Control ports (x7CE/ |
- | * Joystick reading | + | The joystick buttons are wired both to port input pins and to control pins. This makes it possible to trigger interrupts on them, but read the complete joystick state for both joysticks on data ports A and B without having to also test the control ports. |
+ | * CA1: Joy0 button 2 | ||
+ | * CA2: Joy0 button 1 | ||
+ | * CB1: Joy1 button 2 | ||
+ | * CB2: Joy1 button 1 | ||
- | === Data port B === | + | It is not possible to use the DAC and the joysticks |
- | * DAC output | + | |
- | * Player 2 action button | + | |
- | === Control ports === | + | |
- | * CA1: player 1 action button | + | |
- | * CB1: player 2 action button | + | |
+ | The sound output from the DAC can be muted by using the 6846 buzzer output to force it low. Or, the DAC cn be used as a " | ||
===== Documents ===== | ===== Documents ===== | ||
* {{: | * {{: |