From 54352cb1cb572826c9b28503f5b215d2f99af1a4 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 9 Nov 2020 21:54:25 -0500 Subject: [PATCH] Stubs in a couple more registers. PC now hits $0000. Likely a bug. --- Machines/Apple/AppleIIgs/ADB.cpp | 2 +- Machines/Apple/AppleIIgs/AppleIIgs.cpp | 21 +++++++++++++++++++++ Machines/Apple/AppleIIgs/Video.cpp | 7 +++++++ Machines/Apple/AppleIIgs/Video.hpp | 3 +++ 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/Machines/Apple/AppleIIgs/ADB.cpp b/Machines/Apple/AppleIIgs/ADB.cpp index 204201a42..86af5d525 100644 --- a/Machines/Apple/AppleIIgs/ADB.cpp +++ b/Machines/Apple/AppleIIgs/ADB.cpp @@ -87,7 +87,7 @@ uint8_t GLU::get_status() { // b0: 1 = command register is full (set when command is written); 0 = empty (cleared when data is read). const uint8_t status = (pending_response_.empty() ? 0 : 0x20); // Data is valid if a response is pending. - printf("ADB get status : %02x\n", status); +// printf("ADB get status : %02x\n", status); return status; } diff --git a/Machines/Apple/AppleIIgs/AppleIIgs.cpp b/Machines/Apple/AppleIIgs/AppleIIgs.cpp index 56451dde8..380e569ff 100644 --- a/Machines/Apple/AppleIIgs/AppleIIgs.cpp +++ b/Machines/Apple/AppleIIgs/AppleIIgs.cpp @@ -391,6 +391,26 @@ class ConcreteMachine: // TODO: begin analogue channel charge. break; + // Monochome/colour register. + case 0xc021: + // "Uses bit 7 to determine whether composite output is colour 9) or gray scale (1)." + if(is_read) { + *value = video_->get_composite_is_colour() ? 0x00 : 0x80; + } else { + video_->set_composite_is_colour(!(*value & 0x80)); + } + break; + + // Language select. (?) + case 0xc02b: + if(is_read) { + *value = language_; + } else { + language_ = *value; + } + break; + + // Slot select. case 0xc02d: // b7: 0 = internal ROM code for slot 7; // b6: 0 = internal ROM code for slot 6; @@ -580,6 +600,7 @@ class ConcreteMachine: uint8_t card_mask_ = 0x00; bool test_mode_ = false; + uint8_t language_ = 0; }; } diff --git a/Machines/Apple/AppleIIgs/Video.cpp b/Machines/Apple/AppleIIgs/Video.cpp index f228076ec..c269d69d3 100644 --- a/Machines/Apple/AppleIIgs/Video.cpp +++ b/Machines/Apple/AppleIIgs/Video.cpp @@ -281,3 +281,10 @@ void VideoBase::set_text_colour(uint8_t colour) { text_colour_ = appleii_palette[colour >> 4]; background_colour_ = appleii_palette[colour & 0xf]; } + +void VideoBase::set_composite_is_colour(bool) { +} + +bool VideoBase::get_composite_is_colour() { + return true; +} diff --git a/Machines/Apple/AppleIIgs/Video.hpp b/Machines/Apple/AppleIIgs/Video.hpp index 52cda9611..ff16d8511 100644 --- a/Machines/Apple/AppleIIgs/Video.hpp +++ b/Machines/Apple/AppleIIgs/Video.hpp @@ -41,6 +41,9 @@ class VideoBase: public Apple::II::VideoSwitches { void set_border_colour(uint8_t); void set_text_colour(uint8_t); + void set_composite_is_colour(bool); + bool get_composite_is_colour(); + /// Sets the scan target. void set_scan_target(Outputs::Display::ScanTarget *scan_target);