diff --git a/machines/machinepdm.cpp b/machines/machinepdm.cpp index 3681e57..2da1fb2 100644 --- a/machines/machinepdm.cpp +++ b/machines/machinepdm.cpp @@ -27,6 +27,7 @@ along with this program. If not, see . #include #include #include +#include #include #include #include @@ -80,6 +81,11 @@ int initialize_pdm(std::string& id) // add internal SCSI bus gMachineObj->add_device("SCSI0", std::unique_ptr(new ScsiBus())); + auto scsi_bus = dynamic_cast(gMachineObj->get_comp_by_name("SCSI0")); + + // attach SCSI HD to the main bus, ID #0 + gMachineObj->add_device("SCSI_HD", std::unique_ptr(new ScsiHardDisk())); + scsi_bus->register_device(0, dynamic_cast(gMachineObj->get_comp_by_name("SCSI_HD"))); // Init virtual CPU and request MPC601 ppc_cpu_init(hmc_obj, PPC_VER::MPC601, 7812500ULL);