SPC700 dummy reads

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
Revenant
Posts: 462
Joined: Sat Apr 25, 2015 1:47 pm
Location: FL

SPC700 dummy reads

Post by Revenant »

Earlier today someone pointed out some unintuitive behavior in my debugger when putting read breakpoints on the SMP bus, which led me to realize that a lot of SPC700 write instructions also perform a dummy read from the same address, like so:

Code: Select all

void SMPcore::op_mov_dp_const() {
  rd = op_readpc();
  dp = op_readpc();
  op_readdp(dp); // ?????
  op_writedp(dp, rd);
}
Anomie's SPC cycle document describes the same behavior and mentions that it's been verified by blargg, which I trust.

But... what's the deal? Is it just a side effect of how the processor is designed, or does it have some actual purpose other than wasting cycles?
Post Reply