JSS Device ADM3ATerminal
This device simulates an ADM-3A serial terminal (with keyboard and display). The terminal simulation supports control sequences. Due to the large number of optional features and configuration options, not all the possible settings from a real terminal are available in the simulation.
Options
- uart - 1 if this device communicates via an UART (Universal Asynchronous Receiver-Transmitter). In real hardware, this means the communication happens at byte level and the UART is responsible for serializing and deserializing data. From a simulation point of view communication happens at byte level without any serialization.
- uart_receive_complement - 1 if the received data must be complemented before being passed to the next level. This value is usually set to 0.
- uart_send_complement - 1 if the data to be sent needs to be complemented. This value is usually set to 0.
- uart_status_data_send_ready_bit - indicates which be will be set in the status register to indicate that data is available to be sent. This value is usually 0. In certain architectures, multiple serial devices (up to 8) can be connected on the same status cable, thus each device must use a different wire for its own data send ready bit.
- transmit_bit_number - if uart is set to 0, communication happens at bit level. This value is usually set to 0. However, if multiple serial devices (up to 8) will share the same data cable, this value indicates on which wire the bit will be sent.
- receive_bit_number - if uart is set to 0, communication happens at bit level. This value is usually set to 0. However, if multiple serial devices (up to 8) will share the same data cable, this value indicates from which wire the bit will be read.
- bit_send_complement - if uart is set to 0, communication happens at bit level. If this value is set to 1, the current bit will be inverted before being sent.
- bit_transmit_empty - if uart is set to 0, communication happens at bit level. This value indicates what will be sent when there is no available data. This is useful if the software doesn't check the status register or reads data regardless of the status register value.
- map_codes_from, map_codes_to - these two options allows to setup a mapping of character codes to be used during send and receive. Both options contain a list of comma separated hex values, associated with characters. When sending, characters from "map_codes_from" will be mapped to characters in "map_codes_to". When receiving, characters from "map_codes_to" will be mapped to characters in "map_codes_from". Mappings are set in the order in which they appear in the lists. One usage is to force setting bit number 7 on certain regular ASCII characters. Another use case is for converting lowercase characters into uppercase characters when sending data. In this case, in order to avoid converting to lowercase when receiving, it is important to include also the uppercase-to-uppercase mapping, like this: "map_codes_from"="61,62,41,42", "map_codes_to"="41,42,41,42" (this example converts only "a" and "b" to "A" and "B").
- receive_ignore_bit_7 - if set to 1, will ignore the value associated with bit 7 when data is received.
- transmit_set_bit_7 - if set to 1, will always set bit number 7 to 1, when data is sent.
- space_adv - if set to 1, space will only advance the cursor without being recorded as a character (existing characters will not be overwritten). Default value is 0.
- clr_scrn - if set to 1, enables clear screen control sequences. Default value is 1.
- enable_kb_lock - if set to 1, enables locking/unlocking the keyboard with control sequences. Default value is 1. If you keep this value set, you should make sure the software has a way of unlocking the keyboard, otherwise the simulation may become unusable, requiring a restart. In some systems, you need a second terminal to be connected in order to be able to activate the unlock on the first terminal.
- cur_ctl - if set to 0, certain cursor control operations are disabled. This particularly include operations that would move the cursor to an upper line. This is particularly useful if simulating devices such as teletypes that does not allow complete cursor control. Default value is 1.
- lc_characters - if set to 1 will enable lowercase characters to be sent. Default value is 0.
- num_lines - number of text lines. Default value is 24.
Implementation
https://github.com/ComputingMongoose/JavaSystemSimulator/blob/main/src/jss/devices/peripherals/ADM3ATerminal.javaExample configuration
{
"name":"ADM3A",
"type":"ADM3ATerminal",
"configuration":[
{"key":"uart","value":0},
{"key":"transmit_bit_number","value":7},
{"key":"receive_bit_number","value":0},
{"key":"bit_send_complement","value":0},
{"key":"bit_transmit_empty","value":1},
{"key":"receive_ignore_bit_7","value":1},
{"key":"transmit_set_bit_7","value":0},
{"key":"map_codes_from","value":"3,0D,0A,20,21,22,23,24,25,26,27,28,29,2A,2B,2C,2D,2E,2F,30,31,32,33,34,35,36,37,38,39,3A,3B,3C,3D,3E,3F,40,5B,5C,5D,5E,5F,60,7F"},
{"key":"map_codes_to", "value":"83,8D,8A,A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,BA,BB,BC,BD,BE,BF,C0,CB,CC,CD,CE,CF,D0,FF"}
]
}