mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +00:00
Added enough wiring (hopefully) that the Commodore tape's GetFiles should be called when appropriate.
This commit is contained in:
parent
cfe8251166
commit
8b933182af
@ -335,6 +335,7 @@
|
||||
4BBF99181C8FBA6F0075DAFB /* TextureTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BBF99121C8FBA6F0075DAFB /* TextureTarget.cpp */; };
|
||||
4BC3B74F1CD194CC00F86E85 /* Shader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BC3B74D1CD194CC00F86E85 /* Shader.cpp */; };
|
||||
4BC3B7521CD1956900F86E85 /* OutputShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BC3B7501CD1956900F86E85 /* OutputShader.cpp */; };
|
||||
4BC5E4921D7ED365008CF980 /* CommodoreAnalyser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BC5E4901D7ED365008CF980 /* CommodoreAnalyser.cpp */; };
|
||||
4BC751B21D157E61006C31D9 /* 6522Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BC751B11D157E61006C31D9 /* 6522Tests.swift */; };
|
||||
4BC76E691C98E31700E6EF73 /* FIRFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BC76E671C98E31700E6EF73 /* FIRFilter.cpp */; };
|
||||
4BC76E6B1C98F43700E6EF73 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC76E6A1C98F43700E6EF73 /* Accelerate.framework */; };
|
||||
@ -761,6 +762,8 @@
|
||||
4BC3B74E1CD194CC00F86E85 /* Shader.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Shader.hpp; sourceTree = "<group>"; };
|
||||
4BC3B7501CD1956900F86E85 /* OutputShader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OutputShader.cpp; sourceTree = "<group>"; };
|
||||
4BC3B7511CD1956900F86E85 /* OutputShader.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = OutputShader.hpp; sourceTree = "<group>"; };
|
||||
4BC5E4901D7ED365008CF980 /* CommodoreAnalyser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommodoreAnalyser.cpp; path = ../../StaticAnalyser/Commodore/CommodoreAnalyser.cpp; sourceTree = "<group>"; };
|
||||
4BC5E4911D7ED365008CF980 /* CommodoreAnalyser.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = CommodoreAnalyser.hpp; path = ../../StaticAnalyser/Commodore/CommodoreAnalyser.hpp; sourceTree = "<group>"; };
|
||||
4BC751B11D157E61006C31D9 /* 6522Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = 6522Tests.swift; sourceTree = "<group>"; };
|
||||
4BC76E671C98E31700E6EF73 /* FIRFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FIRFilter.cpp; sourceTree = "<group>"; };
|
||||
4BC76E681C98E31700E6EF73 /* FIRFilter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = FIRFilter.hpp; sourceTree = "<group>"; };
|
||||
@ -1515,6 +1518,8 @@
|
||||
4BC830D21D6E7C6D0000A26F /* Commodore */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4BC5E4901D7ED365008CF980 /* CommodoreAnalyser.cpp */,
|
||||
4BC5E4911D7ED365008CF980 /* CommodoreAnalyser.hpp */,
|
||||
4BC830CF1D6E7C690000A26F /* Tape.cpp */,
|
||||
4BC830D01D6E7C690000A26F /* Tape.hpp */,
|
||||
);
|
||||
@ -2038,6 +2043,7 @@
|
||||
4BC76E691C98E31700E6EF73 /* FIRFilter.cpp in Sources */,
|
||||
4B55CE5F1C3B7D960093A61B /* MachineDocument.swift in Sources */,
|
||||
4B2A53A11D117D36003C6002 /* CSAtari2600.mm in Sources */,
|
||||
4BC5E4921D7ED365008CF980 /* CommodoreAnalyser.cpp in Sources */,
|
||||
4BC830D11D6E7C690000A26F /* Tape.cpp in Sources */,
|
||||
4B69FB441C4D941400B5F0AA /* TapeUEF.cpp in Sources */,
|
||||
4B4DC8211D2C2425003C5BF8 /* Vic20.cpp in Sources */,
|
||||
|
36
StaticAnalyser/Commodore/CommodoreAnalyser.cpp
Normal file
36
StaticAnalyser/Commodore/CommodoreAnalyser.cpp
Normal file
@ -0,0 +1,36 @@
|
||||
//
|
||||
// CommodoreAnalyser.cpp
|
||||
// Clock Signal
|
||||
//
|
||||
// Created by Thomas Harte on 06/09/2016.
|
||||
// Copyright © 2016 Thomas Harte. All rights reserved.
|
||||
//
|
||||
|
||||
#include "CommodoreAnalyser.hpp"
|
||||
|
||||
#include "Tape.hpp"
|
||||
|
||||
using namespace StaticAnalyser::Commodore;
|
||||
|
||||
void StaticAnalyser::Commodore::AddTargets(
|
||||
const std::list<std::shared_ptr<Storage::Disk::Disk>> &disks,
|
||||
const std::list<std::shared_ptr<Storage::Tape::Tape>> &tapes,
|
||||
const std::list<std::shared_ptr<Storage::Cartridge::Cartridge>> &cartridges,
|
||||
std::list<StaticAnalyser::Target> &destination)
|
||||
{
|
||||
Target target;
|
||||
target.machine = Target::Vic20; // TODO: machine estimation
|
||||
target.probability = 1.0; // TODO: a proper estimation
|
||||
|
||||
// strip out inappropriate cartridges
|
||||
// target.cartridges = AcornCartridgesFrom(cartridges);
|
||||
|
||||
// if there are any tapes, attempt to get data from the first
|
||||
if(tapes.size() > 0)
|
||||
{
|
||||
std::shared_ptr<Storage::Tape::Tape> tape = tapes.front();
|
||||
tape->reset();
|
||||
std::list<File> files = GetFiles(tape);
|
||||
tape->reset();
|
||||
}
|
||||
}
|
27
StaticAnalyser/Commodore/CommodoreAnalyser.hpp
Normal file
27
StaticAnalyser/Commodore/CommodoreAnalyser.hpp
Normal file
@ -0,0 +1,27 @@
|
||||
//
|
||||
// CommodoreAnalyser.hpp
|
||||
// Clock Signal
|
||||
//
|
||||
// Created by Thomas Harte on 06/09/2016.
|
||||
// Copyright © 2016 Thomas Harte. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef CommodoreAnalyser_hpp
|
||||
#define CommodoreAnalyser_hpp
|
||||
|
||||
#include "../StaticAnalyser.hpp"
|
||||
|
||||
namespace StaticAnalyser {
|
||||
namespace Commodore {
|
||||
|
||||
void AddTargets(
|
||||
const std::list<std::shared_ptr<Storage::Disk::Disk>> &disks,
|
||||
const std::list<std::shared_ptr<Storage::Tape::Tape>> &tapes,
|
||||
const std::list<std::shared_ptr<Storage::Cartridge::Cartridge>> &cartridges,
|
||||
std::list<Target> &destination
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CommodoreAnalyser_hpp */
|
@ -7,3 +7,12 @@
|
||||
//
|
||||
|
||||
#include "Tape.hpp"
|
||||
|
||||
using namespace StaticAnalyser::Commodore;
|
||||
|
||||
std::list<File> StaticAnalyser::Commodore::GetFiles(const std::shared_ptr<Storage::Tape::Tape> &tape)
|
||||
{
|
||||
std::list<File> file_list;
|
||||
|
||||
return file_list;
|
||||
}
|
||||
|
@ -25,6 +25,8 @@ struct File {
|
||||
std::vector<uint8_t> data;
|
||||
};
|
||||
|
||||
std::list<File> GetFiles(const std::shared_ptr<Storage::Tape::Tape> &tape);
|
||||
|
||||
}
|
||||
}
|
||||
#endif /* Tape_hpp */
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
// Analysers
|
||||
#include "Acorn/AcornAnalyser.hpp"
|
||||
#include "Commodore/CommodoreAnalyser.hpp"
|
||||
|
||||
// Cartridges
|
||||
#include "../Storage/Cartridge/Formats/BinaryDump.hpp"
|
||||
@ -106,10 +107,8 @@ std::list<Target> StaticAnalyser::GetTargets(const char *file_name)
|
||||
|
||||
// Hand off to platform-specific determination of whether these things are actually compatible and,
|
||||
// if so, how to load them. (TODO)
|
||||
if(potential_platforms & (TargetPlatformType)TargetPlatform::Acorn)
|
||||
{
|
||||
Acorn::AddTargets(disks, tapes, cartridges, targets);
|
||||
}
|
||||
if(potential_platforms & (TargetPlatformType)TargetPlatform::Acorn) Acorn::AddTargets(disks, tapes, cartridges, targets);
|
||||
if(potential_platforms & (TargetPlatformType)TargetPlatform::Commodore) Commodore::AddTargets(disks, tapes, cartridges, targets);
|
||||
|
||||
free(lowercase_extension);
|
||||
return targets;
|
||||
|
Loading…
Reference in New Issue
Block a user