1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-22 08:16:42 +00:00

Doubles down on <cX> over <X.h> for C includes, and usage of the namespace for those types and functions.

This commit is contained in:
Thomas Harte
2017-11-11 15:28:40 -05:00
parent 6a176082a0
commit 2e15fab651
99 changed files with 359 additions and 355 deletions
+7 -7
View File
@@ -10,19 +10,19 @@
using namespace CPU;
AllRAMProcessor::AllRAMProcessor(size_t memory_size) :
AllRAMProcessor::AllRAMProcessor(std::size_t memory_size) :
memory_(memory_size),
traps_(memory_size, false),
timestamp_(0) {}
void AllRAMProcessor::set_data_at_address(uint16_t startAddress, size_t length, const uint8_t *data) {
size_t endAddress = std::min(startAddress + length, static_cast<size_t>(65536));
memcpy(&memory_[startAddress], data, endAddress - startAddress);
void AllRAMProcessor::set_data_at_address(uint16_t startAddress, std::size_t length, const uint8_t *data) {
std::size_t endAddress = std::min(startAddress + length, static_cast<std::size_t>(65536));
std::memcpy(&memory_[startAddress], data, endAddress - startAddress);
}
void AllRAMProcessor::get_data_at_address(uint16_t startAddress, size_t length, uint8_t *data) {
size_t endAddress = std::min(startAddress + length, static_cast<size_t>(65536));
memcpy(data, &memory_[startAddress], endAddress - startAddress);
void AllRAMProcessor::get_data_at_address(uint16_t startAddress, std::size_t length, uint8_t *data) {
std::size_t endAddress = std::min(startAddress + length, static_cast<std::size_t>(65536));
std::memcpy(data, &memory_[startAddress], endAddress - startAddress);
}
HalfCycles AllRAMProcessor::get_timestamp() {