1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-22 12:33:29 +00:00

Provides a base pointer for video output.

This commit is contained in:
Thomas Harte 2021-03-18 22:04:41 -04:00
parent f2620e6afb
commit 87fc7c02e8
2 changed files with 8 additions and 0 deletions

View File

@ -95,6 +95,10 @@ template <VideoTiming timing> class Video {
}
void set_video_source(const uint8_t *source) {
memory_ = source;
}
HalfCycles get_next_sequence_point() {
if(time_since_interrupt_ < interrupt_duration) {
return HalfCycles(interrupt_duration - time_since_interrupt_);
@ -135,6 +139,7 @@ template <VideoTiming timing> class Video {
private:
int time_since_interrupt_ = 0;
Outputs::CRT::CRT crt_;
const uint8_t *memory_ = nullptr;
};
}

View File

@ -224,6 +224,9 @@ template<Model model> class ConcreteMachine:
return;
}
// Set the proper video base pointer.
video_->set_video_source(&ram_[((port7ffd_ & 0x08) ? 7 : 5) * 16384]);
if(port1ffd_ & 1) {
// "Special paging mode", i.e. one of four fixed
// RAM configurations, port 7ffd doesn't matter.