2019-04-17 16:31:35 +00:00
|
|
|
#ifndef INC_6502_EMULATOR_TEST_UTILS_H
|
|
|
|
#define INC_6502_EMULATOR_TEST_UTILS_H
|
|
|
|
|
2019-04-15 22:51:04 +00:00
|
|
|
#include "../src/opcode/opcode-handler-directory.h"
|
|
|
|
#include "../src/machine/status-register.h"
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using namespace emu_6502;
|
|
|
|
|
|
|
|
struct RegisterFlagSet {
|
|
|
|
bool carry;
|
|
|
|
bool zero;
|
|
|
|
bool interupt_disable;
|
|
|
|
bool decimal;
|
|
|
|
bool brk;
|
|
|
|
bool overflow;
|
|
|
|
bool negative;
|
|
|
|
};
|
|
|
|
|
2019-04-17 16:31:35 +00:00
|
|
|
unique_ptr<Machine> create_machine(vector<uint8_t> code);
|
|
|
|
bool are_flags_set(const StatusRegister& reg, const RegisterFlagSet& flags);
|
2019-04-15 22:51:04 +00:00
|
|
|
|
2019-04-17 16:31:35 +00:00
|
|
|
#endif
|