-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbinarygenerator.h
56 lines (46 loc) · 1014 Bytes
/
binarygenerator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef _BINARY_GENERATOR_
#define _BINARY_GENERATOR_
#include <iostream>
#include <vector>
#include "instructions.h"
#include "mifgenerator.h"
#define MEMORY_SIZE 8191
#define BIOS_SIZE 256
#define STORAGE_SIZE 32768
class BinaryGenerator
{
public:
virtual void run(std::vector<Instruction *>) = 0;
void setOffset(int);
void setFile(std::string);
protected:
std::string fileName;
int offset;
MifGenerator mif;
};
class BinaryGeneratorFactory
{
public:
static BinaryGenerator *generate(bool isCompressed, bool isBios, bool isOS);
};
class UncompressedBinaryGenerator : public BinaryGenerator
{
public:
void run(std::vector<Instruction *>);
};
class OSBinaryGenerator : public BinaryGenerator
{
public:
void run(std::vector<Instruction *>);
};
class CompressedBinaryGenerator : public BinaryGenerator
{
public:
void run(std::vector<Instruction *>);
};
class BIOSBinaryGenerator : public BinaryGenerator
{
public:
void run(std::vector<Instruction *>);
};
#endif