Search found 4 matches

by Hastouki
Thu May 07, 2020 6:54 pm
Forum: NESemdev
Topic: ISC Instruction
Replies: 2
Views: 1062

Re: ISC Instruction

So I was storing the result of the subtraction into a signed byte and then checking if I had to flag a borrow. The result being -171 (after also taking the borrow from the previous instruction into account), doesn't quite work well in a signed byte. Ended up storing the result into a int16_t to ensu...
by Hastouki
Thu May 07, 2020 4:26 pm
Forum: NESemdev
Topic: ISC Instruction
Replies: 2
Views: 1062

ISC Instruction

Hey guys, the docs tell me ISC = INC + SBC. If INC doesn't affect the C flag, and the 6500 programming manual tells me this about SBC: This instruction affects the accumulator. The carry flag is set if the result is greater than or equal to 0. The carry flag is reset when the result is less than 0, ...
by Hastouki
Thu May 07, 2020 4:21 pm
Forum: NESemdev
Topic: DCP Indirect Indexed
Replies: 2
Views: 1034

Re: DCP Indirect Indexed

Thanks for clearing that up for me! I've managed to correctly implement DCP now and I'm scratching my head over ISC.
by Hastouki
Wed May 06, 2020 2:28 pm
Forum: NESemdev
Topic: DCP Indirect Indexed
Replies: 2
Views: 1034

DCP Indirect Indexed

Hey guys, I'm implementing my 6502 core and running through the nestest log. So far I'm pretty accurate across the board, but I'm struggling a little with this DCP instruction. Here is a snippet of the nestest log for context: EA15 A9 EB LDA #$EB A:36 X:02 Y:9D P:67 SP:FB PPU:319,151 CYC:17277 EA17 ...