Mercurial > repos > blastem
comparison z80_to_x86.c @ 1931:374a5ae694e8 mame_interp
Merge from default
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 18 Apr 2020 11:42:53 -0700 |
parents | 6fdac0108e47 |
children | 3e591869d135 |
comparison
equal
deleted
inserted
replaced
1843:13abdc98379e | 1931:374a5ae694e8 |
---|---|
2325 } | 2325 } |
2326 cycles(&opts->gen, num_cycles);//T States: 4 3/4 | 2326 cycles(&opts->gen, num_cycles);//T States: 4 3/4 |
2327 if (inst->addr_mode == Z80_IMMED_INDIRECT) { | 2327 if (inst->addr_mode == Z80_IMMED_INDIRECT) { |
2328 mov_ir(code, inst->immed, opts->gen.scratch1, SZ_B); | 2328 mov_ir(code, inst->immed, opts->gen.scratch1, SZ_B); |
2329 } else { | 2329 } else { |
2330 zreg_to_native(opts, Z80_C, opts->gen.scratch2); | 2330 zreg_to_native(opts, Z80_C, opts->gen.scratch1); |
2331 } | 2331 } |
2332 call(code, opts->read_io); | 2332 call(code, opts->read_io); |
2333 if (inst->addr_mode != Z80_IMMED_INDIRECT) { | 2333 if (inst->addr_mode != Z80_IMMED_INDIRECT) { |
2334 or_rr(code, opts->gen.scratch1, opts->gen.scratch1, SZ_B); | 2334 or_rr(code, opts->gen.scratch1, opts->gen.scratch1, SZ_B); |
2335 mov_irdisp(code, 0, opts->gen.context_reg, zf_off(ZF_H), SZ_B); | 2335 mov_irdisp(code, 0, opts->gen.context_reg, zf_off(ZF_H), SZ_B); |
3410 | 3410 |
3411 options->gen.handle_cycle_limit_int = code->cur; | 3411 options->gen.handle_cycle_limit_int = code->cur; |
3412 neg_r(code, options->gen.cycles, SZ_D); | 3412 neg_r(code, options->gen.cycles, SZ_D); |
3413 add_rdispr(code, options->gen.context_reg, offsetof(z80_context, target_cycle), options->gen.cycles, SZ_D); | 3413 add_rdispr(code, options->gen.context_reg, offsetof(z80_context, target_cycle), options->gen.cycles, SZ_D); |
3414 cmp_rdispr(code, options->gen.context_reg, offsetof(z80_context, int_cycle), options->gen.cycles, SZ_D); | 3414 cmp_rdispr(code, options->gen.context_reg, offsetof(z80_context, int_cycle), options->gen.cycles, SZ_D); |
3415 jcc(code, CC_B, skip_int); | |
3416 //check that we are not past the end of interrupt pulse | |
3417 cmp_rrdisp(code, options->gen.cycles, options->gen.context_reg, offsetof(z80_context, int_pulse_end), SZ_D); | |
3415 jcc(code, CC_B, skip_int); | 3418 jcc(code, CC_B, skip_int); |
3416 //set limit to the cycle limit | 3419 //set limit to the cycle limit |
3417 mov_rdispr(code, options->gen.context_reg, offsetof(z80_context, sync_cycle), options->gen.scratch2, SZ_D); | 3420 mov_rdispr(code, options->gen.context_reg, offsetof(z80_context, sync_cycle), options->gen.scratch2, SZ_D); |
3418 mov_rrdisp(code, options->gen.scratch2, options->gen.context_reg, offsetof(z80_context, target_cycle), SZ_D); | 3421 mov_rrdisp(code, options->gen.scratch2, options->gen.context_reg, offsetof(z80_context, target_cycle), SZ_D); |
3419 neg_r(code, options->gen.cycles, SZ_D); | 3422 neg_r(code, options->gen.cycles, SZ_D); |