mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 23:52:26 +00:00
Does a better job of having just 512kb.
This commit is contained in:
parent
e30ba58e0d
commit
092a61f93e
@ -242,11 +242,12 @@ class ConcreteMachine:
|
||||
|
||||
// Set up basic memory map.
|
||||
memory_map_[0] = BusDevice::MostlyRAM;
|
||||
for(int c = 1; c < 0xf0; ++c) memory_map_[c] = BusDevice::RAM;
|
||||
int c = 1;
|
||||
for(; c < 0x08; ++c) memory_map_[c] = BusDevice::RAM;
|
||||
|
||||
// This is appropriate for: TOS 1.x, no cartridge.
|
||||
for(int c = 0xf0; c < 0xfc; ++c) memory_map_[c] = BusDevice::Unassigned;
|
||||
for(int c = 0xfc; c < 0xff; ++c) memory_map_[c] = BusDevice::ROM;
|
||||
for(; c < 0xfc; ++c) memory_map_[c] = BusDevice::Unassigned;
|
||||
for(; c < 0xff; ++c) memory_map_[c] = BusDevice::ROM;
|
||||
memory_map_[0xfa] = memory_map_[0xfb] = BusDevice::Cartridge;
|
||||
|
||||
memory_map_[0xff] = BusDevice::IO;
|
||||
|
@ -95,11 +95,12 @@ void Video::run_for(HalfCycles duration) {
|
||||
const auto target = std::min(mode_params.end_of_output, final_x);
|
||||
while(x < target) {
|
||||
if(!(x&31) && pixel_pointer_) {
|
||||
// TODO: RAM sizes other than 512kb.
|
||||
uint16_t source[4] = {
|
||||
ram_[current_address_ + 0],
|
||||
ram_[current_address_ + 1],
|
||||
ram_[current_address_ + 2],
|
||||
ram_[current_address_ + 3],
|
||||
ram_[(current_address_ + 0) & 262143],
|
||||
ram_[(current_address_ + 1) & 262143],
|
||||
ram_[(current_address_ + 2) & 262143],
|
||||
ram_[(current_address_ + 3) & 262143],
|
||||
};
|
||||
current_address_ += 4;
|
||||
|
||||
@ -148,7 +149,8 @@ void Video::run_for(HalfCycles duration) {
|
||||
if(x == mode_params.line_length) {
|
||||
x = 0;
|
||||
y = (y + 1) % mode_params.lines_per_frame;
|
||||
if(!y) current_address_ = base_address_;
|
||||
if(!y)
|
||||
current_address_ = base_address_;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user