DASM
|
DCPU-16 execution environment - hardware profile initialisation. More...
Go to the source code of this file.
Classes | |
class | DASMIO::Hardware |
DCPU-16 execution environment - hardware profile initialisation. More... |
DCPU-16 execution environment - hardware profile initialisation.
This module provides the initialisation of the hardware mapped devices in the core of the DCPU-16 emulation. The mappings are defined in a hardware profile which describes the base address of the devices.
Each device is implemented by a device module in the directory DExecHW. An instance of the devices is created and attached to the addresses through a DExecHWAdapter. The adapter supplies the offset parameter to the device object, allowing multiple registers to be easily implemented in the device, despite not being known to the execution environment.
The hardware profiles take the form of lines in a file of the form:
<address> <device> [ '(' <arguments> ')' ]
<address> : a 4 character hexadecimal address that the hardware is mapped to
<device> : device, as a module in the DExecHW directory.
<arguments> : comma separated arguments to pass to the deviceComments are prefixed by a '#' character.
Devices may be registered in multiple locations with different arguments.
Each device has a window size, which it defines. This is the number of registers it provides and which will be allocated in the core.
Definition in file Hardware.pm.