mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-07-12 02:29:04 +00:00
42b1b7dc53
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
37 lines
681 B
C++
37 lines
681 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
#include <string>
|
|
#include <fstream>
|
|
|
|
#include "Memory.h"
|
|
|
|
namespace Fuse {
|
|
class RegisterState {
|
|
public:
|
|
enum {
|
|
AF, BC, DE, HL, AF_, BC_, DE_, HL_, IX, IY, SP, PC, MEMPTR, NUMBER_OF_REGISTERS
|
|
};
|
|
std::vector<EightBit::register16_t> registers;
|
|
int i, r;
|
|
bool iff1, iff2;
|
|
int im;
|
|
bool halted;
|
|
int tstates;
|
|
|
|
public:
|
|
RegisterState();
|
|
|
|
void read(std::ifstream& file);
|
|
void write(std::ofstream& file);
|
|
|
|
private:
|
|
void readInternal(std::ifstream& file);
|
|
void readExternal(std::ifstream& file);
|
|
|
|
void writeInternal(std::ofstream& file);
|
|
void writeExternal(std::ofstream& file);
|
|
|
|
static std::string hex(int value);
|
|
};
|
|
} |