I've implemented blargg's 8-bit versions in both 8-bit and 16-bit, by extending his algorithm appropriately. Source code is here:


Given lda #$0123; adc #$4567: regs.a.w = 0x0123, rd.w = 0x4567

It's definitely correct for all 8-bit x 8-bit combinations.

I'd certainly appreciate it if anyone could confirm the new BCD code is correct, as I can't exactly test 16-bit x 16-bit full combinations on a 3MHz SNES with 32KB SRAM smirk

I suppose we should add the new ADC/SBC versions to both the Apple II GS and SNES cores in MESS, too.

Isn't that amazing, though? 15 years of SNES research and we never got add or subtract right, heh ...