Yes indeed. Guessing that back in the day, most people programmed their Spectrums using TVs so they would never know/care about the extremes of the border. I guess I'm just trying to work out if this Qarx artifact thing is due to a bug in something I've done, or is it due to Mame exposing border areas that typically weren't visible back in the day. After all my border tests and comparisons I've pretty much convinced myself that its the latter so that's cool
RB - Splitting up my mods into another file seems a bit more tricky than I anticipated :p My aim was to put all my mods in specz80.h and specz80.cpp. In doing so I had to create another file (I called it z80_common.h) to move some defines from z80.cpp so that specz80.cpp could see them (At first I put all the defines into z80.h but that meant some other drivers failed to compile due to conflicting defines). Also, some of my specz80.cpp member functions failed to compile because they called z80_device member functions that were defined as 'inline' in z80.cpp. I got around this by removing the inline keyword from various z80_device member functions (but I'm not sure if this was the best approach?). Anyways, here is what I've done so far (and it all compiles/works) so see what you think, I don't mind going back to the drawing board again
Also, I just want mention that I don't think I've quite nailed my implementation for the +2a/+3 models. Specifically, there is a demo called 'Mescaline' that MetalliC suggested I try a while back. There are a few builds of this demo (one for the 128K/+2 models, and one for the +2a/+3 models). The 128K/+2 build looks good on mame, but the +2a/+3 build doesn't. So I probably need to take a second look at this.
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:
The spectrum_plus3 config inherits from the spectrum_128 config and then modifies the interrupt time:
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).
Just 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
Unfortunately, I don't have a CRT to try it out (I'm currently using a 42" plasma (Aerial input)). I did read a comments here http://www.pouet.net/prod.php?which=54207 suggesting it is still not perfect even with the CRT (But I have a tendency not to trust everything I read on the web).
Hi There! I've tried the Mescaline Synesthesia demo when connecting my ZX Spectrum +2 to a old 14" CRT TV. I observed same amount of flicker during the raster sections and during the still images. The still images also appear to have lines on them. I took some pics and have added them to my ZX 128+2 Testing album.
In summary, I've now run this demo on the following setups: - My Contended Memory modified version of MAME with an 27" LCD screen. - An actual ZX spectrum 128k+2 with a 42" Plasma screen screen (Aerial input). - An actual ZX spectrum 128k+2 with a 14" CRT TV (Aerial input). and the Mescaline Synesthesia demo runs/looks the same regardless of the setup. So from MAME's point of view, I think it is emulating this demo perfectly (and I think this demo, despite being ported from the Pentagon to the ZX Spectrum, will never look as good on any Spectrum as it does on the Pentagon). Case closed