There are a number of test suites for 6502, each with their own intentions and peculiarities.
For the most part they aim to test emulators, which are subject to different bugs than CPU implementations, and therefore the effective coverage may not be as good as expected. Such tests are generally self-checking - there is no golden results file of bus activity - and generally assume some specific platform's I/O facilities.
Self-testing (6502 ROMs and programs):
- Klaus Dormann's test suite includes decimal mode, is standalone and can be assembled to a single image around 16k.
- Wolfgang Lorenz' C64 suite exhaustive, excluding decimal mode, uses C64 facilities to chain each program (stubbing instructions here by Christer Palm) (testsuite on Tom Seddon's site) (11kbyte total) (some description) (another version with sources)
- Ruud Baltissen's 8k test ROM from his VHDL 6502 core (includes source, but only a subset of files found in the previous version)
- NES test rom by Kevin Horton (24kbyte) (haven't found source for this, he says he hasn't got clean source to release)
- AllSuiteA.asm from the hcm-6502 (verilog) project. ROM available. Load at and reset to 0xf000 and set irq vector to 0xf5a4.
- Decimal mode tests by Bruce Clark ADC/SBC (exhaustive, tests all four affected flags.) Some specific Decimal tests here.
- Test code supplied with Rob Finch's 6502 core (archive.org) (1500 bytes)
- Acid800 by Avery Lee for 8-bit Atari emulators includes some 6502 tests
- ASAP tests by Piotr Fusik includes an exhaustive test for ADC, SBC and 0x6B as well as a few tests for other undocumented opcodes
- py65 tests by Mike Naberezny (python)
It can also be useful to run a monitor or BASIC interpreter, although the test coverage isn't very high and the run time is. Favourites are: Apple 1 monitor, Apple 1 integer BASIC, C64 BASIC, BBC OS and BASIC.
- Nesdev forum topic: "req: nestest.asm"
- NES Emulator tests wiki page
- 6502.org topic "New 6502 core" For Ruud's announcement
- 6502.org topic "Running test6502.a65 on Py65"
- 6502.org topic "who knows a full test code for 6502?"
- 6502.org topic "Looking for test program"
- 6502.org topic "Op-code testing"
- 6502.org topic "Functional Test for the NMOS 6502 - request for verification"