mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +00:00
Started sketching out infrastructure for Vic-20 support.
This commit is contained in:
parent
d6e8cd676a
commit
404873fe58
9
Machines/Vic-20/Vic20.cpp
Normal file
9
Machines/Vic-20/Vic20.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
//
|
||||
// Vic20.cpp
|
||||
// Clock Signal
|
||||
//
|
||||
// Created by Thomas Harte on 04/06/2016.
|
||||
// Copyright © 2016 Thomas Harte. All rights reserved.
|
||||
//
|
||||
|
||||
#include "Vic20.hpp"
|
22
Machines/Vic-20/Vic20.hpp
Normal file
22
Machines/Vic-20/Vic20.hpp
Normal file
@ -0,0 +1,22 @@
|
||||
//
|
||||
// Vic20.hpp
|
||||
// Clock Signal
|
||||
//
|
||||
// Created by Thomas Harte on 04/06/2016.
|
||||
// Copyright © 2016 Thomas Harte. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef Vic20_hpp
|
||||
#define Vic20_hpp
|
||||
|
||||
#include "../../Processors/6502/CPU6502.hpp"
|
||||
#include "../CRTMachine.hpp"
|
||||
|
||||
namespace Vic20 {
|
||||
|
||||
class Machine: public CPU6502::Processor<Machine>, public CRTMachine::Machine {
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* Vic20_hpp */
|
@ -28,6 +28,10 @@
|
||||
4B69FB3D1C4D908A00B5F0AA /* Tape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B69FB3B1C4D908A00B5F0AA /* Tape.cpp */; };
|
||||
4B69FB441C4D941400B5F0AA /* TapeUEF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B69FB421C4D941400B5F0AA /* TapeUEF.cpp */; };
|
||||
4B69FB461C4D950F00B5F0AA /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B69FB451C4D950F00B5F0AA /* libz.tbd */; };
|
||||
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 */; };
|
||||
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 */; };
|
||||
@ -373,6 +377,12 @@
|
||||
4B69FB421C4D941400B5F0AA /* TapeUEF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TapeUEF.cpp; sourceTree = "<group>"; };
|
||||
4B69FB431C4D941400B5F0AA /* TapeUEF.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = TapeUEF.hpp; sourceTree = "<group>"; };
|
||||
4B69FB451C4D950F00B5F0AA /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
|
||||
4B73C7191D036BD90074D992 /* Vic20Document.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Vic20Document.swift; sourceTree = "<group>"; };
|
||||
4B73C71C1D036C030074D992 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = "Clock Signal/Base.lproj/Vic20Document.xib"; sourceTree = SOURCE_ROOT; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
@ -793,6 +803,8 @@
|
||||
4B55CE4C1C3B3BDA0093A61B /* CSMachine.h */,
|
||||
4B55CE4D1C3B3BDA0093A61B /* CSMachine.mm */,
|
||||
4B55CE4F1C3B78A80093A61B /* CSMachine+Subclassing.h */,
|
||||
4B886FF31D03B61E004291C3 /* CSVic20.h */,
|
||||
4B886FF41D03B61E004291C3 /* CSVic20.m */,
|
||||
4BAE587D1C447B7A005B9AF0 /* KeyCodes.h */,
|
||||
);
|
||||
path = Wrappers;
|
||||
@ -806,6 +818,8 @@
|
||||
4B55CE571C3B7D360093A61B /* ElectronDocument.swift */,
|
||||
4B2E2D931C399D1200138695 /* ElectronDocument.xib */,
|
||||
4B55CE5E1C3B7D960093A61B /* MachineDocument.swift */,
|
||||
4B73C7191D036BD90074D992 /* Vic20Document.swift */,
|
||||
4B73C71B1D036C030074D992 /* Vic20Document.xib */,
|
||||
);
|
||||
path = Documents;
|
||||
sourceTree = "<group>";
|
||||
@ -848,6 +862,15 @@
|
||||
path = Formats;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4B886FF61D03B632004291C3 /* Vic-20 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4B886FF01D03B517004291C3 /* Vic20.cpp */,
|
||||
4B886FF11D03B517004291C3 /* Vic20.hpp */,
|
||||
);
|
||||
name = "Vic-20";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4BB297E41B587D8300A49093 /* Wolfgang Lorenz 6502 test suite */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -1191,9 +1214,10 @@
|
||||
4BB73EDC1B587CA500552FC2 /* Machines */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4B046DC31CFE651500E9E45E /* CRTMachine.hpp */,
|
||||
4B2E2D961C3A06EC00138695 /* Atari2600 */,
|
||||
4B2E2D9E1C3A070900138695 /* Electron */,
|
||||
4B046DC31CFE651500E9E45E /* CRTMachine.hpp */,
|
||||
4B886FF61D03B632004291C3 /* Vic-20 */,
|
||||
);
|
||||
name = Machines;
|
||||
path = ../../Machines;
|
||||
@ -1370,6 +1394,7 @@
|
||||
4BE5F85F1C3E1C2500C43F01 /* os.rom in Resources */,
|
||||
4BCB70B41C947DDC005B1712 /* plus1.rom in Resources */,
|
||||
4BB73EA71B587A5100552FC2 /* Atari2600Document.xib in Resources */,
|
||||
4B73C71D1D036C030074D992 /* Vic20Document.xib in Resources */,
|
||||
4BB73EAC1B587A5100552FC2 /* MainMenu.xib in Resources */,
|
||||
4BE5F85E1C3E1C2500C43F01 /* basic.rom in Resources */,
|
||||
);
|
||||
@ -1667,11 +1692,14 @@
|
||||
4B55CE541C3B7ABF0093A61B /* CSElectron.mm in Sources */,
|
||||
4B0CCC451C62D0B3001CAC5F /* CRT.cpp in Sources */,
|
||||
4B55CE591C3B7D360093A61B /* ElectronDocument.swift in Sources */,
|
||||
4B886FF21D03B517004291C3 /* Vic20.cpp in Sources */,
|
||||
4BC3B74F1CD194CC00F86E85 /* Shader.cpp in Sources */,
|
||||
4B55CE4B1C3B3B0C0093A61B /* CSAtari2600.mm in Sources */,
|
||||
4B55CE581C3B7D360093A61B /* Atari2600Document.swift in Sources */,
|
||||
4B0EBFB81C487F2F00A11F35 /* AudioQueue.m in Sources */,
|
||||
4BBB14311CD2CECE00BDB55C /* IntermediateShader.cpp in Sources */,
|
||||
4B886FF51D03B61E004291C3 /* CSVic20.m in Sources */,
|
||||
4B73C71A1D036BD90074D992 /* Vic20Document.swift in Sources */,
|
||||
4BBF99181C8FBA6F0075DAFB /* TextureTarget.cpp in Sources */,
|
||||
4BC76E691C98E31700E6EF73 /* FIRFilter.cpp in Sources */,
|
||||
4B55CE5F1C3B7D960093A61B /* MachineDocument.swift in Sources */,
|
||||
@ -1736,6 +1764,14 @@
|
||||
path = ..;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4B73C71B1D036C030074D992 /* Vic20Document.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
4B73C71C1D036C030074D992 /* Base */,
|
||||
);
|
||||
name = Vic20Document.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4BB73EA51B587A5100552FC2 /* Atari2600Document.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9532" systemVersion="15E65" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9532" systemVersion="15F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9532"/>
|
||||
</dependencies>
|
||||
|
@ -3,8 +3,10 @@
|
||||
//
|
||||
|
||||
#import "CSMachine.h"
|
||||
|
||||
#import "CSAtari2600.h"
|
||||
#import "CSElectron.h"
|
||||
#import "CSVic20.h"
|
||||
|
||||
#import "CSOpenGLView.h"
|
||||
#import "AudioQueue.h"
|
||||
|
@ -26,17 +26,9 @@ class Atari2600Document: MachineDocument {
|
||||
}
|
||||
|
||||
override var windowNibName: String? {
|
||||
// Returns the nib file name of the document
|
||||
// If you need to use a subclass of NSWindowController or if your document supports multiple NSWindowControllers, you should remove this property and override -makeWindowControllers instead.
|
||||
return "Atari2600Document"
|
||||
}
|
||||
|
||||
override func dataOfType(typeName: String) throws -> NSData {
|
||||
// Insert code here to write your document to data of the specified type. If outError != nil, ensure that you create and set an appropriate error when returning nil.
|
||||
// You can also choose to override fileWrapperOfType:error:, writeToURL:ofType:error:, or writeToURL:ofType:forSaveOperation:originalContentsURL:error: instead.
|
||||
throw NSError(domain: NSOSStatusErrorDomain, code: unimpErr, userInfo: nil)
|
||||
}
|
||||
|
||||
override func readFromData(data: NSData, ofType typeName: String) throws {
|
||||
atari2600.setROM(data)
|
||||
}
|
||||
|
@ -114,4 +114,9 @@ class MachineDocument: NSDocument, CSOpenGLViewDelegate, CSOpenGLViewResponderDe
|
||||
func keyDown(event: NSEvent) {}
|
||||
func keyUp(event: NSEvent) {}
|
||||
func flagsChanged(newModifiers: NSEvent) {}
|
||||
|
||||
// MARK: NSDocument overrides
|
||||
override func dataOfType(typeName: String) throws -> NSData {
|
||||
throw NSError(domain: NSOSStatusErrorDomain, code: unimpErr, userInfo: nil)
|
||||
}
|
||||
}
|
||||
|
24
OSBindings/Mac/Clock Signal/Documents/Vic20Document.swift
Normal file
24
OSBindings/Mac/Clock Signal/Documents/Vic20Document.swift
Normal file
@ -0,0 +1,24 @@
|
||||
//
|
||||
// Vic20Document.swift
|
||||
// Clock Signal
|
||||
//
|
||||
// Created by Thomas Harte on 04/06/2016.
|
||||
// Copyright © 2016 Thomas Harte. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
class Vic20Document: MachineDocument {
|
||||
|
||||
private lazy var vic20 = CSVic20()
|
||||
override func machine() -> CSMachine! {
|
||||
return vic20
|
||||
}
|
||||
|
||||
// MARK: NSDocument overrides
|
||||
override init() {
|
||||
super.init()
|
||||
self.intendedCyclesPerSecond = 1022727
|
||||
// TODO: or 1108405 for PAL; see http://www.antimon.org/dl/c64/code/stable.txt
|
||||
}
|
||||
}
|
@ -74,6 +74,20 @@
|
||||
<key>NSDocumentClass</key>
|
||||
<string>$(PRODUCT_MODULE_NAME).ElectronDocument</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>prg</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Vic-20 Cartridge</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<integer>0</integer>
|
||||
<key>NSDocumentClass</key>
|
||||
<string>Vic20Document</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
|
13
OSBindings/Mac/Clock Signal/Wrappers/CSVic20.h
Normal file
13
OSBindings/Mac/Clock Signal/Wrappers/CSVic20.h
Normal file
@ -0,0 +1,13 @@
|
||||
//
|
||||
// CSVic20.h
|
||||
// Clock Signal
|
||||
//
|
||||
// Created by Thomas Harte on 04/06/2016.
|
||||
// Copyright © 2016 Thomas Harte. All rights reserved.
|
||||
//
|
||||
|
||||
#import "CSMachine.h"
|
||||
|
||||
@interface CSVic20 : CSMachine
|
||||
|
||||
@end
|
13
OSBindings/Mac/Clock Signal/Wrappers/CSVic20.m
Normal file
13
OSBindings/Mac/Clock Signal/Wrappers/CSVic20.m
Normal file
@ -0,0 +1,13 @@
|
||||
//
|
||||
// CSVic20.m
|
||||
// Clock Signal
|
||||
//
|
||||
// Created by Thomas Harte on 04/06/2016.
|
||||
// Copyright © 2016 Thomas Harte. All rights reserved.
|
||||
//
|
||||
|
||||
#import "CSVic20.h"
|
||||
|
||||
@implementation CSVic20
|
||||
|
||||
@end
|
Loading…
Reference in New Issue
Block a user