hololink::emulation::AddressMemory
hololink::emulation::AddressMemory
Representation of the internal memory space of the HSBEmulator and its registers.
This currently implemented as a simple map, but the underlying implementation should be expected to change, though the public methods should remain available.
Constructors
Destructor
~AddressMemory
Methods
write
Write a value to a register.
Returns: 0 on success, 1 on failure
Parameters
Pair of address and value to write
read
Read a value from a register.
Returns: 0 on success, 1 on failure
Parameters
Pair of address and value to read
write_many
Convenience function to write multiple values to registers under a single lock.
Returns: 0 on success, 1 on failure
Parameters
Pointer to array of pairs of register addresses and values to write
Number of address-value pairs
read_many
Convenience function to read multiple values from registers under a single lock.
Returns: 0 on success, 1 on failure
Parameters
Pointer to array of pairs of register addresses and values to read (caller must allocate at least num_addresses elements)
Number of addresses to read
write_range
Write a range of values to registers.
Allow optimizations if it is known that the addresses are contiguous.
Returns: 0 on success, 1 on failure
Parameters
The number of addresses to write
read_range
Read a range of values from registers.
Allow optimizations if it is known that the addresses are contiguous.
Returns: 0 on success, 1 on failure
Parameters
The number of addresses to read