Mercurial > repos > blastem
comparison z80_to_x86.c @ 828:22c3c52b9871
Fixed a copy pasta error in the implementation of LDD and LDDR. HL should be decremented and not incremented in those instructions.
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 18 Sep 2015 19:54:02 -0700 |
parents | 21a69dfb6ee7 |
children | 5822c6e5642f |
comparison
equal
deleted
inserted
replaced
827:35f5658d141f | 828:22c3c52b9871 |
---|---|
630 sub_ir(code, 1, opts->regs[Z80_DE], SZ_W); | 630 sub_ir(code, 1, opts->regs[Z80_DE], SZ_W); |
631 } else { | 631 } else { |
632 sub_irdisp(code, 1, opts->gen.context_reg, zr_off(Z80_DE), SZ_W); | 632 sub_irdisp(code, 1, opts->gen.context_reg, zr_off(Z80_DE), SZ_W); |
633 } | 633 } |
634 if (opts->regs[Z80_HL] >= 0) { | 634 if (opts->regs[Z80_HL] >= 0) { |
635 add_ir(code, 1, opts->regs[Z80_HL], SZ_W); | 635 sub_ir(code, 1, opts->regs[Z80_HL], SZ_W); |
636 } else { | 636 } else { |
637 sub_irdisp(code, 1, opts->gen.context_reg, zr_off(Z80_HL), SZ_W); | 637 sub_irdisp(code, 1, opts->gen.context_reg, zr_off(Z80_HL), SZ_W); |
638 } | 638 } |
639 if (opts->regs[Z80_BC] >= 0) { | 639 if (opts->regs[Z80_BC] >= 0) { |
640 sub_ir(code, 1, opts->regs[Z80_BC], SZ_W); | 640 sub_ir(code, 1, opts->regs[Z80_BC], SZ_W); |
656 sub_ir(code, 1, opts->regs[Z80_DE], SZ_W); | 656 sub_ir(code, 1, opts->regs[Z80_DE], SZ_W); |
657 } else { | 657 } else { |
658 sub_irdisp(code, 1, opts->gen.context_reg, zr_off(Z80_DE), SZ_W); | 658 sub_irdisp(code, 1, opts->gen.context_reg, zr_off(Z80_DE), SZ_W); |
659 } | 659 } |
660 if (opts->regs[Z80_HL] >= 0) { | 660 if (opts->regs[Z80_HL] >= 0) { |
661 add_ir(code, 1, opts->regs[Z80_HL], SZ_W); | 661 sub_ir(code, 1, opts->regs[Z80_HL], SZ_W); |
662 } else { | 662 } else { |
663 sub_irdisp(code, 1, opts->gen.context_reg, zr_off(Z80_HL), SZ_W); | 663 sub_irdisp(code, 1, opts->gen.context_reg, zr_off(Z80_HL), SZ_W); |
664 } | 664 } |
665 if (opts->regs[Z80_BC] >= 0) { | 665 if (opts->regs[Z80_BC] >= 0) { |
666 sub_ir(code, 1, opts->regs[Z80_BC], SZ_W); | 666 sub_ir(code, 1, opts->regs[Z80_BC], SZ_W); |