Testing emulators using z80test-1.0. Quick results

Struggling with Fuse or trying to find an emulator with a specific feature. Ask your questions here.
User avatar
druellan
Dynamite Dan
Posts: 1466
Joined: Tue Apr 03, 2018 7:19 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by druellan »

Magnus wrote: Sun May 27, 2018 1:24 pm Well, maybe not, but my emulator stutters a bit when playing the Gyroscope music, though it seems to be doing fine with most other games. I gave Cobra's Arc a try and it sounded terrible, but I'm not quite sure how it should sound (I have no hardware to check against).
SpecEmu is a good reference.
Magnus wrote: Sun May 27, 2018 1:24 pm Edit: Sorry about taking this off topic. :oops:
I don't think it is offtopic at all, and even better if this helps to improve the emulation quality of any project!
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by Ast A. Moore »

Cobra’s Arc and Gryroscope seem to be using the Wham! engine for their music.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Hernan
Drutt
Posts: 27
Joined: Wed May 30, 2018 3:45 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by Hernan »

Not technically an emulator, but I've run the tests on my ZX-Uno (v4.1 crowdfund, latest EXP26 core) and my Next board (Issue 2A, latest v.1.10.31 core).

ZX-Uno:

Image

23/152 failed

ZX Spectrum Next:

Image

24/152 failed

To be fair, I epected much better results... :?
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by Ast A. Moore »

Hernan wrote: Wed May 30, 2018 3:58 pm Not technically an emulator
Yes, both the ZX-Uno and the Spectrum Next are technically emulators. Hardware emulators (well, hardware+firmware). Neither perfectly emulates the Z80 CPU nor the Spectrum itself.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
djnzx48
Manic Miner
Posts: 729
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: Testing emulators using z80test-1.0. Quck results

Post by djnzx48 »

Wow, I'm definitely surprised that the Next failed so many tests! Are there any major revisions expected in the future?
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by zx81 »

djnzx48 wrote: Wed May 30, 2018 4:05 pm Wow, I'm definitely surprised that the Next failed so many tests! Are there any major revisions expected in the future?
If I remember correctly, the Next uses the ZX-Uno Spectrum core, modified and not published the sources. So, the last ZX-Uno sources aren't published, until the Next team publish his modifications. A really dirty behaviour.

Modify a VHDL synthetisation is harder than modify a C, C++ or Java sources. So, the ZX-Uno Spectrum differs from the original at some points. Nothing serious, but isn't perfect. At this moment, I guess that software emulators are more precise than FPGAs synthetisations. That can change in the future, of course.

P.D.: I have a ZX-Uno v4.2 too...
Hernan
Drutt
Posts: 27
Joined: Wed May 30, 2018 3:45 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by Hernan »

BTW, to have a "control subject" I've run the tests on my real Issue 6A 48K Speccy, and fails 1 test (001 SCF)

Image
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by zx81 »

Hernan wrote: Wed May 30, 2018 4:58 pm BTW, to have a "control subject" I've run the tests on my real Issue 6A 48K Speccy, and fails 1 test (001 SCF)
What Z80 CPU model have your Issue 6A?
User avatar
Seven.FFF
Manic Miner
Posts: 735
Joined: Sat Nov 25, 2017 10:50 pm
Location: USA

Re: Testing emulators using z80test-1.0. Quck results

Post by Seven.FFF »

Is this a NMOS vs CMOS difference?
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel NXTP ESP Update ESP Reset CSpect Plugins
cthutu
Drutt
Posts: 14
Joined: Wed May 30, 2018 6:18 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by cthutu »

I ran the tests on my emulator, Nx.

Image
cthutu
Drutt
Posts: 14
Joined: Wed May 30, 2018 6:18 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by cthutu »

