2017-08-10 19:34:17 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
#include <fstream>
|
|
|
|
|
2017-09-07 00:15:28 +00:00
|
|
|
#include <Register.h>
|
2017-08-10 19:34:17 +00:00
|
|
|
|
|
|
|
namespace Fuse {
|
|
|
|
class RegisterState {
|
|
|
|
public:
|
|
|
|
enum {
|
2017-08-12 13:22:10 +00:00
|
|
|
AF, BC, DE, HL, SP, PC, NUMBER_OF_REGISTERS
|
2017-08-10 19:34:17 +00:00
|
|
|
};
|
|
|
|
std::vector<EightBit::register16_t> registers;
|
|
|
|
bool halted;
|
|
|
|
int tstates;
|
|
|
|
|
|
|
|
public:
|
|
|
|
RegisterState();
|
|
|
|
|
|
|
|
void read(std::ifstream& file);
|
2017-08-10 22:46:41 +00:00
|
|
|
|
|
|
|
private:
|
2017-08-10 19:34:17 +00:00
|
|
|
void readInternal(std::ifstream& file);
|
|
|
|
void readExternal(std::ifstream& file);
|
2017-08-10 22:46:41 +00:00
|
|
|
|
|
|
|
static std::string hex(int value);
|
2017-08-10 19:34:17 +00:00
|
|
|
};
|
|
|
|
}
|