kosarev / zx

ZX Spectrum emulator written in a mix of Python and C++
https://twitter.com/z80tools
MIT License
21 stars 1 forks source link

Emulator crashes executing z80tests.tap #24

Open jsanchezv opened 2 years ago

jsanchezv commented 2 years ago

Hi,

Trying your emulator I've found that crashes executing the Mark Woodmass z80tests.tap with:

python3: zx/../z80/z80.h:948: void z80::z80_decoder::on_decode_ed_prefix() [with B = z80::z80_state<z80::root<{anonymous}::Spectrum48::machine_emulator> >]: La declaración `0' no se cumple.

I'm using Fedora 34, Python 3.9.7, G++ 11.2.1.

I attach the test: z80tests.tap.gz

Thanks for your work. José Luis

kosarev commented 2 years ago

How interesting. I even had the test, but somehow didn't run it against the latest Z80 versions. Thanks for pointing out!

Now, 6f72f45 resolves the crash, but the test still reports failures. I will need to look into this.

kosarev commented 2 years ago

@jsanchezv Hi José, do you know anything about the origin of the test? Any chance the source code is available? Thanks.

jsanchezv commented 2 years ago

Hi Ivan,

Mark Woodmass don't publish his sources. But, beware, Mark test his program using a NEC Z80 CPU, not a Zilog, so a few tests fails when you uses an emulated Zilog Z80. For a better test, use the z80test-1.0 from Patrick Rak (from the ZXDS hall of fame). His tests comes with source code.

kosarev commented 2 years ago

This seems to be the test from Patrik Rak: https://github.com/raxoft/z80test

jsanchezv commented 2 years ago

Correct, are the best tests you can find about the Z80, IMHO.