1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-09-27 02:55:07 +00:00

Put word-sizing responsibility on the caller.

This commit is contained in:
Thomas Harte 2022-08-10 16:41:45 -04:00
parent e2a8b26b57
commit 94231ca3e3
3 changed files with 6 additions and 3 deletions

View File

@ -86,7 +86,10 @@ class ConcreteMachine:
}
Memory::Fuzz(ram_);
video_->set_ram(reinterpret_cast<uint16_t *>(ram_.data()), ram_.size());
video_->set_ram(
reinterpret_cast<uint16_t *>(ram_.data()),
ram_.size() >> 1
);
constexpr ROM::Name rom_name = ROM::Name::AtariSTTOS100;
ROM::Request request(rom_name);

View File

@ -132,7 +132,7 @@ Video::Video() :
void Video::set_ram(uint16_t *ram, size_t size) {
ram_ = ram;
ram_mask_ = int((size >> 1) - 1);
ram_mask_ = int(size - 1);
}
void Video::set_scan_target(Outputs::Display::ScanTarget *scan_target) {

View File

@ -37,7 +37,7 @@ class Video {
Video();
/*!
Sets the memory pool that provides video, and its size.
Sets the memory pool that provides video, and its size in words.
*/
void set_ram(uint16_t *, size_t size);