diff --git a/devices/common/scsi/mesh.cpp b/devices/common/scsi/mesh.cpp index a3b3cca..94b6f0c 100644 --- a/devices/common/scsi/mesh.cpp +++ b/devices/common/scsi/mesh.cpp @@ -262,8 +262,13 @@ void MeshController::update_irq() } } -static const DeviceDescription Mesh_Descriptor = { - MeshController::create, {}, {} +static const DeviceDescription Mesh_Tnt_Descriptor = { + MeshController::create_for_tnt, {}, {} }; -REGISTER_DEVICE(Mesh, Mesh_Descriptor); +static const DeviceDescription Mesh_Heathrow_Descriptor = { + MeshController::create_for_heathrow, {}, {} +}; + +REGISTER_DEVICE(MeshTnt, Mesh_Tnt_Descriptor); +REGISTER_DEVICE(MeshHeathrow, Mesh_Heathrow_Descriptor); diff --git a/devices/common/scsi/mesh.h b/devices/common/scsi/mesh.h index 2030f04..2695fe0 100644 --- a/devices/common/scsi/mesh.h +++ b/devices/common/scsi/mesh.h @@ -32,6 +32,9 @@ along with this program. If not, see . class InterruptCtrl; class ScsiBus; +// Chip ID returned by the MESH ASIC on TNT machines (Apple part 343S1146-a) +#define TntMeshID 0xE2 + // Chip ID returned by the MESH cell inside the Heathrow ASIC #define HeathrowMESHID 4 @@ -115,7 +118,11 @@ public: }; ~MeshController() = default; - static std::unique_ptr create() { + static std::unique_ptr create_for_tnt() { + return std::unique_ptr(new MeshController(TntMeshID)); + } + + static std::unique_ptr create_for_heathrow() { return std::unique_ptr(new MeshController(HeathrowMESHID)); } diff --git a/devices/ioctrl/heathrow.cpp b/devices/ioctrl/heathrow.cpp index 908b38e..329db24 100644 --- a/devices/ioctrl/heathrow.cpp +++ b/devices/ioctrl/heathrow.cpp @@ -78,7 +78,7 @@ HeathrowIC::HeathrowIC() : PCIDevice("mac-io/heathrow"), InterruptCtrl() ); // connect SCSI HW and the corresponding DMA channel - this->mesh = dynamic_cast(gMachineObj->get_comp_by_name("Mesh")); + this->mesh = dynamic_cast(gMachineObj->get_comp_by_name("MeshHeathrow")); this->scsi_dma = std::unique_ptr (new DMAChannel()); // connect IDE HW @@ -548,7 +548,7 @@ void HeathrowIC::clear_cpu_int() } static const vector Heathrow_Subdevices = { - "NVRAM", "ViaCuda", "Scsi0", "Mesh", "Escc", "Swim3", "Ide0", "Ide1", + "NVRAM", "ViaCuda", "Scsi0", "MeshHeathrow", "Escc", "Swim3", "Ide0", "Ide1", "BigMacHeathrow" };