diff --git a/Intel8080/inc/Intel8080.h b/Intel8080/inc/Intel8080.h index 13d7214..1e181a2 100644 --- a/Intel8080/inc/Intel8080.h +++ b/Intel8080/inc/Intel8080.h @@ -289,22 +289,22 @@ namespace EightBit { void sta() { fetchWord(); - m_memory.set(MEMPTR().word, A()); + memptrReference() = A(); } void lda() { fetchWord(); - A() = m_memory.get(MEMPTR().word); + A() = memptrReference(); } void shld() { fetchWord(); - m_memory.setWord(MEMPTR().word, HL()); + setWordViaMemptr(HL()); } void lhld() { fetchWord(); - HL() = m_memory.getWord(MEMPTR().word); + getWordViaMemptr(HL()); } void xchg() { diff --git a/LR35902/inc/LR35902.h b/LR35902/inc/LR35902.h index 353d6cb..054a77d 100644 --- a/LR35902/inc/LR35902.h +++ b/LR35902/inc/LR35902.h @@ -68,9 +68,6 @@ namespace EightBit { bool m_stopped; - std::array m_halfCarryTableAdd = { { false, false, true, false, true, false, true, true } }; - std::array m_halfCarryTableSub = { { false, true, true, true, false, false, false, true } }; - int fetchExecute() { return execute(fetchByte()); } diff --git a/Z80/inc/Z80.h b/Z80/inc/Z80.h index 4be69ba..85375ab 100644 --- a/Z80/inc/Z80.h +++ b/Z80/inc/Z80.h @@ -120,8 +120,7 @@ namespace EightBit { } void incrementRefresh() { - auto incremented = (REFRESH() + 1) & Mask7; - REFRESH() = (REFRESH() & Bit7) | incremented; + REFRESH() = (REFRESH() & Bit7) | (REFRESH() + 1) & Mask7; } uint8_t& DISPLACED() {