Fix PRG reads and writes in CD Logger
This code was added for FDS RAM, but it breaks PRG writes with normal cartridge-based memory controllers.
The bug inappropriately resets (clears) the access mode bits previously recorded when an MMIO register is written in PRG address space. For instance, if an instruction is executed at $8000 and then some code later writes to $8000, the instruction execution would have been forgotten.
The bug was a regression introduced in 2.4.0.
Do you have the commit that broke it? Trying to figure out whose review to request lol.
@vadosnaprimer They are all listed in a comment:
- a4fa6225a04b5ab8d3dfca3fc9abd7190bceec85
- b10b6254c3d5c9519a85cb4382cdb22846d2e394
- 67942accc72149ae028d58f36419b64ea8651db9
Seems like all 3 of these commits were intended to clear code and data accesses when writing to PRG area (the technique was refined each time). As b10b6254c3d5c9519a85cb4382cdb22846d2e394 says, this was specifically done for FDS, I guess so newly loaded blocks scrub the previous data so that the new block can be analyzed fresh (wouldn't it be better to map it back to the FDS sectors, bearing in mind it may be difficult to track if the actual bios is being used to do these loads rather than an HLE? Maybe this is done elsewhere somehow). This commit looks like it does the job of restricting that new logic to FDS as intended.
Commits seem fine to me