I think I've found the problem on the +2a/+3. I believe the specpls3 interrupt is firing later than it should. This causes my tstate counter drift out-of-sync for each frame that goes by (Which confuses the video drawing routines as they rely on an accurate tstate counter).
The spectrum_128 config accurately sets up the cpu clock speed and interrupt time like this:
MCFG_DEVICE_ADD("maincpu", Z80, X1_128_SINCLAIR / 5)
MCFG_SCREEN_RAW_PARAMS(X1_128_SINCLAIR / 2.5f, 456, 0, 352, 311, 0, 296)
The spectrum_plus3 config inherits from the spectrum_128 config and then modifies the interrupt time:
MCFG_SCREEN_REFRESH_RATE(50.01)
I think the spectrum_plus3 config should leave the interrupt time as is. When I remove the line "MCFG_SCREEN_REFRESH_RATE(50.01)" my contended memory mods work fine on the +2a/+3 (and the Mescaline Synesthesia demo looks the same as it does when running on my actual +2).
I've now committed all my multicolour mods and this fix to my github branch here:-
https://github.com/geecab/mame/tree/specz80_attempt_6Just wanted to add some waffle about the Mescaline Synesthesia demo:
To display more colours than is possible on the Spectrum, this demo rapidly swaps screens each frame in an attempt to mix colours (I.e. a pixel might be yellow on one screen, red on another, thus giving the impression of an orange pixel). The I've run the demo (original and 'final cut' version) on my actual +2, and can confirm the effect does not work amazingly. There is quite a bit of flicker during the raster sections and during the still images. The still images also appear to have lines on them, I've added a screencaps into my
ZX 128+2 testing album. I've found
this youtube clip of the demo running "perfectly". If you read the comments it appears the demo only looks perfect if you run it on the Pentagon. Note,
this website says "For Pentagon machines, a hardware modification is available which directly combines the two alternate screen areas into the video signal, thus eliminating the flicker associated with this method". I'm pretty sure after reading some of the youtube comments, the demo was originally written for the Pentagon and it relied on this hardware modification.
Anyways, I've now tested the Mescaline Synesthesia on Mame running the spec128 and specpls3 driver and it looks just the same as when it runs on my actual +2. So that is accurate/good enough for me