final touches
This commit is contained in:
parent
71cab2023e
commit
b7f454652e
1 changed files with 2 additions and 10 deletions
|
@ -1,7 +1,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h> // for the uintx_t's
|
#include <stdint.h> // for the uint8_t's
|
||||||
#include <unistd.h> // for sleep
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
@ -1565,7 +1564,6 @@ void read_Space_Invaders_ROM(State8080* state, const char* filename, int offset)
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct cpu_data {
|
typedef struct cpu_data {
|
||||||
char done;
|
|
||||||
int total_cycles_count;
|
int total_cycles_count;
|
||||||
GtkWidget* drawing_area;
|
GtkWidget* drawing_area;
|
||||||
State8080 *state;
|
State8080 *state;
|
||||||
|
@ -1575,7 +1573,7 @@ typedef struct cpu_data {
|
||||||
|
|
||||||
void *cpu(void* arg) {
|
void *cpu(void* arg) {
|
||||||
cpu_data *cpu = (cpu_data*) arg;
|
cpu_data *cpu = (cpu_data*) arg;
|
||||||
char done = cpu->done;
|
char done = 0;
|
||||||
State8080* state = cpu->state;
|
State8080* state = cpu->state;
|
||||||
int counter;
|
int counter;
|
||||||
|
|
||||||
|
@ -1784,7 +1782,6 @@ int main (int argc, char *argv[]) {
|
||||||
cpu_data *cpu_eco = malloc(sizeof(cpu_data));
|
cpu_data *cpu_eco = malloc(sizeof(cpu_data));
|
||||||
cpu_eco->state = state;
|
cpu_eco->state = state;
|
||||||
cpu_eco->drawing_area = drawing_area;
|
cpu_eco->drawing_area = drawing_area;
|
||||||
cpu_eco->done = 0;
|
|
||||||
cpu_eco->total_cycles_count = 0;
|
cpu_eco->total_cycles_count = 0;
|
||||||
|
|
||||||
// Pthread
|
// Pthread
|
||||||
|
@ -1795,10 +1792,5 @@ int main (int argc, char *argv[]) {
|
||||||
// Main GTK Loop
|
// Main GTK Loop
|
||||||
g_timeout_add(50, update_ui, drawing_area);
|
g_timeout_add(50, update_ui, drawing_area);
|
||||||
gtk_main();
|
gtk_main();
|
||||||
// cpu_eco->done = 1;
|
|
||||||
// pthread_join(pid, NULL);
|
|
||||||
// free(state->memory);
|
|
||||||
// free(state);
|
|
||||||
// free(cpu_eco);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
Reference in a new issue