From 1b43381be0223ad97962ec98bc44da06f97286c4 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 24 May 2018 18:53:02 -0400 Subject: [PATCH 1/2] Corrects meaning of the Microdisc's paging control. --- Machines/Oric/Oric.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Machines/Oric/Oric.cpp b/Machines/Oric/Oric.cpp index 4e4ebf153..cbdc3a9cc 100644 --- a/Machines/Oric/Oric.cpp +++ b/Machines/Oric/Oric.cpp @@ -504,11 +504,11 @@ template class Co void microdisc_did_change_paging_flags(class Microdisc *microdisc) override final { int flags = microdisc->get_paging_flags(); if(!(flags&Microdisc::PagingFlags::BASICDisable)) { - ram_top_ = basic_invisible_ram_top_; + ram_top_ = basic_visible_ram_top_; paged_rom_ = rom_.data(); } else { if(flags&Microdisc::PagingFlags::MicrodscDisable) { - ram_top_ = basic_visible_ram_top_; + ram_top_ = basic_invisible_ram_top_; } else { ram_top_ = 0xdfff; paged_rom_ = microdisc_rom_.data(); From 7c3dd55e5ccce4b75122926aba449740a2181ccc Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 24 May 2018 18:57:35 -0400 Subject: [PATCH 2/2] Corrects typo and improves exposition. --- Machines/Oric/Microdisc.cpp | 2 +- Machines/Oric/Microdisc.hpp | 10 ++++++++-- Machines/Oric/Oric.cpp | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Machines/Oric/Microdisc.cpp b/Machines/Oric/Microdisc.cpp index 6f5a200d3..d31114b2d 100644 --- a/Machines/Oric/Microdisc.cpp +++ b/Machines/Oric/Microdisc.cpp @@ -72,7 +72,7 @@ void Microdisc::set_control_register(uint8_t control, uint8_t changes) { // b7: EPROM select (0 = select) // b1: ROM disable (0 = disable) if(changes & 0x82) { - paging_flags_ = ((control & 0x02) ? 0 : BASICDisable) | ((control & 0x80) ? MicrodscDisable : 0); + paging_flags_ = ((control & 0x02) ? 0 : BASICDisable) | ((control & 0x80) ? MicrodiscDisable : 0); if(delegate_) delegate_->microdisc_did_change_paging_flags(this); } } diff --git a/Machines/Oric/Microdisc.hpp b/Machines/Oric/Microdisc.hpp index a935b222e..3aef6aefe 100644 --- a/Machines/Oric/Microdisc.hpp +++ b/Machines/Oric/Microdisc.hpp @@ -31,8 +31,14 @@ class Microdisc: public WD::WD1770 { using WD::WD1770::run_for; enum PagingFlags { - BASICDisable = (1 << 0), - MicrodscDisable = (1 << 1) + /// Indicates that the BASIC ROM should be disabled; if this is set then either + /// the Microdisc ROM or overlay RAM will be visible. If it is not set, BASIC + /// should be visible. + BASICDisable = (1 << 0), + + /// Indicates that the Microdisc ROM is disabled. If BASIC is disabled and the Microdisc + /// is also disabled, overlay RAM should be visible. + MicrodiscDisable = (1 << 1) }; class Delegate: public WD1770::Delegate { diff --git a/Machines/Oric/Oric.cpp b/Machines/Oric/Oric.cpp index cbdc3a9cc..30b7c1c39 100644 --- a/Machines/Oric/Oric.cpp +++ b/Machines/Oric/Oric.cpp @@ -507,7 +507,7 @@ template class Co ram_top_ = basic_visible_ram_top_; paged_rom_ = rom_.data(); } else { - if(flags&Microdisc::PagingFlags::MicrodscDisable) { + if(flags&Microdisc::PagingFlags::MicrodiscDisable) { ram_top_ = basic_invisible_ram_top_; } else { ram_top_ = 0xdfff;