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 4e4ebf153..30b7c1c39 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_; + if(flags&Microdisc::PagingFlags::MicrodiscDisable) { + ram_top_ = basic_invisible_ram_top_; } else { ram_top_ = 0xdfff; paged_rom_ = microdisc_rom_.data();