mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
europc: Onboard FDC is a WD37C65 (nw)
This commit is contained in:
parent
4a6f5ee78f
commit
933ab29627
@ -31,6 +31,7 @@
|
||||
#include "emu.h"
|
||||
#include "cpu/i86/i86.h"
|
||||
#include "bus/isa/aga.h"
|
||||
#include "bus/isa/fdc.h"
|
||||
#include "machine/genpc.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/pckeybrd.h"
|
||||
@ -91,7 +92,6 @@ private:
|
||||
{
|
||||
TIMER_RTC
|
||||
};
|
||||
static void cfg_builtin_720K(device_t *device);
|
||||
void europc_io(address_map &map);
|
||||
void europc_map(address_map &map);
|
||||
};
|
||||
@ -514,12 +514,41 @@ void europc_pc_state::europc_io(address_map &map)
|
||||
map(0x02e0, 0x02e0).r(FUNC(europc_pc_state::europc_jim2_r));
|
||||
}
|
||||
|
||||
/* single built-in 3.5" 720K drive, connector for optional external 3.5" or 5.25" drive */
|
||||
void europc_pc_state::cfg_builtin_720K(device_t *device)
|
||||
class europc_fdc_device : public isa8_fdc_device
|
||||
{
|
||||
dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_default_option("35dd");
|
||||
dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_fixed(true);
|
||||
dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:1")).set_default_option("");
|
||||
public:
|
||||
europc_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
};
|
||||
|
||||
DEFINE_DEVICE_TYPE(EUROPC_FDC, europc_fdc_device, "europc_fdc", "EURO PC FDC hookup")
|
||||
|
||||
europc_fdc_device::europc_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: isa8_fdc_device(mconfig, EUROPC_FDC, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
static void pc_dd_floppies(device_slot_interface &device)
|
||||
{
|
||||
device.option_add("525dd", FLOPPY_525_DD);
|
||||
device.option_add("35dd", FLOPPY_35_DD);
|
||||
}
|
||||
|
||||
void europc_fdc_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
wd37c65c_device &fdc(WD37C65C(config, m_fdc, 16_MHz_XTAL));
|
||||
fdc.intrq_wr_callback().set(FUNC(isa8_fdc_device::irq_w));
|
||||
fdc.drq_wr_callback().set(FUNC(isa8_fdc_device::drq_w));
|
||||
// single built-in 3.5" 720K drive, connector for optional external 3.5" or 5.25" drive
|
||||
FLOPPY_CONNECTOR(config, "fdc:0", pc_dd_floppies, "35dd", isa8_fdc_device::floppy_formats).set_fixed(true);
|
||||
FLOPPY_CONNECTOR(config, "fdc:1", pc_dd_floppies, "", isa8_fdc_device::floppy_formats);
|
||||
}
|
||||
|
||||
static void europc_fdc(device_slot_interface &device)
|
||||
{
|
||||
device.option_add("fdc", EUROPC_FDC);
|
||||
}
|
||||
|
||||
//Euro PC
|
||||
@ -536,8 +565,7 @@ MACHINE_CONFIG_START(europc_pc_state::europc)
|
||||
MCFG_SLOT_FIXED(true)
|
||||
MCFG_DEVICE_ADD("isa3", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "com", false)
|
||||
MCFG_SLOT_FIXED(true)
|
||||
MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "fdc_xt", false)
|
||||
MCFG_SLOT_OPTION_MACHINE_CONFIG("fdc_xt", cfg_builtin_720K)
|
||||
MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, "mb:isa", europc_fdc, "fdc", false)
|
||||
MCFG_SLOT_FIXED(true)
|
||||
MCFG_PC_KEYB_ADD("pc_keyboard", WRITELINE("mb:pic8259", pic8259_device, ir1_w))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user