(
            self, values, queues, display, console, keyboard,
            device_params, current_device,
            serial_in_size, codepage, text_mode, soft_linefeed
        )
Initialise devices.
Initialise devices.
Initialise devices .
def _init_devices(
            self, values, queues, display, console, keyboard,
            device_params, current_device,
            serial_in_size, codepage, text_mode, soft_linefeed
        ):
        """Initialise devices."""
        device_params = self._normalise_params(device_params)
        # screen device, for files_()
        current_device = self._normalise_current_device(current_device, device_params)
        self._console = console
        self._devices = {
            b'SCRN:': devicebase.SCRNDevice(display, console),
            # KYBD: device needs display as it can set the screen width
            b'KYBD:': devicebase.KYBDDevice(keyboard, display),
            # cassette: needs text screen to display Found and Skipped messages
            b'CAS1:': cassette.CASDevice(device_params.get(b'CAS1', None), self._console),
            # serial devices
            b'COM1:': ports.COMDevice(device_params.get(b'COM1', None), queues, serial_in_size),
            b'COM2:': ports.COMDevice(device_params.get(b'COM2', None), queues, serial_in_size),
            # parallel devices - LPT1: must always be available
            b'LPT1:': parports.LPTDevice(
                device_params.get(b'LPT1', None), devicebase.nullstream(), codepage
            ),
            b'LPT2:': parports.LPTDevice(device_params.get(b'LPT2', None), None, codepage),
            b'LPT3:': parports.LPTDevice(device_params.get(b'LPT3', None), None, codepage),
        }
        # device files
        self.scrn_file = self._devices[b'SCRN:'].device_file
        self.kybd_file = self._devices[b'KYBD:'].device_file
        self.lpt1_file = self._devices[b'LPT1:'].device_file
        # disks
        self._init_disk_devices(device_params, current_device, codepage, text_mode, soft_linefeed)
def _init_devices ( self , values , queues , display , console , keyboard , device_params , current_device , serial_in_size , codepage , text_mode , soft_linefeed ) : device_params = self . _normalise_params ( device_params ) # screen device, for files_() current_device = self . _normalise_current_device ( current_device , device_params ) self . _console = console self . _devices = { b'SCRN:' : devicebase . SCRNDevice ( display , console ) , # KYBD: device needs display as it can set the screen width b'KYBD:' : devicebase . KYBDDevice ( keyboard , display ) , # cassette: needs text screen to display Found and Skipped messages b'CAS1:' : cassette . CASDevice ( device_params . get ( b'CAS1' , None ) , self . _console ) , # serial devices b'COM1:' : ports . COMDevice ( device_params . get ( b'COM1' , None ) , queues , serial_in_size ) , b'COM2:' : ports . COMDevice ( device_params . get ( b'COM2' , None ) , queues , serial_in_size ) , # parallel devices - LPT1: must always be available b'LPT1:' : parports . LPTDevice ( device_params . get ( b'LPT1' , None ) , devicebase . nullstream ( ) , codepage ) , b'LPT2:' : parports . LPTDevice ( device_params . get ( b'LPT2' , None ) , None , codepage ) , b'LPT3:' : parports . LPTDevice ( device_params . get ( b'LPT3' , None ) , None , codepage ) , } # device files self . scrn_file = self . _devices [ b'SCRN:' ] . device_file self . kybd_file = self . _devices [ b'KYBD:' ] . device_file self . lpt1_file = self . _devices [ b'LPT1:' ] . device_file # disks self . _init_disk_devices ( device_params , current_device , codepage , text_mode , soft_linefeed )