diff --git a/Machines/Vic-20/Vic20.cpp b/Machines/Vic-20/Vic20.cpp index 58e027eaf..e3e3b5e2b 100644 --- a/Machines/Vic-20/Vic20.cpp +++ b/Machines/Vic-20/Vic20.cpp @@ -7,3 +7,10 @@ // #include "Vic20.hpp" + +using namespace Vic20; + +unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uint16_t address, uint8_t *value) +{ + return 1; +} diff --git a/Machines/Vic-20/Vic20.hpp b/Machines/Vic-20/Vic20.hpp index 59f16351a..03d79654b 100644 --- a/Machines/Vic-20/Vic20.hpp +++ b/Machines/Vic-20/Vic20.hpp @@ -15,6 +15,17 @@ namespace Vic20 { class Machine: public CPU6502::Processor, public CRTMachine::Machine { + public: + // to satisfy CPU6502::Processor + unsigned int perform_bus_operation(CPU6502::BusOperation operation, uint16_t address, uint8_t *value); + void synchronise() {} + + // to satisfy CRTMachine::Machine + virtual void setup_output(float aspect_ratio) {} + virtual void close_output() {} + virtual Outputs::CRT::CRT *get_crt() { return nullptr; } // TODO + virtual Outputs::Speaker *get_speaker() { return nullptr; } // TODO + virtual void run_for_cycles(int number_of_cycles) { CPU6502::Processor::run_for_cycles(number_of_cycles); } }; } diff --git a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj index 375490caa..39ae448ce 100644 --- a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj +++ b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj @@ -31,7 +31,7 @@ 4B73C71A1D036BD90074D992 /* Vic20Document.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B73C7191D036BD90074D992 /* Vic20Document.swift */; }; 4B73C71D1D036C030074D992 /* Vic20Document.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B73C71B1D036C030074D992 /* Vic20Document.xib */; }; 4B886FF21D03B517004291C3 /* Vic20.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B886FF01D03B517004291C3 /* Vic20.cpp */; }; - 4B886FF51D03B61E004291C3 /* CSVic20.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B886FF41D03B61E004291C3 /* CSVic20.m */; }; + 4B886FF51D03B61E004291C3 /* CSVic20.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B886FF41D03B61E004291C3 /* CSVic20.mm */; }; 4B92EACA1B7C112B00246143 /* TimingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B92EAC91B7C112B00246143 /* TimingTests.swift */; }; 4BB298EE1B587D8400A49093 /* 6502_functional_test.bin in Resources */ = {isa = PBXBuildFile; fileRef = 4BB297E01B587D8300A49093 /* 6502_functional_test.bin */; }; 4BB298EF1B587D8400A49093 /* AllSuiteA.bin in Resources */ = {isa = PBXBuildFile; fileRef = 4BB297E11B587D8300A49093 /* AllSuiteA.bin */; }; @@ -382,7 +382,7 @@ 4B886FF01D03B517004291C3 /* Vic20.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Vic20.cpp; path = "Vic-20/Vic20.cpp"; sourceTree = ""; }; 4B886FF11D03B517004291C3 /* Vic20.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Vic20.hpp; path = "Vic-20/Vic20.hpp"; sourceTree = ""; }; 4B886FF31D03B61E004291C3 /* CSVic20.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSVic20.h; sourceTree = ""; }; - 4B886FF41D03B61E004291C3 /* CSVic20.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSVic20.m; sourceTree = ""; }; + 4B886FF41D03B61E004291C3 /* CSVic20.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CSVic20.mm; sourceTree = ""; }; 4B92EAC91B7C112B00246143 /* TimingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimingTests.swift; sourceTree = ""; }; 4BAE587D1C447B7A005B9AF0 /* KeyCodes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KeyCodes.h; sourceTree = ""; }; 4BB297DF1B587D8200A49093 /* Clock SignalTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Clock SignalTests-Bridging-Header.h"; sourceTree = ""; }; @@ -804,7 +804,7 @@ 4B55CE4D1C3B3BDA0093A61B /* CSMachine.mm */, 4B55CE4F1C3B78A80093A61B /* CSMachine+Subclassing.h */, 4B886FF31D03B61E004291C3 /* CSVic20.h */, - 4B886FF41D03B61E004291C3 /* CSVic20.m */, + 4B886FF41D03B61E004291C3 /* CSVic20.mm */, 4BAE587D1C447B7A005B9AF0 /* KeyCodes.h */, ); path = Wrappers; @@ -1698,7 +1698,7 @@ 4B55CE581C3B7D360093A61B /* Atari2600Document.swift in Sources */, 4B0EBFB81C487F2F00A11F35 /* AudioQueue.m in Sources */, 4BBB14311CD2CECE00BDB55C /* IntermediateShader.cpp in Sources */, - 4B886FF51D03B61E004291C3 /* CSVic20.m in Sources */, + 4B886FF51D03B61E004291C3 /* CSVic20.mm in Sources */, 4B73C71A1D036BD90074D992 /* Vic20Document.swift in Sources */, 4BBF99181C8FBA6F0075DAFB /* TextureTarget.cpp in Sources */, 4BC76E691C98E31700E6EF73 /* FIRFilter.cpp in Sources */, diff --git a/OSBindings/Mac/Clock Signal/Wrappers/CSVic20.m b/OSBindings/Mac/Clock Signal/Wrappers/CSVic20.mm similarity index 55% rename from OSBindings/Mac/Clock Signal/Wrappers/CSVic20.m rename to OSBindings/Mac/Clock Signal/Wrappers/CSVic20.mm index 64d7cdb49..6447e5d49 100644 --- a/OSBindings/Mac/Clock Signal/Wrappers/CSVic20.m +++ b/OSBindings/Mac/Clock Signal/Wrappers/CSVic20.mm @@ -8,6 +8,14 @@ #import "CSVic20.h" -@implementation CSVic20 +#import "Vic20.hpp" + +@implementation CSVic20 { + Vic20::Machine _vic20; +} + +- (CRTMachine::Machine * const)machine { + return &_vic20; +} @end