1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-10-01 13:58:20 +00:00

Add floating bus.

This commit is contained in:
Thomas Harte 2021-03-23 17:09:42 -04:00
parent 3d0503a35e
commit 0ac11fc39e
2 changed files with 8 additions and 2 deletions

View File

@ -323,11 +323,11 @@ template <VideoTiming timing> class Video {
if(line >= 192) return 0xff;
const int time_into_line = time_into_frame_ % timings.cycles_per_line;
if(time_into_line >= 256 || (time_into_line&4)) {
if(time_into_line >= 256 || (time_into_line&8)) {
return 0xff;
}
return last_fetches_[time_into_line & 3];
return last_fetches_[(time_into_line >> 1) & 3];
}
/*!

View File

@ -329,6 +329,12 @@ template<Model model> class ConcreteMachine:
*cycle.value &= GI::AY38910::Utility::read_data(ay_);
}
// Check for a floating bus read; these are particularly arcane
// on the +2a/+3. See footnote to https://spectrumforeveryone.com/technical/memory-contention-floating-bus/
if((address & 0xf003) == 0x0001) {
*cycle.value &= video_->get_current_fetch();
}
if constexpr (model == Model::Plus3) {
switch(address) {
default: break;