From b7f454652e6df43f7f75bd8ed1e2359a675f333e Mon Sep 17 00:00:00 2001 From: Luxdragon Date: Sat, 20 Jan 2024 19:43:16 +0100 Subject: [PATCH] final touches --- emulator_shell.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/emulator_shell.c b/emulator_shell.c index f2a3ee8..103ed0f 100644 --- a/emulator_shell.c +++ b/emulator_shell.c @@ -1,7 +1,6 @@ #include #include -#include // for the uintx_t's -#include // for sleep +#include // for the uint8_t's #include #include @@ -1565,7 +1564,6 @@ void read_Space_Invaders_ROM(State8080* state, const char* filename, int offset) } typedef struct cpu_data { - char done; int total_cycles_count; GtkWidget* drawing_area; State8080 *state; @@ -1575,7 +1573,7 @@ typedef struct cpu_data { void *cpu(void* arg) { cpu_data *cpu = (cpu_data*) arg; - char done = cpu->done; + char done = 0; State8080* state = cpu->state; int counter; @@ -1784,7 +1782,6 @@ int main (int argc, char *argv[]) { cpu_data *cpu_eco = malloc(sizeof(cpu_data)); cpu_eco->state = state; cpu_eco->drawing_area = drawing_area; - cpu_eco->done = 0; cpu_eco->total_cycles_count = 0; // Pthread @@ -1795,10 +1792,5 @@ int main (int argc, char *argv[]) { // Main GTK Loop g_timeout_add(50, update_ui, drawing_area); gtk_main(); - // cpu_eco->done = 1; - // pthread_join(pid, NULL); - // free(state->memory); - // free(state); - // free(cpu_eco); return 0; } \ No newline at end of file