From 54246c8f1aa8763e5b143de05bf6b6ce5719b855 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 25 Nov 2016 21:24:59 +0800 Subject: [PATCH] Interrupt enabling works the other way around I think, and both registers with only one bit defined should probably return '1' in all other places? --- Machines/Oric/Microdisc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Machines/Oric/Microdisc.cpp b/Machines/Oric/Microdisc.cpp index 743ef21a2..a4f784837 100644 --- a/Machines/Oric/Microdisc.cpp +++ b/Machines/Oric/Microdisc.cpp @@ -44,7 +44,7 @@ void Microdisc::set_control_register(uint8_t control) set_is_double_density(!(control & 0x08)); // b0: IRQ enable - irq_enable_ = !(control & 0x01); + irq_enable_ = !!(control & 0x01); // b7: EPROM select (0 = select) // b1: ROM disable (0 = disable) @@ -63,10 +63,10 @@ bool Microdisc::get_interrupt_request_line() uint8_t Microdisc::get_interrupt_request_register() { - return get_interrupt_request_line() ? 0x00 : 0x80; + return 0x7f | (get_interrupt_request_line() ? 0x00 : 0x80); } uint8_t Microdisc::get_data_request_register() { - return get_data_request_line() ? 0x00 : 0x80; + return 0x7f | (get_data_request_line() ? 0x00 : 0x80); }