uint64_t trig_irq = 0, serv_irq = 0;
uint16_t irq_delay = 0;
+unsigned int amiga_reset=0, amiga_reset_last=0;
+unsigned int do_reset=0;
void *ipl_task(void *args) {
printf("IPL thread running\n");
//usleep(0);
}
}
+ if(do_reset==0)
+ {
+ amiga_reset=(value & (1 << PIN_RESET));
+ if(amiga_reset!=amiga_reset_last)
+ {
+ amiga_reset_last=amiga_reset;
+ if(amiga_reset==0)
+ {
+ printf("Amiga Reset is down...\n");
+ do_reset=1;
+ M68K_END_TIMESLICE;
+ }
+ else
+ {
+ printf("Amiga Reset is up...\n");
+ }
+ }
+ }
/*if (gayle_ide_enabled) {
if (((gayle_int & 0x80) || gayle_a4k_int) && (get_ide(0)->drive[0].intrq || get_ide(0)->drive[1].intrq)) {
last_irq = 0;
}
}*/
+ if (do_reset) {
+ cpu_pulse_reset();
+ m68k_pulse_reset();
+ do_reset=0;
+ usleep(1000000); // 1sec
+// while(amiga_reset==0);
+// printf("CPU emulation reset.\n");
+ }
+
if (mouse_hook_enabled && (mouse_extra != 0x00)) {
// mouse wheel events have occurred; unlike l/m/r buttons, these are queued as keypresses, so add to end of buffer