fixed disassembler

This commit is contained in:
Lauchmelder 2022-02-28 17:04:20 +01:00
parent dfef02df47
commit 71b524519d
No known key found for this signature in database
GPG key ID: C2403C69D78F011D
4 changed files with 22 additions and 15 deletions

View file

@ -56,9 +56,9 @@ uint8_t CPU::Tick()
Byte opcode = Read(pc.Raw++);
currentInstruction = &(InstructionTable[opcode]);
pastPCs.push_back(currentInstruction);
if (pastPCs.size() > 50)
pastPCs.pop_front();
pastInstructions.push_back(std::make_pair(pc.Raw - 1, currentInstruction));
if (pastInstructions.size() > 50)
pastInstructions.pop_front();
if (currentInstruction->Operation == nullptr || currentInstruction->Mode == nullptr)
{