diff --git a/Machines/PCCompatible/PCCompatible.cpp b/Machines/PCCompatible/PCCompatible.cpp index 46dd450b1..421a64fa9 100644 --- a/Machines/PCCompatible/PCCompatible.cpp +++ b/Machines/PCCompatible/PCCompatible.cpp @@ -41,11 +41,15 @@ #include "../ScanProducer.hpp" #include "../TimedMachine.hpp" +#include "../../Analyser/Static/PCCompatible/Target.hpp" + #include #include namespace PCCompatible { +using VideoAdaptor = Analyser::Static::PCCompatible::Target::VideoAdaptor; + //bool log = false; //std::string previous; @@ -786,6 +790,7 @@ class i8255PortHandler : public Intel::i8255::PortHandler { }; using PPI = Intel::i8255::i8255; +template class IO { public: IO(PIT &pit, DMA &dma, PPI &ppi, PIC &pic, MDA &mda, FloppyController &fdc) : @@ -972,7 +977,7 @@ class IO { // Ignore serial port accesses. break; } - return IntT(~0); + return 0; } private: @@ -1033,6 +1038,7 @@ class FlowController { bool halted_ = false; }; +template class ConcreteMachine: public Machine, public MachineTypes::TimedMachine, @@ -1123,7 +1129,7 @@ class ConcreteMachine: keyboard_.run_for(Cycles(1)); // Query for interrupts and apply if pending. - if(pic_.pending() && context.flags.flag()) { + if(pic_.pending() && context.flags.template flag()) { // Regress the IP if a REP is in-progress so as to resume it later. if(context.flow_controller.should_repeat()) { context.registers.ip() = decoded_ip_; @@ -1271,7 +1277,7 @@ class ConcreteMachine: Segments segments; Memory memory; FlowController flow_controller; - IO io; + IO