diff --git a/e6502.c b/e6502.c index 4921282..3ce93b2 100644 --- a/e6502.c +++ b/e6502.c @@ -933,8 +933,8 @@ int e6502_run(e6502_Core* core, int instructions) { int status = 0; int i_count = 0; - int start = (instructions ? i_count : core->cycle); - int end = start + remaining; + uint64_t start = (instructions ? i_count : core->cycle); + uint64_t end = start + remaining; int last_pc = -1; while ((instructions ? i_count : core->cycle) < end) { #ifdef E6502_HCF diff --git a/e6502.h b/e6502.h index 99787a8..ab865b7 100644 --- a/e6502.h +++ b/e6502.h @@ -45,7 +45,7 @@ typedef struct { e6502_Write* bus_write; void* bus_context; #endif - int cycle; + uint64_t cycle; } e6502_Core; #define e6502_Memory_Stack (0x0100U)