diff --git a/src/bdmsupport.c b/src/bdmsupport.c index 27710d91f..43c346df2 100644 --- a/src/bdmsupport.c +++ b/src/bdmsupport.c @@ -506,7 +506,10 @@ void bdmLaunchGame(item_list_t *itemList, int id, config_set_t *configSet) LOG("bdm pre sysLaunchLoaderElf\n"); if (!strcmp(bdmCurrentDriver, "usb")) { settings->common.fakemodule_flags |= FAKE_MODULE_FLAG_USBD; - sysLaunchLoaderElf(filename, "BDM_USB_MODE", irx_size, irx, size_mcemu_irx, bdm_mcemu_irx, EnablePS2Logo, compatmask); + if (settings->bdDeviceId == 0) + sysLaunchLoaderElf(filename, "BDM_USB_MODE0", irx_size, irx, size_mcemu_irx, bdm_mcemu_irx, EnablePS2Logo, compatmask); + else + sysLaunchLoaderElf(filename, "BDM_USB_MODE1", irx_size, irx, size_mcemu_irx, bdm_mcemu_irx, EnablePS2Logo, compatmask); } else if (!strcmp(bdmCurrentDriver, "sd") && strlen(bdmCurrentDriver) == 2) { settings->common.fakemodule_flags |= 0 /* TODO! fake ilinkman ? */; sysLaunchLoaderElf(filename, "BDM_ILK_MODE", irx_size, irx, size_mcemu_irx, bdm_mcemu_irx, EnablePS2Logo, compatmask); diff --git a/src/system.c b/src/system.c index 20c9bee65..d4edb2916 100644 --- a/src/system.c +++ b/src/system.c @@ -464,12 +464,15 @@ static unsigned int sendIrxKernelRAM(const char *startup, const char *mode_str, irxtab_t *irxtable; irxptr_t *irxptr_tab; void *irxptr, *ioprp_image; - int i, modcount; + int i, modcount, devId = 0; unsigned int curIrxSize, size_ioprp_image, total_size; - if (!strcmp(mode_str, "BDM_USB_MODE")) + if (!strcmp(mode_str, "BDM_USB_MODE0")) modules |= CORE_IRX_USB; - else if (!strcmp(mode_str, "BDM_ILK_MODE")) + else if (!strcmp(mode_str, "BDM_USB_MODE1")) { + modules |= CORE_IRX_USB; + devId = 1; + } else if (!strcmp(mode_str, "BDM_ILK_MODE")) modules |= CORE_IRX_ILINK; else if (!strcmp(mode_str, "BDM_M4S_MODE")) modules |= CORE_IRX_MX4SIO; @@ -507,10 +510,13 @@ static unsigned int sendIrxKernelRAM(const char *startup, const char *mode_str, irxptr_tab[modcount++].ptr = (void *)&usbd_irx; } if (modules & CORE_IRX_USB) { - //irxptr_tab[modcount].info = size_usbmass_bd_irx | SET_OPL_MOD_ID(OPL_MODULE_ID_USBMASSBD); - //irxptr_tab[modcount++].ptr = (void *)&usbmass_bd_irx; - irxptr_tab[modcount].info = size_usbmass_bd_single_irx | SET_OPL_MOD_ID(OPL_MODULE_ID_USBMASSBD); - irxptr_tab[modcount++].ptr = (void *)&usbmass_bd_single_irx; + if (devId) { + irxptr_tab[modcount].info = size_usbmass_bd_irx | SET_OPL_MOD_ID(OPL_MODULE_ID_USBMASSBD); + irxptr_tab[modcount++].ptr = (void *)&usbmass_bd_irx; + } else{ + irxptr_tab[modcount].info = size_usbmass_bd_single_irx | SET_OPL_MOD_ID(OPL_MODULE_ID_USBMASSBD); + irxptr_tab[modcount++].ptr = (void *)&usbmass_bd_single_irx; + } } if (modules & CORE_IRX_ILINK) { irxptr_tab[modcount].info = size_iLinkman_irx | SET_OPL_MOD_ID(OPL_MODULE_ID_ILINK);