zx81 wrote: Wed May 30, 2018 4:27 pm
djnzx48 wrote: Wed May 30, 2018 4:05 pm Wow, I'm definitely surprised that the Next failed so many tests! Are there any major revisions expected in the future?
If I remember correctly, the Next uses the ZX-Uno Spectrum core, modified and not published the sources. So, the last ZX-Uno sources aren't published, until the Next team publish his modifications. A really dirty behaviour.

Modify a VHDL synthetisation is harder than modify a C, C++ or Java sources. So, the ZX-Uno Spectrum differs from the original at some points. Nothing serious, but isn't perfect. At this moment, I guess that software emulators are more precise than FPGAs synthetisations. That can change in the future, of course.

P.D.: I have a ZX-Uno v4.2 too...
The ZX Spectrum Next doesn't use any part of ZX-Uno at all. This is very inaccurate statement that is, unfortunately, being spread around by misinformed people. There are aspects of the Next FPGA code that is based on open cores (like the T80), but none from ZX-Uno.
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by zx81 »

cthutu wrote: Wed May 30, 2018 6:32 pm
zx81 wrote: Wed May 30, 2018 4:27 pm If I remember correctly, the Next uses the ZX-Uno Spectrum core, modified and not published the sources. So, the last ZX-Uno sources aren't published, until the Next team publish his modifications. A really dirty behaviour.

Modify a VHDL synthetisation is harder than modify a C, C++ or Java sources. So, the ZX-Uno Spectrum differs from the original at some points. Nothing serious, but isn't perfect. At this moment, I guess that software emulators are more precise than FPGAs synthetisations. That can change in the future, of course.

P.D.: I have a ZX-Uno v4.2 too...
The ZX Spectrum Next doesn't use any part of ZX-Uno at all. This is very inaccurate statement that is, unfortunately, being spread around by misinformed people. There are aspects of the Next FPGA code that is based on open cores (like the T80), but none from ZX-Uno.
I can't say anything by myself. These "misinformed people" are some ZX-Uno members. Probably, they have some reason to claim such thing.
cthutu
Drutt
Posts: 14
Joined: Wed May 30, 2018 6:18 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by cthutu »

zx81 wrote: Wed May 30, 2018 6:44 pm
cthutu wrote: Wed May 30, 2018 6:32 pm The ZX Spectrum Next doesn't use any part of ZX-Uno at all. This is very inaccurate statement that is, unfortunately, being spread around by misinformed people. There are aspects of the Next FPGA code that is based on open cores (like the T80), but none from ZX-Uno.
I can't say anything by myself. These "misinformed people" are some ZX-Uno members. Probably, they have some reason to claim such thing.
Unfortunately, they have no reason. Some of them have asserted, incorrectly, that some of the code has been copied from ZX-Uno. I think this started when ULANext was added, which is similar to ULAplus. But no code was copied. None of the members have seen the code used on the Next, and I talk daily with people that do see the code.

I will also add that the sources have not been published since the final machine has not been released. All sources will be published when that happens. This is to stop lots of Next forks occurring before the KS backers get their hands on one.
Hernan
Drutt
Posts: 27
Joined: Wed May 30, 2018 3:45 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by Hernan »

zx81 wrote: Wed May 30, 2018 5:33 pm What Z80 CPU model have your Issue 6A?
It's a SGS made one:

Image
cthutu
Drutt
Posts: 14
Joined: Wed May 30, 2018 6:18 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by cthutu »

Thanks for this thread! After testing, I decided to fix my Z80. I added the flag 3/5 behaviour for SCF and CCF, and fixed the flags bug in my RLA instruction. I now have this result:

Image
User avatar
druellan
Dynamite Dan
Posts: 1466
Joined: Tue Apr 03, 2018 7:19 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by druellan »

Hernan wrote: Wed May 30, 2018 7:56 pm It's a SGS made one:
SCF/CCF flags seems to be a little nightmare on CPUs that are not genuine Zilog.

I've found the original Patrik Rak thread 2012, where he was experimenting with this tests: https://www.worldofspectrum.org/forums/ ... ent/669314
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by Ast A. Moore »

