trunk/src/mess/includes/apollo.h
| r20862 | r20863 | |
| 112 | 112 | public: |
| 113 | 113 | apollo_state(const machine_config &mconfig, device_type type, const char *tag) |
| 114 | 114 | : driver_device(mconfig, type, tag), |
| 115 | m_maincpu(*this, MAINCPU), |
| 115 | 116 | m_ctape(*this, APOLLO_CTAPE_TAG), |
| 116 | 117 | m_messram_ptr(*this, "messram") |
| 117 | 118 | { } |
| 118 | 119 | |
| 120 | required_device<cpu_device> m_maincpu; |
| 119 | 121 | required_device<sc499_device> m_ctape; |
| 120 | 122 | |
| 121 | 123 | device_t *dma8237_1; |
| r20862 | r20863 | |
| 189 | 191 | DECLARE_FLOPPY_FORMATS( floppy_formats ); |
| 190 | 192 | IRQ_CALLBACK_MEMBER(apollo_irq_acknowledge); |
| 191 | 193 | IRQ_CALLBACK_MEMBER(apollo_pic_acknowledge); |
| 194 | void apollo_bus_error(); |
| 192 | 195 | }; |
| 193 | 196 | |
| 194 | 197 | MACHINE_CONFIG_EXTERN( apollo ); |
trunk/src/mess/drivers/apollo.c
| r20862 | r20863 | |
| 270 | 270 | apollo bus error |
| 271 | 271 | ***************************************************************************/ |
| 272 | 272 | |
| 273 | | static void apollo_bus_error(running_machine &machine) |
| 273 | void apollo_state::apollo_bus_error() |
| 274 | 274 | { |
| 275 | | machine.device(MAINCPU)->execute().set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE); |
| 276 | | machine.device(MAINCPU)->execute().set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE); |
| 275 | m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE); |
| 276 | m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE); |
| 277 | 277 | |
| 278 | 278 | apollo_csr_set_status_register(APOLLO_CSR_SR_CPU_TIMEOUT, APOLLO_CSR_SR_CPU_TIMEOUT); |
| 279 | 279 | } |
| r20862 | r20863 | |
| 282 | 282 | { |
| 283 | 283 | int result = M68K_INT_ACK_AUTOVECTOR; |
| 284 | 284 | |
| 285 | | machine().device(MAINCPU)->execute().set_input_line(irqline, CLEAR_LINE); |
| 285 | m_maincpu->set_input_line(irqline, CLEAR_LINE); |
| 286 | 286 | |
| 287 | 287 | MLOG2(("apollo_irq_acknowledge: interrupt level=%d", irqline)); |
| 288 | 288 | |
| r20862 | r20863 | |
| 457 | 457 | if (apollo_csr_get_control_register() & APOLLO_CSR_CR_INTERRUPT_ENABLE) { |
| 458 | 458 | // force parity error (if NMI is enabled) |
| 459 | 459 | // cpu_set_input_line_and_vector(&space.device(), 7, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 460 | | machine().device(MAINCPU)->execute().set_input_line_and_vector(7, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 460 | m_maincpu->set_input_line_and_vector(7, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 461 | 461 | |
| 462 | 462 | } |
| 463 | 463 | } |
| r20862 | r20863 | |
| 533 | 533 | } |
| 534 | 534 | |
| 535 | 535 | /* unmapped; access causes a bus error */ |
| 536 | | apollo_bus_error(machine()); |
| 536 | apollo_bus_error(); |
| 537 | 537 | return 0xffffffff; |
| 538 | 538 | } |
| 539 | 539 | |
| r20862 | r20863 | |
| 542 | 542 | SLOG(("unmapped memory dword write to %08x = %08x & %08x", offset * 4, data, mem_mask)); |
| 543 | 543 | |
| 544 | 544 | /* unmapped; access causes a bus error */ |
| 545 | | apollo_bus_error(machine()); |
| 545 | apollo_bus_error(); |
| 546 | 546 | } |
| 547 | 547 | |
| 548 | 548 | /*************************************************************************** |
| r20862 | r20863 | |
| 1000 | 1000 | |
| 1001 | 1001 | void apollo_state::machine_reset() |
| 1002 | 1002 | { |
| 1003 | | device_t *cpu = machine().device(MAINCPU); |
| 1004 | | |
| 1005 | 1003 | //MLOG1(("machine_reset_dn3500")); |
| 1006 | 1004 | |
| 1007 | 1005 | MACHINE_RESET_CALL_MEMBER(apollo); |
| r20862 | r20863 | |
| 1030 | 1028 | } |
| 1031 | 1029 | } |
| 1032 | 1030 | |
| 1033 | | m68k_set_instruction_hook(cpu, apollo_instruction_hook); |
| 1031 | m68k_set_instruction_hook(m_maincpu, apollo_instruction_hook); |
| 1034 | 1032 | } |
| 1035 | 1033 | |
| 1036 | 1034 | static void apollo_reset_instr_callback(device_t *device) |
| r20862 | r20863 | |
| 1081 | 1079 | { |
| 1082 | 1080 | // MLOG1(("driver_init_dn3500")); |
| 1083 | 1081 | |
| 1084 | | machine().device(MAINCPU)->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(apollo_state::apollo_irq_acknowledge),this)); |
| 1082 | m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(apollo_state::apollo_irq_acknowledge),this)); |
| 1085 | 1083 | |
| 1086 | 1084 | /* hook the RESET line, which resets a slew of other components */ |
| 1087 | | m68k_set_reset_callback(machine().device(MAINCPU), apollo_reset_instr_callback); |
| 1085 | m68k_set_reset_callback(m_maincpu, apollo_reset_instr_callback); |
| 1088 | 1086 | |
| 1089 | 1087 | ram_base_address = DN3500_RAM_BASE; |
| 1090 | 1088 | ram_end_address = DN3500_RAM_END; |