# HG changeset patch # User Michael Pavone # Date 1461219553 25200 # Node ID 1eb616b8cbe9f5e211a73240ceb725b206b874ca # Parent f765c2fc7508f49511be53cd2c9657a42b12479e Fix bug in Z80 rrd implementation. This fixes the annoying high pitched wine in Afterburner II. diff -r f765c2fc7508 -r 1eb616b8cbe9 z80_to_x86.c --- a/z80_to_x86.c Wed Apr 20 23:00:37 2016 -0700 +++ b/z80_to_x86.c Wed Apr 20 23:19:13 2016 -0700 @@ -1435,6 +1435,7 @@ shl_ir(code, 4, opts->gen.scratch2, SZ_W); and_ir(code, 0xF00F, opts->gen.scratch1, SZ_W); and_ir(code, 0xF0, opts->regs[Z80_A], SZ_B); + and_ir(code, 0xF0, opts->gen.scratch2, SZ_W); //opts->gen.scratch1 = 0x2001 //opts->gen.scratch2 = 0x0040 or_rr(code, opts->gen.scratch2, opts->gen.scratch1, SZ_W); diff -r f765c2fc7508 -r 1eb616b8cbe9 z80_to_x86.h --- a/z80_to_x86.h Wed Apr 20 23:00:37 2016 -0700 +++ b/z80_to_x86.h Wed Apr 20 23:19:13 2016 -0700 @@ -12,7 +12,7 @@ #ifdef Z80_LOG_ADDRESS #define ZMAX_NATIVE_SIZE 255 #else -#define ZMAX_NATIVE_SIZE 128 +#define ZMAX_NATIVE_SIZE 160 #endif enum {