Skip to content

Commit

Permalink
sloppy
Browse files Browse the repository at this point in the history
  • Loading branch information
KrahJohlito committed Sep 19, 2024
1 parent 3550eda commit ccc53f4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
5 changes: 4 additions & 1 deletion src/bdmsupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
20 changes: 13 additions & 7 deletions src/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ccc53f4

Please sign in to comment.