image image image image image image image image image image image image image image

SNES ADC and SBC tests

title

Programs to test ADC and SBC operations by Shay Green.

By: Evan G
Last updated: June 24, 2017

This is a set of programs to test ADC (Add With Carry) and SBC (Subtract with Borrow from Accumulator) instructions. The readme provides more details:

SNES ADC/SBC tests
------------------
These tests verify 8-bit and 16-bit ADC and SBC operation for binary and
decimal modes. Each takes about 15 seconds.

Each tests with the indicated flags over all 65536 combinations of A and
the operand (for 16-bit versions, only interesting combinations), and
verifies the resulting A and flags (all 8 flags). The final test has
various other flags set which shouldn't affect operation, just in case
an emulator incorrectly uses them.

Included in source/ are C++ implementations of the operations that pass
the above tests.


Building with ca65
------------------
To assemble a test ROM with ca65, use the following commands:

	ca65 --cpu 65816 -I common -o test.o source_filename_here.s
	ld65 -C smc.cfg test.o -o test.smc

-- 
Shay Green 
image
test_adc.smc
image
test_adc_16.smc
image
test_sbc.smc
image
test_sbc_16.smc

Download here


© Evan G. This site is made by a Canadian, and fueled by beer. Do not use material on this site without permission. This site does not use cookies.