Revert "Tomasulo-certified IRQ bullshit"

This reverts commit 1b5f967dfc35fb0ab4b36f6f085de05ee2f95dc6.
This commit is contained in:
beeanyew 2021-09-09 15:48:03 +02:00
parent c4efbbb4c9
commit 96f61cdf30
2 changed files with 7 additions and 17 deletions

View File

@ -67,7 +67,7 @@ extern uint8_t realtime_graphics_debug, emulator_exiting;
extern uint8_t rtg_on;
uint8_t realtime_disassembly, int2_enabled = 0;
uint32_t do_disasm = 0, old_level;
uint32_t last_irq = 0, last_last_irq = 0;
uint32_t last_irq = 8, last_last_irq = 8;
uint8_t ipl_enabled[8];
@ -125,14 +125,10 @@ unsigned int do_reset=0;
void *ipl_task(void *args) {
printf("IPL thread running\n");
uint16_t old_irq = 0;
uint32_t value, prev_value = 0xFFFFFFFF;
uint32_t value;
while (1) {
value = *(gpio + 13);
if (value != prev_value) {
prev_value = value;
goto noppers;
}
if (value & (1 << PIN_TXN_IN_PROGRESS))
goto noppers;
@ -276,7 +272,6 @@ void *cpu_task() {
state->gpio = gpio;
m68k_pulse_reset(state);
cpu_loop:
if (mouse_hook_enabled) {
get_mouse_status(&mouse_dx, &mouse_dy, &mouse_buttons, &mouse_extra);
@ -304,22 +299,18 @@ cpu_loop:
if (irq) {
last_irq = ((ps_read_status_reg() & 0xe000) >> 13);
if (!irq) {
last_irq = 0;
}
uint8_t amiga_irq = amiga_emulated_ipl();
if (amiga_irq >= last_irq) {
last_irq = amiga_irq;
}
}
if (last_irq != 0 && last_irq != last_last_irq) {
last_last_irq = last_irq;
M68K_SET_IRQ(last_irq);
if (last_irq != 0 && last_irq != last_last_irq) {
last_last_irq = last_irq;
M68K_SET_IRQ(last_irq);
}
}
if (!irq && last_last_irq != 0) {
M68K_SET_IRQ(0);
last_last_irq = 0;
last_irq = 0;
}
if (do_reset) {
@ -748,7 +739,6 @@ void cpu_pulse_reset(void) {
unsigned int cpu_irq_ack(int level) {
//printf("cpu irq ack\n");
CPU_INT_LEVEL = 0;
return 24 + level;
}

View File

@ -91,7 +91,7 @@
* auto-clear when the interrupt is serviced.
*/
#define M68K_EMULATE_INT_ACK OPT_SPECIFY_HANDLER
#define M68K_INT_ACK_CALLBACK(a) cpu_irq_ack(a)
#define M68K_INT_ACK_CALLBACK(...) 0xFFFFFFFF
/* If ON, CPU will call the breakpoint acknowledge callback when it encounters