Skip to content

Commit

Permalink
Merge pull request #755 from parasyte/fix/cdlogger-invalidation
Browse files Browse the repository at this point in the history
Fix PRG reads and writes in CD Logger
  • Loading branch information
thor2016 authored Nov 24, 2024
2 parents 6dc277a + 65f4a48 commit 0ba9ffe
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ void LogCDData(uint8 *opcode, uint16 A, int size)
case 4: memop = 0x20; break;
}

if ((j = GetPRGAddress(A)) != -1)
if (((j = GetPRGAddress(A)) != -1) && (opcode[0] != 0x4C) && (opcode[0] != 0x6C))
{
if (opwrite[opcode[0]] == 0)
{
Expand All @@ -569,7 +569,12 @@ void LogCDData(uint8 *opcode, uint16 A, int size)
newDataHit = true;
}
}
else
// Unclear why the write destination's access types gets reset for FDS...
// See:
// - https://github.com/TASEmulators/fceux/commit/a4fa6225a04b5ab8d3dfca3fc9abd7190bceec85
// - https://github.com/TASEmulators/fceux/commit/b10b6254c3d5c9519a85cb4382cdb22846d2e394
// - https://github.com/TASEmulators/fceux/commit/67942accc72149ae028d58f36419b64ea8651db9?diff=unified&w=1
else if(GameInfo && GameInfo->type == GIT_FDS)
{
if (cdloggerdata[j] & 1)
{
Expand Down

0 comments on commit 0ba9ffe

Please sign in to comment.