mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-29 12:50:28 +00:00
Merge branch 'master' into WOZWriting
This commit is contained in:
commit
4036c60b45
@ -72,7 +72,7 @@ void Microdisc::set_control_register(uint8_t control, uint8_t changes) {
|
|||||||
// b7: EPROM select (0 = select)
|
// b7: EPROM select (0 = select)
|
||||||
// b1: ROM disable (0 = disable)
|
// b1: ROM disable (0 = disable)
|
||||||
if(changes & 0x82) {
|
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);
|
if(delegate_) delegate_->microdisc_did_change_paging_flags(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,14 @@ class Microdisc: public WD::WD1770 {
|
|||||||
using WD::WD1770::run_for;
|
using WD::WD1770::run_for;
|
||||||
|
|
||||||
enum PagingFlags {
|
enum PagingFlags {
|
||||||
BASICDisable = (1 << 0),
|
/// Indicates that the BASIC ROM should be disabled; if this is set then either
|
||||||
MicrodscDisable = (1 << 1)
|
/// 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 {
|
class Delegate: public WD1770::Delegate {
|
||||||
|
@ -504,11 +504,11 @@ template <Analyser::Static::Oric::Target::DiskInterface disk_interface> class Co
|
|||||||
void microdisc_did_change_paging_flags(class Microdisc *microdisc) override final {
|
void microdisc_did_change_paging_flags(class Microdisc *microdisc) override final {
|
||||||
int flags = microdisc->get_paging_flags();
|
int flags = microdisc->get_paging_flags();
|
||||||
if(!(flags&Microdisc::PagingFlags::BASICDisable)) {
|
if(!(flags&Microdisc::PagingFlags::BASICDisable)) {
|
||||||
ram_top_ = basic_invisible_ram_top_;
|
ram_top_ = basic_visible_ram_top_;
|
||||||
paged_rom_ = rom_.data();
|
paged_rom_ = rom_.data();
|
||||||
} else {
|
} else {
|
||||||
if(flags&Microdisc::PagingFlags::MicrodscDisable) {
|
if(flags&Microdisc::PagingFlags::MicrodiscDisable) {
|
||||||
ram_top_ = basic_visible_ram_top_;
|
ram_top_ = basic_invisible_ram_top_;
|
||||||
} else {
|
} else {
|
||||||
ram_top_ = 0xdfff;
|
ram_top_ = 0xdfff;
|
||||||
paged_rom_ = microdisc_rom_.data();
|
paged_rom_ = microdisc_rom_.data();
|
||||||
|
Loading…
Reference in New Issue
Block a user