-Put the disassembly in parenthesis and put the opcode to the left of it in the logs. This is uglier, but it's initially easier for comparison this way.
-RegisterSP now increments in MVO@ instead of decrements. I'm not sure how this allows the stack to function properly, but it seems to work.
This commit is contained in:
parent
08e79f26a2
commit
d469a4e568
|
@ -43,12 +43,12 @@ namespace BizHawk.Emulation.CPUs.CP1610
|
|||
while (PendingCycles > 0)
|
||||
{
|
||||
int addrToAdvance;
|
||||
int opcode = ReadMemory(RegisterPC++) & 0x3FF;
|
||||
if (logging)
|
||||
{
|
||||
log.WriteLine(Disassemble(RegisterPC, out addrToAdvance));
|
||||
log.WriteLine("{0:X3} ({1})", opcode, Disassemble((ushort)(RegisterPC - 1), out addrToAdvance));
|
||||
log.Flush();
|
||||
}
|
||||
int opcode = ReadMemory(RegisterPC++) & 0x3FF;
|
||||
switch (opcode)
|
||||
{
|
||||
case 0x000: // HLT
|
||||
|
@ -1022,7 +1022,7 @@ namespace BizHawk.Emulation.CPUs.CP1610
|
|||
WriteMemory(Register[mem], Register[src]);
|
||||
// Stack mode.
|
||||
if (mem == 0x6)
|
||||
RegisterSP--;
|
||||
RegisterSP++;
|
||||
// Immediate mode.
|
||||
if (mem == 0x7)
|
||||
RegisterPC++;
|
||||
|
|
Loading…
Reference in New Issue