passing call timings

This commit is contained in:
2025-05-31 09:52:10 -06:00
parent 2543ba04b5
commit dd6a22ccc4
2 changed files with 5 additions and 3 deletions

View File

@ -497,8 +497,10 @@ static void goto_addr(cpu_context *ctx, u16 addr, bool pushpc){
if(ctx->cur_inst->reg_1 != RT_HL)
emu_cycles(1);
if(pushpc) {
stack_push16(ctx->regs.pc);
emu_cycles(2);
stack_push((ctx->regs.pc >> 8) & 0xFF);
emu_cycles(1);
stack_push(ctx->regs.pc & 0xFF);
emu_cycles(1);
}
ctx->regs.pc = addr;
}