Skip to content

Commit

Permalink
Attempt to fix pademu access.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolf3s committed Nov 10, 2024
1 parent 2d7e694 commit 0c824da
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ee_core/include/modules.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ enum OPL_MODULE_ID {

OPL_MODULE_ID_PADEMU,

// DS4/DS3 modules
OPL_MODULE_ID_DS34BT,
OPL_MODULE_ID_DS34USB,

// Debugging modules
OPL_MODULE_ID_UDPTTY,
OPL_MODULE_ID_IOPTRAP,
Expand Down
5 changes: 5 additions & 0 deletions ee_core/src/iopmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ int New_Reset_Iop(const char *arg, int arglen)
memcpy(args_for_pademu, &config->PadEmuSettings, 4);
memcpy(args_for_pademu + 4, &config->PadMacroSettings, 4);
LoadOPLModule(OPL_MODULE_ID_PADEMU, 0, sizeof(args_for_pademu), args_for_pademu);
if (config->PadEmuSettings & 0xFF) {
LoadOPLModule(OPL_MODULE_ID_DS34BT, 0, sizeof(args_for_pademu), args_for_pademu);
} else {
LoadOPLModule(OPL_MODULE_ID_DS34USB, 0, sizeof(args_for_pademu), args_for_pademu);
}
}
#endif

Expand Down
7 changes: 7 additions & 0 deletions src/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,13 @@ static unsigned int sendIrxKernelRAM(const char *startup, const char *mode_str,
if (gEnablePadEmu) {
irxptr_tab[modcount].info = size_pademu_irx | SET_OPL_MOD_ID(OPL_MODULE_ID_PADEMU);
irxptr_tab[modcount++].ptr = (void *)&pademu_irx;
if (gPadEmuSettings & 0xFF) {
irxptr_tab[modcount].info = size_ds34bt_irx | SET_OPL_MOD_ID(OPL_MODULE_ID_DS34BT);
irxptr_tab[modcount++].ptr = (void *)&size_ds34bt_irx;
} else {
irxptr_tab[modcount].info = size_ds34usb_irx | SET_OPL_MOD_ID(OPL_MODULE_ID_DS34USB);
irxptr_tab[modcount++].ptr = (void *)&ds34usb_irx;
}
}
#endif

Expand Down

0 comments on commit 0c824da

Please sign in to comment.