passing call timings
This commit is contained in:
@ -19,7 +19,7 @@ FILE *log;
|
||||
void cpu_init() {
|
||||
ctx.regs.a = 0x01;
|
||||
ctx.regs.f = 0xB0;
|
||||
ctx.regs.b = 0x19;
|
||||
ctx.regs.b = 0x0;
|
||||
ctx.regs.c = 0x13;
|
||||
ctx.regs.d = 0x00;
|
||||
ctx.regs.e = 0xD8;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user