Hernan wrote: Wed May 30, 2018 7:56 pm
zx81 wrote: Wed May 30, 2018 5:33 pm What Z80 CPU model have your Issue 6A?
It's a SGS made one:

Image
AB1 is an NMOS chip, as far as I know.

Could you run this little test on your Spectrum and tell us the color of the border you see? (If you have several Spectrums, even better!)
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Hernan
Drutt
Posts: 27
Joined: Wed May 30, 2018 3:45 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by Hernan »

Ast A. Moore wrote: Thu May 31, 2018 12:34 am Could you run this little test on your Spectrum and tell us the color of the border you see? (If you have several Spectrums, even better!)
Didn't take a picture, but it was a black border.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by Ast A. Moore »

Hernan wrote: Thu May 31, 2018 3:43 am
Ast A. Moore wrote: Thu May 31, 2018 12:34 am Could you run this little test on your Spectrum and tell us the color of the border you see? (If you have several Spectrums, even better!)
Didn't take a picture, but it was a black border.
It’s an NMOS Z80 then.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by RMartins »

Hernan wrote: Wed May 30, 2018 4:58 pm BTW, to have a "control subject" I've run the tests on my real Issue 6A 48K Speccy, and fails 1 test (001 SCF)
...
Which specific Z80 CPU brand is in your 48K computer ?

Also,which tests have you run ?
Only the full ?
wht about the other tests ?
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by Ast A. Moore »

RMartins wrote: Thu May 31, 2018 10:11 am
Hernan wrote: Wed May 30, 2018 4:58 pm BTW, to have a "control subject" I've run the tests on my real Issue 6A 48K Speccy, and fails 1 test (001 SCF)
...
Which specific Z80 CPU brand is in your 48K computer ?
Flip back a page: viewtopic.php?f=23&t=752&start=40#p11051
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Hernan
Drutt
Posts: 27
Joined: Wed May 30, 2018 3:45 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by Hernan »

RMartins wrote: Thu May 31, 2018 10:11 am Which specific Z80 CPU brand is in your 48K computer ?

Also,which tests have you run ?
Only the full ?
wht about the other tests ?
Just ran the full test. It's a NMOS Z80 made by SGS.
User avatar
Seven.FFF
Manic Miner
Posts: 735
Joined: Sat Nov 25, 2017 10:50 pm
Location: USA

Re: Testing emulators using z80test-1.0. Quck results

Post by Seven.FFF »

RMartins wrote: Tue May 22, 2018 3:43 pm and I see that instruction INC RR an INC XY (apparently they are different things (could it be second is for iX and iY ?) are returned as OK.
But these return as errors, when running `Z80ccf.tap`
The answer is in that long but fascinating 2012 WoS thread.

Z80ccf runs CCF after each opcode. If an instruction modifies the flags, the immediately following CCF (or SCF) moves bits 5+3 from A to F, whereas if an instruction doesn't modify the flags, the SCF/CCF ORs bits 5+3 from A to F.

If SCF/CCF isn't emulated the expected way, any opcode modifying flags may fail Z80ccf. I guess it's more of a sanity crosscheck than anything else.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel NXTP ESP Update ESP Reset CSpect Plugins
User avatar
druellan
Dynamite Dan
Posts: 1466
Joined: Tue Apr 03, 2018 7:19 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by druellan »

ZX-Uno running Kyp's core. All tests OK but SCF y CCF. SCF+CCF and CCF+SCF seems to work fine.

Image
Result: 002 of 152 tests failed.

Pretty nice!
User avatar
druellan
Dynamite Dan
Posts: 1466
Joined: Tue Apr 03, 2018 7:19 pm

Re: Testing emulators using z80test-1.0. Quck results

Post by druellan »

FUSE 1.5.6 changelog says:
Z80 flags register is now correct after SCF and CCF (Sergio Baldoví).
So, I decided to rerun the tests, and:

Image
Result: all tests passed
Post Reply