Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
utils = require('utils');
hw = utils.hexword;
hb = utils.hexbyte;
every = 0;
function spew(pc) {
console.log(`${processor.currentCycles} $${hw(pc)} A=${hb(processor.a)} X=${hb(processor.x)} Y=${hb(processor.y)}`);
// breakpoint every 100 instructions lest things go awry.
return ((++every % 100) === 0);
}
processor.debugInstruction.add(spew);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.