Skip to content

Commit

Permalink
Reset ARM object on system reset instead of recreating it
Browse files Browse the repository at this point in the history
  • Loading branch information
calc84maniac committed Sep 15, 2024
1 parent 1f10dc5 commit 7557319
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions core/coproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ coproc_state_t coproc;

void coproc_reset(void) {
gui_console_printf("[CEmu] Reset Coprocessor Interface...\n");
arm_destroy(coproc.arm);
memset(&coproc, 0, sizeof(coproc));
if (asic.python) {
if (asic.python && !coproc.arm) {
coproc.arm = arm_create();
}
if (coproc.arm) {
if (asic.python) {
arm_reset(coproc.arm);
} else {
arm_destroy(coproc.arm);
memset(&coproc, 0, sizeof(coproc));
}
}
}

bool coproc_load(const char *path) {
Expand Down

0 comments on commit 7557319

Please sign in to comment.