2016-08-30 01:10:38 +00:00
|
|
|
//
|
|
|
|
// Tape.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 29/08/2016.
|
|
|
|
// Copyright © 2016 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef StaticAnalyser_Acorn_Tape_hpp
|
|
|
|
#define StaticAnalyser_Acorn_Tape_hpp
|
|
|
|
|
2016-08-30 11:38:08 +00:00
|
|
|
#include <list>
|
2016-08-30 01:10:38 +00:00
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "../../Storage/Tape/Tape.hpp"
|
|
|
|
|
|
|
|
namespace StaticAnalyser {
|
|
|
|
namespace Acorn {
|
|
|
|
|
|
|
|
struct File {
|
|
|
|
std::string name;
|
2016-08-30 11:38:08 +00:00
|
|
|
uint32_t load_address;
|
|
|
|
uint32_t execution_address;
|
2016-08-30 01:10:38 +00:00
|
|
|
bool is_protected;
|
|
|
|
std::vector<uint8_t> data;
|
2016-08-30 11:38:08 +00:00
|
|
|
|
|
|
|
struct Chunk {
|
2016-08-31 23:57:09 +00:00
|
|
|
std::string name;
|
2016-08-30 11:38:08 +00:00
|
|
|
uint32_t load_address;
|
|
|
|
uint32_t execution_address;
|
|
|
|
uint16_t block_number;
|
|
|
|
uint16_t block_length;
|
|
|
|
uint8_t block_flag;
|
|
|
|
uint32_t next_address;
|
|
|
|
|
|
|
|
bool header_crc_matched;
|
|
|
|
bool data_crc_matched;
|
|
|
|
std::vector<uint8_t> data;
|
|
|
|
};
|
|
|
|
|
|
|
|
std::list<Chunk> chunks;
|
2016-08-30 01:10:38 +00:00
|
|
|
};
|
|
|
|
|
2016-08-31 23:57:09 +00:00
|
|
|
std::list<File> GetFiles(const std::shared_ptr<Storage::Tape::Tape> &tape);
|
2016-08-30 01:10:38 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* Tape_hpp */
|