AY emulation testing

Struggling with Fuse or trying to find an emulator with a specific feature. Ask your questions here.
User avatar
Pegaz
Microbot
Posts: 150
Joined: Mon Nov 13, 2017 1:44 pm

Re: AY emulation testing

Post by Pegaz » Fri Oct 12, 2018 8:36 pm

Woody did a lot more than that.
When Ramsoft people revealed new ULA feature (four bright shades), ten years ago, Woody managed to implement this feature in SpecEmu in just a few days.
https://www.worldofspectrum.org/forums/ ... rlace-demo
https://www.worldofspectrum.org/forums/ ... edirect/p1

And this is not his only contribution to a better Spectrum emulation...
0 x

User avatar
djnzx48
Microbot
Posts: 177
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: AY emulation testing

Post by djnzx48 » Sat Oct 13, 2018 4:58 am

I'm sorry, I hope I didn't come across as ungrateful towards emulator developers. It's just hard to get motivation for using these features and quirks when the most popular emulators don't support them and they haven't been updated in years.
1 x

zx81
Berk
Posts: 42
Joined: Sat Feb 17, 2018 9:33 pm

Re: AY emulation testing

Post by zx81 » Sat Oct 13, 2018 10:15 am

Ast A. Moore wrote: 8. No emulator is, of course, capable of displaying the Spectrum output at its native 50 fps. This isn’t the fault of any particular emulator, naturally, but rather the systems they runs on: most modern computers are locked to a 60 Hz refresh rate.
That's not exactly true, my friend... :)

The frame frequency on a 48k model is 50.0801 Hz and on a 128k model is 50.0211 Hz. These frequencies are basically impossible to reach on a TV or monitor where you can't control such frequencies (50 or 59.94 Hz, not 60 Hz). To get a precise 50 Hz refresh, the emulator needs to run slowly than real thing.

FPGA-based emulators, like the ZX-Uno, are capable to control the TV frame generation, so the "recreated" 48k runs at real speed. But, because the internal clocks have various limitations, the 128k model runs 8000 Hz away from real machine.

In ZXBaremulator the 48k model runs at the correct speed. So, when you configures the HDMI mode to 576i@50 Hz, you can see the interlaced effects without any trick in code, but with a small defect caused by the slightly different frequencies between TV and emulated Spectrum (50 vs 50.0801). For 128k models, the Raspberry only have a 1-Mhz timer, and I can't get the needed precision (a 128k frame lasts 19.99156356 ms), so it emulates frames of 19.991 ms long.

In theory, you can configure a HDMI mode with exact frequencies, but isn't easy to generate the needed numbers and can depend a bit of every TV-set, so I don't want to try this way. After all, the interlaced modes are "emulated" by modern TV-sets, and every model handles this with his own method.

I'm curious about the AY quality in ZXBaremulator, if somebody can try... ;)
0 x

User avatar
Pegaz
Microbot
Posts: 150
Joined: Mon Nov 13, 2017 1:44 pm

Re: AY emulation testing

Post by Pegaz » Sat Oct 13, 2018 11:00 am

zx81 wrote:
Sat Oct 13, 2018 10:15 am

In theory, you can configure a HDMI mode with exact frequencies, but isn't easy to generate the needed numbers and can depend a bit of every TV-set, so I don't want to try this way. After all, the interlaced modes are "emulated" by modern TV-sets, and every model handles this with his own method.

I'm curious about the AY quality in ZXBaremulator, if somebody can try... ;)
Yes, I also came to a similar conclusion.
Actually, there are two ways, which allow me a perfectly smooth scroll on raspberry pi, at least on my TV set.
The first mthod is using the Unreal Speccy Portable emulator, as well as the latest beta version of your Baremulator for Pi 1 / Zero.
We've already talked about that and what you've said, in such a case Spectrum works slightly slower, for that difference between 50Hz vs 50.0801 Hz.
I recently discovered another method, which also gives an excellent result with Fuse version for Retroarch frontend on Raspberry Pi.
In this case, its possible to set the exact frequency at 50.0801 Hz in options and the result is also a perfectly smooth scroll without any interruptions.
I dont know if this particular settings is really precise or not, but in reality it works great.

btw, you previously wrote that the exact frequency for 48k Spectrum is 50.0802 Hz, so I'm interested in what is the correct number?
0 x

zx81
Berk
Posts: 42
Joined: Sat Feb 17, 2018 9:33 pm

Re: AY emulation testing

Post by zx81 » Sat Oct 13, 2018 11:42 am

Pegaz wrote:
Sat Oct 13, 2018 11:00 am
btw, you previously wrote that the exact frequency for 48k Spectrum is 50.0802 Hz, so I'm interested in what is the correct number?
3500000 / 69888 = 50.08012821
0 x

User avatar
djnzx48
Microbot
Posts: 177
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: AY emulation testing

Post by djnzx48 » Sun Oct 14, 2018 4:01 am

What about the more recent LCD monitors that support FreeSync or G-Sync adaptive sync? They can be set to arbitrary refresh rates, so couldn't you obtain a proper 50Hz display using one?
0 x

Post Reply