ULA Control Port: Difference between revisions

From SpecNext Wiki
Jump to: navigation, search
No edit summary
Johnnyo (talk | contribs)
No edit summary
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Port
{{Port
|Number=$xxFE
|Number=$xxFE
|ShortDesc=Controls border color and base Spectrum audio settings.
|NumberDec=254
|Readable=No
|ShortDesc=Controls border color and base Spectrum audio settings, reflect the state of the keyboard
|Readable=Yes
|Writable=Yes
|Writable=Yes
|PortMask=%---- ---- ---- ---0
}}
}}
When written to, adjusts the border color and audio devices as follows:
 
When written to, adjusts the border color and audio devices as follows (soft reset = 0):


{| class="wikitable"
{| class="wikitable"
Line 13: Line 14:
| 0-2 || Border color
| 0-2 || Border color
|-
|-
| 3 || Enable MIC output
| 3 || MIC output (saving via audio jack)
|-
|-
| 4 || Enable EAR output
| 4 || EAR output (connected to internal speaker)
|-
|-
| 5-7 || Unused
| 5-7 || Unused
|}
|}


Reading the port with certain particular high bytes will read the keyboard - see {{PortNo|$**FE}}. Bit 6 of the ULA byte is always the EAR input.
---------
 
Reading the port with certain particular high bytes will read the keyboard - see below. Bit 6 of the ULA byte is always the EAR input (signal from tape audio jack - also input from [https://wiki.specnext.dev/Pi:index Pi] digital audio is now mixed in, since 3.0 cores).
 
The upper byte of port address selects the state of the keyboard segment to return, by having only one 0 bit of all eight.
 
The value read is:
 
  bit 6 = EAR in from the tape audio jack
  bits 4:0 = key column result from keyboard, active low
 
Also note: nextreg 0x08 bit 0 can be set to select issue 2 keyboard which will affect reads of bit 6
 
Reads keys on the keyboard depending on the upper byte of the port number. The five keys are represented by bits 0-4 of the read byte, listed below with bit 4 first down to bit 0. A zero means that the key is pressed.
 
The top eight bits of the port address are active low signals that select one or more key rows for reading.
 
{| class="wikitable"
! Port upper byte !! Keys affected (row of keys)
|-
| $7F (bit 7) || B, N, M, Symbol Shift, Space
|-
| $BF (bit 6) || H, J, K, L, Enter
|-
| $DF (bit 5) || Y, U, I, O P
|-
| $EF (bit 4) || 6, 7, 8, 9, 0
|-
| $F7 (bit 3) || 5, 4, 3, 2, 1
|-
| $FB (bit 2) || T, R, E, W, Q
|-
| $FD (bit 1) || G, F, D, S, A
|-
| $FE (bit 0) || V, C, X, Z, Caps Shift
|}
 
[[File:Speckeys.png]]
 
=== Wireless Keyboards ===
Most ps/2 keyboards commonly seen today are wired. Two models of wireless keyboard known to work well with the Next are the '''Microsoft Wireless Elite Keyboard 1011''' and the '''Logitech Cordless Desktop Keyboard EX110'''.

Latest revision as of 17:58, 16 December 2025

Port Number $xxFE
Decimal 254
Short desc. Controls border color and base Spectrum audio settings, reflect the state of the keyboard
Bit Mask
Readable Yes
Writable Yes
Subsystem


When written to, adjusts the border color and audio devices as follows (soft reset = 0):

Bit Function
0-2 Border color
3 MIC output (saving via audio jack)
4 EAR output (connected to internal speaker)
5-7 Unused

Reading the port with certain particular high bytes will read the keyboard - see below. Bit 6 of the ULA byte is always the EAR input (signal from tape audio jack - also input from Pi digital audio is now mixed in, since 3.0 cores).

The upper byte of port address selects the state of the keyboard segment to return, by having only one 0 bit of all eight.

The value read is:

 bit 6 = EAR in from the tape audio jack
 bits 4:0 = key column result from keyboard, active low

Also note: nextreg 0x08 bit 0 can be set to select issue 2 keyboard which will affect reads of bit 6

Reads keys on the keyboard depending on the upper byte of the port number. The five keys are represented by bits 0-4 of the read byte, listed below with bit 4 first down to bit 0. A zero means that the key is pressed.

The top eight bits of the port address are active low signals that select one or more key rows for reading.

Port upper byte Keys affected (row of keys)
$7F (bit 7) B, N, M, Symbol Shift, Space
$BF (bit 6) H, J, K, L, Enter
$DF (bit 5) Y, U, I, O P
$EF (bit 4) 6, 7, 8, 9, 0
$F7 (bit 3) 5, 4, 3, 2, 1
$FB (bit 2) T, R, E, W, Q
$FD (bit 1) G, F, D, S, A
$FE (bit 0) V, C, X, Z, Caps Shift

File:Speckeys.png

Wireless Keyboards

Most ps/2 keyboards commonly seen today are wired. Two models of wireless keyboard known to work well with the Next are the Microsoft Wireless Elite Keyboard 1011 and the Logitech Cordless Desktop Keyboard EX110.