Correct a couple of small issues

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2018-11-16 23:49:52 +00:00
parent e688411cb9
commit 5530522f11
4 changed files with 9 additions and 7 deletions

View File

@ -45,9 +45,9 @@ namespace EightBit {
InputOutput& m_ports;
register16_t af;
register16_t bc = 0xffff;
register16_t de = 0xffff;
register16_t hl = 0xffff;
register16_t bc = Mask16;
register16_t de = Mask16;
register16_t hl = Mask16;
auto R(const int r) {
switch (r) {

View File

@ -5,6 +5,7 @@
#include <map>
#include <vector>
#include "Chip.h"
#include "Signal.h"
#include "Register.h"
#include "EventArgs.h"
@ -57,7 +58,7 @@ namespace EightBit {
void loadHexFile(std::string path);
private:
uint8_t m_data = 0xff;
register16_t m_address = 0xffff;
uint8_t m_data = Chip::Mask8;
register16_t m_address = Chip::Mask16;
};
}

View File

@ -169,7 +169,7 @@ namespace EightBit {
private:
std::array<opcode_decoded_t, 0x100> m_decodedOpcodes;
register16_t m_sp = 0xffff;
register16_t m_sp = Mask16;
register16_t m_memptr;
};
}

View File

@ -1,6 +1,7 @@
#pragma once
#include <cstdint>
#include "Chip.h"
namespace EightBit {
@ -11,7 +12,7 @@ namespace EightBit {
enum AccessLevel { Unknown, ReadOnly, ReadWrite, };
Memory& memory;
uint16_t begin = 0xffff;
uint16_t begin = Chip::Mask16;
uint16_t mask = 0U;
AccessLevel access = Unknown;
};