tomcw / mb-audit

8 stars 1 forks source link
appleii emulator

mb-audit

The purpose of "mb-audit" is two fold:

  1. A set of tests that exercise real Mockingboard hardware to identify any faults.
    • Detect and test all slots with a Mockingboard/Phasor card in the Apple II machine (so not the Mockingboard-D for the //c).
    • Support all variants of Mockingboard, eg. all those from Sweet Micro Systems and newer versions: ReactiveMicro, A2Heaven, IanKim's etc. (NB. currently only a few types have actually been tested outside of emulation).
    • Attempt to test all components, ie. 6522s, AY-3-8913s, SC-01 & SSI263s.
  2. A set of deep, probing tests that exercise emulators' Mockingboard implementation to test coverage and correctness.
    • Tests for 6502-specific and 6502/65C02-common false-read addressing modes.
    • Tests for 65C02-specific addressing modes / instructions.
    • No 65816 specialisation yet, other than taking the 6502 (not 65C02) path for false-read addressing mode support.

As it is intended as a full-correctness suite for emulators, then it goes deeper than what emulators currently need to emulate. The way the tests have been ordered is that (more or less) the more important tests are done first, with the more esoteric tests towards the end.

Tests are run in order and can't be skipped (except for the soak test where ESC skips the current test). On a first failure, then the audit will stop at that point, outputting an error to identify the test failure and some extra info to help narrow down the failure. There is no way to resume testing from after this failing test, mainly because subsequent tests rely on behaviour that must be working from previous tests. NB. A few tests will output a warning and continue.

Motivation: to consolidate the sprawling set of individual tests I've been creating over the years for AppleWin.

Current test matrix for real hardware:

DSC00534-s

Operation

Here's a high-level overview of what mb-audit does:

Then for each card found:

Continuing for each card found:

After all cards have been tested then:

When a test fails, the display will indicate the failing test and reason:

mb-audit v0.1-beta, 2021                     
                    1  2  3  4  5  6  7 
               $00: ?        C          
               $80: ?        C          
                SP:          B          
65C02 detected                          
Slot #4 :Mockingboard failed test: 6522 
Test: 11:04:0A                          
Expected:09 Actual:F1                   

Where:

Test Details

6522 tests

AY-3-8913 tests

SSI263 tests

SC-01 tests

Running on a IIgs

To Do

Acknowledgements

Thanks to Andrew Roughan for his help with testing against his MEGA Audio and single-6522 clone cards, and Brian J. Bernstein for testing against his Echo+ card.