summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/mac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/mac.cpp')
-rw-r--r--src/mame/drivers/mac.cpp53
1 files changed, 40 insertions, 13 deletions
diff --git a/src/mame/drivers/mac.cpp b/src/mame/drivers/mac.cpp
index b9b19e71059..9137200bce1 100644
--- a/src/mame/drivers/mac.cpp
+++ b/src/mame/drivers/mac.cpp
@@ -62,6 +62,10 @@
#include "machine/swim.h"
#include "machine/sonydriv.h"
#include "formats/ap_dsk35.h"
+#include "machine/iwm.h"
+#include "machine/swim1.h"
+#include "machine/swim2.h"
+#include "machine/swim3.h"
#include "bus/scsi/scsi.h"
#include "bus/scsi/scsihd.h"
#include "bus/scsi/scsicd.h"
@@ -726,16 +730,39 @@ static const floppy_interface mac_floppy_interface =
"floppy_3_5"
};
-void mac_state::add_base_devices(machine_config &config, bool rtc, bool super_woz)
+void mac_state::add_base_devices(machine_config &config, bool rtc, int woz_version)
{
if (rtc)
RTC3430042(config, m_rtc, XTAL(32'768));
- if (super_woz)
+#if NEW_SWIM
+ switch (woz_version) {
+ case 0:
+ IWM(config, m_fdc, C7M, 1021800*2);
+ break;
+ case 1:
+ SWIM1(config, m_fdc, C15M);
+ break;
+ case 2:
+ SWIM2(config, m_fdc, C15M);
+ break;
+ case 3:
+ SWIM3(config, m_fdc, C15M);
+ break;
+ }
+
+ m_fdc->phases_cb().set([this](u8 data) { logerror("fdc phases = %x\n", data);});
+ m_fdc->sel35_cb().set([this](int data) { logerror("fdc sel35 = %d\n", data);});
+
+ applefdintf_device::add_35(config, m_floppy[0]);
+ applefdintf_device::add_35_nc(config, m_floppy[1]);
+#else
+ if (woz_version)
LEGACY_SWIM(config, m_fdc, &mac_iwm_interface);
else
LEGACY_IWM(config, m_fdc, &mac_iwm_interface);
sonydriv_floppy_image_device::legacy_2_drives_add(config, &mac_floppy_interface);
+#endif
SCC8530(config, m_scc, C7M);
m_scc->intrq_callback().set(FUNC(mac_state::set_scc_interrupt));
@@ -851,7 +878,7 @@ template <typename T> void mac_state::add_nubus_pds(machine_config &config, cons
NUBUS_SLOT(config, slot_tag, "pds", std::forward<T>(opts), nullptr);
}
-void mac_state::macii(machine_config &config, bool cpu, asc_device::asc_type asc_type, bool nubus, bool nubus_bank1, bool nubus_bank2)
+void mac_state::macii(machine_config &config, bool cpu, asc_device::asc_type asc_type, bool nubus, bool nubus_bank1, bool nubus_bank2, int woz_version)
{
if (cpu)
{
@@ -863,7 +890,7 @@ void mac_state::macii(machine_config &config, bool cpu, asc_device::asc_type asc
PALETTE(config, m_palette).set_entries(256);
add_asc(config, asc_type);
- add_base_devices(config);
+ add_base_devices(config, true, woz_version);
add_scsi(config, true);
if (nubus)
add_nubus(config, nubus_bank1, nubus_bank2);
@@ -900,7 +927,7 @@ void mac_state::maciifx(machine_config &config)
m_maincpu->set_dasm_override(FUNC(mac_state::mac_dasm_override));
add_asc(config, asc_device::asc_type::ASC);
- add_base_devices(config);
+ add_base_devices(config, true, 1);
add_scsi(config);
VIA6522(config, m_via1, C7M/10);
@@ -920,9 +947,9 @@ void mac_state::maciifx(machine_config &config)
add_nubus(config);
}
-void mac_state::maclc(machine_config &config, bool cpu, bool egret, asc_device::asc_type asc_type)
+void mac_state::maclc(machine_config &config, bool cpu, bool egret, asc_device::asc_type asc_type, int woz_version)
{
- macii(config, false, asc_type, false);
+ macii(config, false, asc_type, false, true, true, woz_version);
if (cpu)
{
@@ -955,9 +982,9 @@ void mac_state::maclc(machine_config &config, bool cpu, bool egret, asc_device::
}
}
-void mac_state::maclc2(machine_config &config, bool egret)
+void mac_state::maclc2(machine_config &config, bool egret, int woz_version)
{
- maclc(config, false, egret);
+ maclc(config, false, egret, asc_device::asc_type::V8, woz_version);
M68030(config, m_maincpu, C15M);
m_maincpu->set_addrmap(AS_PROGRAM, &mac_state::maclc_map);
@@ -969,7 +996,7 @@ void mac_state::maclc2(machine_config &config, bool egret)
void mac_state::maccclas(machine_config &config)
{
- maclc(config, false, false, asc_device::asc_type::VASP);
+ maclc(config, false, false, asc_device::asc_type::VASP, 2);
M68030(config, m_maincpu, C15M);
m_maincpu->set_addrmap(AS_PROGRAM, &mac_state::maclc_map);
@@ -984,7 +1011,7 @@ void mac_state::maccclas(machine_config &config)
void mac_state::maclc3(machine_config &config, bool egret)
{
- maclc(config, false, false, asc_device::asc_type::SONORA);
+ maclc(config, false, false, asc_device::asc_type::SONORA, 2);
M68030(config, m_maincpu, 25000000);
m_maincpu->set_addrmap(AS_PROGRAM, &mac_state::maclc3_map);
@@ -1075,7 +1102,7 @@ void mac_state::macse30(machine_config &config)
MCFG_VIDEO_START_OVERRIDE(mac_state,mac)
- add_base_devices(config, true, true);
+ add_base_devices(config, true, 1);
add_asc(config, asc_device::asc_type::ASC);
add_scsi(config);
@@ -1195,7 +1222,7 @@ void mac_state::pwrmac(machine_config &config)
m_awacs->add_route(1, "rspeaker", 1.0);
add_scsi(config);
- add_base_devices(config, false, false);
+ add_base_devices(config, false, 3);
add_via1_adb(config, false);
m_via1->writepb_handler().set(FUNC(mac_state::mac_via_out_b_cdadb));