More 8080 simplifications. No need to have it act like a Z80 under the hood.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2018-01-11 00:02:44 +00:00
parent 29edc46966
commit 290ab7a4dc

View File

@ -338,15 +338,11 @@ void EightBit::Intel8080::execute(uint8_t& a, uint8_t& f, int x, int y, int z, i
case 0: case 0:
switch (p) { switch (p) {
case 0: // LD (BC),A case 0: // LD (BC),A
MEMPTR() = BC(); setByte(BC(), a);
setByte(MEMPTR().word++, a);
MEMPTR().high = a;
addCycles(7); addCycles(7);
break; break;
case 1: // LD (DE),A case 1: // LD (DE),A
MEMPTR() = DE(); setByte(DE(), a);
setByte(MEMPTR().word++, a);
MEMPTR().high = a;
addCycles(7); addCycles(7);
break; break;
case 2: // LD (nn),HL case 2: // LD (nn),HL
@ -356,8 +352,7 @@ void EightBit::Intel8080::execute(uint8_t& a, uint8_t& f, int x, int y, int z, i
break; break;
case 3: // LD (nn),A case 3: // LD (nn),A
fetchWord(); fetchWord();
setByte(MEMPTR().word++, a); setByte(MEMPTR(), a);
MEMPTR().high = a;
addCycles(13); addCycles(13);
break; break;
default: default:
@ -367,13 +362,11 @@ void EightBit::Intel8080::execute(uint8_t& a, uint8_t& f, int x, int y, int z, i
case 1: case 1:
switch (p) { switch (p) {
case 0: // LD A,(BC) case 0: // LD A,(BC)
MEMPTR() = BC(); a = getByte(BC());
a = getByte(MEMPTR().word++);
addCycles(7); addCycles(7);
break; break;
case 1: // LD A,(DE) case 1: // LD A,(DE)
MEMPTR() = DE(); a = getByte(DE());
a = getByte(MEMPTR().word++);
addCycles(7); addCycles(7);
break; break;
case 2: // LD HL,(nn) case 2: // LD HL,(nn)
@ -383,7 +376,7 @@ void EightBit::Intel8080::execute(uint8_t& a, uint8_t& f, int x, int y, int z, i
break; break;
case 3: // LD A,(nn) case 3: // LD A,(nn)
fetchWord(); fetchWord();
a = getByte(MEMPTR().word++); a = getByte(MEMPTR());
addCycles(13); addCycles(13);
break; break;
default: default: