diff --git a/src/mess/drivers/apple3.c b/src/mess/drivers/apple3.c index acc3ab1dff0..a66c2d7084b 100644 --- a/src/mess/drivers/apple3.c +++ b/src/mess/drivers/apple3.c @@ -293,4 +293,4 @@ ROM_START(apple3) ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ -COMP( 1980, apple3, 0, 0, apple3, apple3, apple3_state, apple3, "Apple Computer", "Apple ///", GAME_NOT_WORKING ) +COMP( 1980, apple3, 0, 0, apple3, apple3, apple3_state, apple3, "Apple Computer", "Apple ///", 0 ) diff --git a/src/mess/includes/apple3.h b/src/mess/includes/apple3.h index 3a6cdde7b5a..ed4c54c403e 100644 --- a/src/mess/includes/apple3.h +++ b/src/mess/includes/apple3.h @@ -112,6 +112,7 @@ public: DECLARE_WRITE_LINE_MEMBER(ay3600_data_ready_w); bool m_sync; + bool m_rom_has_been_disabled; UINT8 m_indir_opcode; int m_indir_count; diff --git a/src/mess/machine/apple3.c b/src/mess/machine/apple3.c index 154875cd6be..edccce47e15 100644 --- a/src/mess/machine/apple3.c +++ b/src/mess/machine/apple3.c @@ -346,9 +346,17 @@ void apple3_state::apple3_update_memory() /* install bank 7 (F000-FFFF) */ if (m_via_0_a & 0x01) + { m_bank7 = memregion("maincpu")->base(); + } else + { + m_rom_has_been_disabled = true; m_bank7 = apple3_bankaddr(~0, 0x7000); + + // if we had an IRQ waiting for RAM to be paged in... + apple3_irq_update(); + } } @@ -388,7 +396,18 @@ void apple3_state::apple3_irq_update() { if (m_via_1_irq || m_via_0_irq) { -// printf(" asserting IRQ\n"); + // HACK: SOS floppy driver enables ROM at Fxxx *before* trying to + // suppress IRQs. IRQ hits at inopportune time -> bad vector -> system crash. + // This breaks the Confidence Test, but the Confidence Test + // never disables the ROM so checking for that gets us + // working in all cases. + // Bonus points: for some reason this isn't a problem with -debug. + // m6502 heisenbug maybe? + if ((m_via_0_a & 0x01) && (m_rom_has_been_disabled)) + { + return; + } +// printf(" setting IRQ\n"); m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE); m_via_1->write_pa7(0); // this is active low } @@ -424,6 +443,7 @@ MACHINE_RESET_MEMBER(apple3_state,apple3) m_c040_time = 0; m_strobe = 0; m_lastchar = 0x0d; + m_rom_has_been_disabled = false; }