This commit is contained in:
CaH4e3 2014-11-03 20:48:24 +00:00
parent 4235202570
commit b761f9c55c
2 changed files with 8 additions and 6 deletions

View File

@ -276,10 +276,10 @@ char *Disassemble(int addr, uint8 *opcode) {
}
#define indirectX(a) { \
(a) = (opcode[1]+RX)&0xFF; \
(a) = GetMem((a)) | (GetMem((a)+1))<<8; \
(a) = GetMem((a)) | (GetMem(((a)+1)&0xff))<<8; \
}
#define indirectY(a) { \
(a) = GetMem(opcode[1]) | (GetMem(opcode[1]+1))<<8; \
(a) = GetMem(opcode[1]) | (GetMem((opcode[1]+1)&0xff))<<8; \
(a) += RY; \
}

View File

@ -754,7 +754,7 @@ static void breakpoint(uint8 *opcode, uint16 A, int size) {
void DebugCycle()
{
uint8 opcode[3] = {0};
uint16 A = 0;
uint16 A = 0, tmp;
int size;
if (scanline == 240)
@ -789,12 +789,14 @@ void DebugCycle()
{
case 0: break;
case 1:
A = (opcode[1] + _X) & 0xFF;
A = GetMem(A) | (GetMem(A + 1) << 8);
tmp = (opcode[1] + _X) & 0xFF;
A = GetMem(tmp);
tmp = (opcode[1] + _X + 1) & 0xFF;
A |= (GetMem(tmp) << 8);
break;
case 2: A = opcode[1]; break;
case 3: A = opcode[1] | (opcode[2] << 8); break;
case 4: A = (GetMem(opcode[1]) | (GetMem(opcode[1]+1) << 8)) + _Y; break;
case 4: A = (GetMem(opcode[1]) | (GetMem((opcode[1] + 1) & 0xFF) << 8)) + _Y; break;
case 5: A = opcode[1] + _X; break;
case 6: A = (opcode[1] | (opcode[2] << 8)) + _Y; break;
case 7: A = (opcode[1] | (opcode[2] << 8)) + _X; break;