Repository navigation
SIO2MAN Compatibility
NathanNeurotic (Ripto) edited this page Oct 28, 2026
·
5 revisions
PlayStation 2 games and IOP modules can register either or both sio2man export tables:
-
sio2manv1 (0x100family), where the second transfer entry is export#49. -
sio2manv2 (0x200family), where the second transfer entry is export#51andsio2_mtap_change_slot_setshifts later entries. - PS2SDK
sio2man, which registers both v1 (0x101) and v2 (0x201) tables so older and newer IOP modules can bind against the same driver.
Before this fix:
-
mcemuandpademustored only one set of originalsio2manfunction pointers (pSio2man25,pSio2man51,psio2_mc_transfer_init,psio2_transfer_reset). When asio2manimplementation registered both v1 and v2 export tables, hooking the second table overwrote the saved callbacks for the first table. -
StartNow()andinstall_sio2hook()only looked upsio2manversion0x201. If a v1 table was already resident before hooks were installed, it was missed. -
HookExportEntry()replaced only one slot in an export table. Insio2mantables where multiple export indices alias the same underlying routine (such assio2_mc_transfer_initandsio2_pad_transfer_init, orsio2_transferandsio2_transfer2in ROMsio2man), callers importing the alias could bypass the hook or overwrite saved original pointers on repeated installation. -
Sio2McEmu()always unlocked and relockedSIO2through a singlepsio2_transfer_reset/psio2_mc_transfer_initpair instead of matching thesio2manversion active for that transfer. -
ee_coreonly preloaded PS2SDKsio2manwhenMX4SIOwas active, not whenVMCorPADEMUwas active withoutMX4SIO.
-
src/platform/system.cppnow packssio2man_irx(OPL_MODULE_ID_SIO2MAN) whenCORE_IRX_MX4SIO,CORE_IRX_VMC, orPADEMUis active, except in native MMCE games. -
ee_core/src/iopmgr.cloadsOPL_MODULE_ID_SIO2MANinResetIopSpecial()before the game-mode switch and beforeVMC(mcemu),PADEMU, orMX4SIO(mx4sio_bd) modules start. - MMCE games use their own SIO2MAN: preloading the SDK copy can leave the in-game driver waiting on a lock. This follows original commit
11a5150e; its hardware A/B result does not establish migration console acceptance. -
OPL_MODULE_ID_MX4SIOBDis only started ifOPL_MODULE_ID_SIO2MANloaded cleanly (sio2manLoaded > 0).
-
modules/mcemuandmodules/pademunow maintain two-element arrays ([0]for v1,[1]for v2) for:pSio2man25[2]pSio2man51[2]-
psio2_mc_transfer_init[2](mcemu) -
psio2_transfer_reset[2](mcemu)
- Dedicated wrapper callbacks (
hookSio2McInit_1/_2,hookSio2man25_1/_2,hookSio2man51_1/_2,Sio2McEmu_1/_2) preserve the calling table version across the entire transfer lifecycle, includingpademu_hookSio2manchaining andmc2_s1direct DMA requests (temp_packet_version).
-
HookExportEntry()inmodules/mcemu/mcemu_sys.candmodules/pademu/sys_utils.cscans the full export table and replaces every slot that points to the same target function, returning the original target pointer. -
InstallSio2manHook()checksif (old != hookFn)before updating saved function pointers, preventing self-referential recursion if a table is hooked more than once or shares aliased entries.
-
Sio2McEmu(Sio2Packet *sd, int ver)callssio2McUnlock(ver)before backing-store I/O andsio2McLock(ver)afterward, falling back to the opposite version slot (ver ^ 1) only if the primary slot isNULL.
Start here
- Getting started
- Fresh-start defaults
- Installation and first boot
- Releases and packages
- Launch diagnostics
Storage and networking
- USB, MX4SIO and iLink
- MMCE
- Internal HDD: APA and exFAT
- PSX DESR DVR (experimental)
- PC CARD CompactFlash (experimental)
- SMB shares
- Network boot: UDPFS and UDPBD
- HTTP
- NBD server
Games and features
- Game image formats: ISO, ZSO, CHD and CSO
- Neutrino core
- PS1: POPStarter and Ember
- Per-game settings
- Virtual memory cards
- GSM video modes
- In-game reset
- Cheats
- PADEMU
- RetroAchievements
- Apps
Interface and customization
- Settings reference
- Controls
- Coverflow
- Favorites
- Game library: All Games, Recent, Hide and Delete
- Theme engine
- Languages
- Japanese / Unicode game titles
Help and reference
- Troubleshooting
- ZSO format
- Backward-compatible PS3
- Credits and sources
- Features in other forks
- Notes for ps2sdk
- Project overview
Detailed references
- Documentation index
- Test builds and diagnostics
- Launch diagnostics by package, core and transport
- Learning across PS2 loader projects
- VMC creation and recovery
- PC CARD CF implementation reference
- DESR DVR implementation reference
- Per-game parental lock
- SIO2MAN hook compatibility
- APA hard disk safety and code 402
- Autolaunch and global settings
- Folders, parental lock and audio
- Language maintenance
- HTTP server conformance tools
- APA recovery tool
- Setup questions and reporting launch failures
- Editions and build configurations
- Automatic VMC creation
- Compressed PS2 images: ZSO, CSO and CHD
- Favorites storage, staged saves and recovery
- CFG titles in game lists
- RA watch-list and snapshot budgets
- Maintaining the documentation