83
edits
m (Cat: Audio) |
(→ULA Functions: IN and OUT bits) |
||
Line 12: | Line 12: | ||
From Z80 code, the ULA functions are accessible on any even-numbered I/O port (as the ULA performs ''very'' partial port decoding), but conventionally port 0xFE is used. | From Z80 code, the ULA functions are accessible on any even-numbered I/O port (as the ULA performs ''very'' partial port decoding), but conventionally port 0xFE is used. | ||
'' | IN from port xxFE will read the keyboard state and tape input. Each bit of the high byte selects a keyboard half-row; that row is read if the bit is ''low''. If a key is pressed on any selected half-row, the corresponding bit of the data byte is ''low''; this accounts for bits d<sub>0</sub>-d<sub>4</sub>. d<sub>6</sub> is the value at the EAR socket <sup>''(polarity?)''</sup>; d<sub>5</sub> and 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. | ||
== Contention == | == Contention == |
edits