working on interrupt timings
This commit is contained in:
@ -1,9 +1,13 @@
|
|||||||
#include <interrupts.h>
|
#include <interrupts.h>
|
||||||
#include <stack.h>
|
#include <stack.h>
|
||||||
|
#include <emu.h>
|
||||||
|
|
||||||
void int_handle(cpu_context *ctx, u16 address) {
|
void int_handle(cpu_context *ctx, u16 address) {
|
||||||
|
emu_cycles(2);
|
||||||
stack_push16(ctx->regs.pc);
|
stack_push16(ctx->regs.pc);
|
||||||
|
emu_cycles(2);
|
||||||
ctx->regs.pc = address;
|
ctx->regs.pc = address;
|
||||||
|
emu_cycles(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool int_check(cpu_context *ctx, u16 address, interrupt_type t){
|
bool int_check(cpu_context *ctx, u16 address, interrupt_type t){
|
||||||
|
Reference in New Issue
Block a user