83
edits
(→ULA Functions: IN and OUT bits) |
(→ULA Functions: Keyboard Half-rows) |
||
Line 15: | Line 15: | ||
OUT to port xxFE (the high byte is ignored) will set the border colour to {d<sub>2</sub>, d<sub>1</sub>, d<sub>0</sub>}, drive the MIC socket with d<sub>3</sub> and the loudspeaker with d<sub>4</sub>.<sup>''(again, polarity?)''</sup> d<sub>5</sub>-d<sub>7</sub> are not used. | OUT to port xxFE (the high byte is ignored) will set the border colour to {d<sub>2</sub>, d<sub>1</sub>, d<sub>0</sub>}, drive the MIC socket with d<sub>3</sub> and the loudspeaker with d<sub>4</sub>.<sup>''(again, polarity?)''</sup> d<sub>5</sub>-d<sub>7</sub> are not used. | ||
=== Keyboard Half-rows === | |||
{| border="1" cellpadding="2" | |||
|row||d<sub>0</sub>||d<sub>1</sub>||d<sub>2</sub>||d<sub>3</sub>||d<sub>4</sub>||||row||d<sub>4</sub>||d<sub>3</sub>||d<sub>2</sub>||d<sub>1</sub>||d<sub>0</sub> | |||
|- | |||
|0xF7FE||1||2||3||4||5|| ||0xEFFE||6||7||8||9||0 | |||
|- | |||
|0xFBFE||Q||W||E||R||T||||0xDFFE||Y||U||I||O||P | |||
|- | |||
|0xFDFE||A||S||D||F||G||||0xBFFE||H||J||K||L||''Enter'' | |||
|- | |||
|0xFEFE||''Caps''||Z||X||C||V||||0x7FFE||B||N||M||''Sym''||''Space'' | |||
|} | |||
==== Example ==== | |||
If the keys Caps Shift, T, and O are held down, and the Z80 does an IN on port 0xDEFE (57086<sub>10</sub>), this selects the half-rows '''''Caps'''''-'''V''' and '''P'''-'''Y''', so d<sub>0</sub> is low because of the Caps Shift, d<sub>1</sub> is low because of the O, and the T has no effect because its row is not selected. Thus the returned data byte is 0x1C (that is, 0b00011100, or 28<sub>10</sub>) assuming EAR (d<sub>6</sub>) is low. | |||
== Contention == | == Contention == |
edits