News for hackers. Stuff that matters.
Re:Nestur: NES Emulator in Rust by mkagenius on Tuesday January 07, 2020 @01:24AM (#21977471)
> but the - 1 is taken care of because of the fact that ADC and SBC do the opposite thing with the carry flag.

Also, this line is bothersome, they do opposite things but that's why you have already done (1 - C).

Maybe the fact that -V is actually (!V + 1) (in 2's complement) that eats up the extra -1 is the correct explanation?

So,

  SBC = A - V - 1 + C

  SBC = A + !V + 1 - 1 + C

  SBC = A + !V + C
Re:Nestur: NES Emulator in Rust by ltriant on Tuesday January 07, 2020 @01:45AM (#21977589)
Ah yeah you’re right. I had a brain fart and got my -V and !V confused.

At the time of writing I was sure I had it right too!

I’ll fix that up. Thanks :)