1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-01-11 08:30:55 +00:00

A CRT is still absent but this moves the ball back into the C++ side's court.

This commit is contained in:
Thomas Harte 2016-06-04 22:00:50 -04:00
parent 06e1db8c85
commit b10a06e700
4 changed files with 31 additions and 5 deletions

View File

@ -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;
}

View File

@ -15,6 +15,17 @@
namespace Vic20 {
class Machine: public CPU6502::Processor<Machine>, 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<Machine>::run_for_cycles(number_of_cycles); }
};
}

View File

@ -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 = "<group>"; };
4B886FF11D03B517004291C3 /* Vic20.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Vic20.hpp; path = "Vic-20/Vic20.hpp"; sourceTree = "<group>"; };
4B886FF31D03B61E004291C3 /* CSVic20.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSVic20.h; sourceTree = "<group>"; };
4B886FF41D03B61E004291C3 /* CSVic20.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSVic20.m; sourceTree = "<group>"; };
4B886FF41D03B61E004291C3 /* CSVic20.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CSVic20.mm; sourceTree = "<group>"; };
4B92EAC91B7C112B00246143 /* TimingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimingTests.swift; sourceTree = "<group>"; };
4BAE587D1C447B7A005B9AF0 /* KeyCodes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KeyCodes.h; sourceTree = "<group>"; };
4BB297DF1B587D8200A49093 /* Clock SignalTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Clock SignalTests-Bridging-Header.h"; sourceTree = "<group>"; };
@ -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 */,

View File

@ -8,6 +8,14 @@
#import "CSVic20.h"
@implementation CSVic20
#import "Vic20.hpp"
@implementation CSVic20 {
Vic20::Machine _vic20;
}
- (CRTMachine::Machine * const)machine {
return &_vic20;
}
@end