Previous 15994 Revisions Next

r15120 Monday 7th May, 2012 at 22:09:17 UTC by R. Belmont
Apollo: Properly reset all motherboard devices on a 68k RESET instruction; makes the PROM "RE" command work properly. [Hans Ostermeyer]
[src/mess/drivers]apollo.c
[src/mess/machine]apollo.c pc_fdc.c pc_fdc.h

src/mess/machine/apollo.c
r15119r15120
13061306   DLOG1(("device_start_apollo_fdc"));
13071307   apollo_fdc_device = device;
13081308   pc_fdc_init(device->machine(), &apollo_fdc_interface);
1309}
13091310
1310   // hack to make upd765.c work again for apollo with MESS version >= 0.142u6
1311   // 2011-07-23 Hans Ostermyer
1312//  extern void upd765_hack_for_apollo();
1313//  upd765_hack_for_apollo();
1311static DEVICE_RESET( apollo_fdc ) {
1312   DLOG1(("device_reset_apollo_fdc"));
1313   pc_fdc_reset(device->machine());
13141314}
13151315
13161316WRITE8_MEMBER(apollo_state::apollo_fdc_w){
r15119r15120
14251425    MCFG_DUART68681_ADD( APOLLO_SIO2_TAG, XTAL_3_6864MHz, apollo_sio2_config )
14261426
14271427   MCFG_UPD765A_ADD(APOLLO_FDC_TAG, pc_fdc_upd765_connected_1_drive_interface)
1428#ifdef MCFG_FLOPPY_DRIVE_ADD
1429   MCFG_FLOPPY_DRIVE_ADD(FLOPPY_0, apollo_fdc_floppy_config)
1430#else
14311428   MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, apollo_fdc_floppy_config)
1432#endif
1429
14331430   MCFG_OMTI8621_ADD(APOLLO_WDC_TAG, apollo_wdc_config)
14341431   MCFG_SC499_ADD(APOLLO_CTAPE_TAG, apollo_ctape_config)
14351432   MCFG_THREECOM3C505_ADD(APOLLO_ETH_TAG, apollo_3c505_config)
r15119r15120
14741471   device_reset_apollo_rtc(machine.device(APOLLO_RTC_TAG));
14751472   device_reset_apollo_sio(machine.device(APOLLO_SIO_TAG));
14761473   device_reset_apollo_sio2(machine.device(APOLLO_SIO2_TAG));
1474   device_reset_apollo_fdc(apollo_fdc_device);
14771475}
src/mess/machine/pc_fdc.c
r15119r15120
103103   return (*fdc->fdc_interface.get_device)(machine);
104104}
105105
106static void pc_fdc_reset(running_machine &machine)
106void pc_fdc_reset(running_machine &machine)
107107{
108108   /* setup reset condition */
109109   fdc->data_rate_register = 2;
src/mess/machine/pc_fdc.h
r15119r15120
3737extern const upd765_interface pc_fdc_upd765_connected_1_drive_interface;
3838extern const upd765_interface pcjr_fdc_upd765_interface;
3939
40void pc_fdc_reset(running_machine &machine);
4041void pc_fdc_init(running_machine &machine, const struct pc_fdc_interface *iface);
4142void pc_fdc_set_tc_state(running_machine &machine, int state);
4243int   pc_fdc_dack_r(running_machine &machine);
src/mess/drivers/apollo.c
r15119r15120
10371037
10381038static void apollo_reset_instr_callback(device_t *device)
10391039{
1040   apollo_state *apollo = device->machine().driver_data<apollo_state>();
1040   running_machine &machine = device->machine();
1041   apollo_state *apollo = machine.driver_data<apollo_state>();
10411042
10421043   DLOG1(("apollo_reset_instr_callback"));
10431044
1044    // reset non-CPU devices here
1045   // reset the CPU board devices
1046   MACHINE_RESET_CALL(apollo);
1047   apollo->dma8237_1->reset();
1048   apollo->dma8237_2->reset();
1049   apollo->pic8259_master->reset();
1050   apollo->pic8259_slave->reset();
1051
1052    // reset the ISA bus devices
10451053    apollo->m_ctape->device_reset();
1054   machine.device(APOLLO_ETH_TAG)->reset();
1055   machine.device(APOLLO_WDC_TAG)->reset();
10461056
1047    // HACK: should go through our devices and just reset those, not the entire machine object.
1048   device->machine().schedule_soft_reset();
1057   if (!apollo_is_dsp3x00())
1058   {
1059      machine.device(APOLLO_SCREEN_TAG)->reset();
1060      machine.device(APOLLO_KBD_TAG )->reset();
1061   }
10491062}
10501063
10511064/***************************************************************************

Previous 15994 Revisions Next


© 1998-2018 The MESS Team