mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Put word-sizing responsibility on the caller.
This commit is contained in:
parent
e2a8b26b57
commit
94231ca3e3
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user