Skip to content

Test cases

Dave Hooper edited this page Jul 27, 2025 · 10 revisions

Unless otherwise stated, all test cases have been validated on either original SAM Coupé hardware or on genuine SAA1099P chip (e.g. connected to Raspberry PI, see https://github.com/stripwax/rpi_saa1099_driver Also, unless otherwise stated, each test case is a SAM Basic file in the SAM Coupé .DSK file, and includes comments and text stating what to listen for to determine if the test is succeesful.

Note: test cases are maintained in the Tests top-level folder : https://github.com/stripwax/SAASound/tree/master/tests

Filename Description
sweep Basic sweep from lowest to highest. Showcase both the "sweep without glitch" (freq register set before octave register) and "sweep with glitch" (octave register set before freq register) behaviours. You should clearly hear the differences. In addition you can use this test case objectively to listen out for alias artifacts, to evaluate the quality of oversampling and filtering, etc.
defendr Reproductible case discovered by Balor Price when implementing engine sounds in SAM Defender. The 'engine anomaly' was that the sound should be repeateable and identical when triggered in-game but it curiously was not, even though Sync was used. This uncovered a bug in SAA Sound (since fixed) related to loading new register values while Sync is enabled. Details in thread here: https://www.worldofsam.org/forum/2018-08-09/1082
FRED59 syn Fred 59 - "SPACE DEMO" - spacebar triggers an audio sample, this uses an uncommon approach involving toggling the Sync bit, which requires an accurate emulation. Older versions of SAA Sound and, perhaps, other emulation cores, do not implement this correctly. For the original example, you can launch FRED59.dsk into Sim Coupe and launch Space Demo and press space
sync test Bug report in sync/amplitude behaviour reported by Anton Javorcek - see thread https://www.facebook.com/groups/20486797963/?post_id=10157255453867964 - which gave rise to commit 63f9ce60 . The fix for this originally caused some subsequent issues (including https://www.facebook.com/groups/20486797963/?post_id=10158468357627964 ) as well as causing unintended regressions in other cases
synctest 2 A second test case for the "sync test" repro
EvnExt_clk Validating a confirmation that SAA1099 requires the address (24 or 25) to be written to the Address register in order to trigger the 'external' clocking of envelope registers. In other words, the trigger for external clocking for ENV0 is to write 24d to the address register, and the trigger for external clocking for ENV1 is to write 25d to the address register. Documentation has been sparse on this point; just writing 'any thing' to the address register is not sufficient- a register match is required.
EnvExt_imm Additional confirmation for 'immediate' changes to ENV0/ENV1 registers. Specifically, switching 3bit/4bit env resolution while envelope is enabled. Behaviour confirmed.
EnvExt_34b Additional cases for behaviours when toggling 3bit/4bit env while envelope is enabled. Behaviour confirmed.
EnvExt_lat Test cases for 'latch' behaviours in the envelope generator registers, combined with "ext" clock feature. Illustrates differences between deferred and immediate behaviours
EnvExt_la2 More 'latch' behaviours
EnvExt_la3 Even more env generator buffering behaviours - deferred and/or immediate changes to waveform according to the datasheet "point (3)" and "point (4)" logic
BLINKsampl Replica of the 3-bit DAC mode as used by Edwin Blink's sample demos for SAM Coupé . Use this to validate 3-bit DAC mode behaviours
Anton1 Discovery of a mistake in the Pulse Density Modulation tables, replicated initially via emulator only then on-chip . Details in various comments in this original thread: https://www.facebook.com/share/v/1G8o557JkR/
TheoNiessi Test case for regression in noise generator, originally spotted by Theo Niessink - fixed-rate noise was generated at the wrong frequency
TheoNiess1 Another test case for regression in noise generator . Fixed versus variable frequency. 1b (variable frequency clocked to oscillator) and 2a (fixed predefined frequency) should sound identical.

Missing:

  • Various comments in CSAAEnv::SetEnvControl alluding to the fact that exact behaviour is not fully understood. To be tested.

Clone this wiki locally