Trapping IOP Reset

Discussion in 'Sony Programming and Development' started by root670, Oct 11, 2014.

  1. root670

    root670 Robust Member

    Joined:
    Apr 4, 2010
    Messages:
    205
    Likes Received:
    17
    I'm working on a project that involves redirecting IOP modules loaded from ROM to ones located on a memory card (from a dump from specific, different console revision). This includes PADMAN, MCMAN, etc. I've created a module to redirect ROM0:/ files to MC1:/, and it does work so far. Problem is, the game I'm trying to load with this module intact does an IOP reset pretty early, effectively disabling my redirection module. How can I trap IOP resets to reinject my redirector module? I've looked at the sources for PS2RD and OPL, and the basic process seems to be to hook 2 EE functions and then inject your own modules that need to be stored in kernel RAM before loading the game. Then when the game tries to do an IOP reset, the hooked functions are free to replace certain modules before doing the reset. Am I understanding that correctly?

    Any advice would be appreciated.
     
  2. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,879
    Likes Received:
    245
    Open PS2 loader achieves just that through hooking and kernel patching. Maybe look it's sources ?
     
  3. sp193

    sp193 Site Soldier

    Joined:
    Mar 28, 2012
    Messages:
    2,217
    Likes Received:
    1,052
    It hooks onto SifSetDma and SifSetReg, and identifies IOP reset packets.

    The newer version of OPL simply use a custom UDNL module that will replace CDVDMAN and CDVDFSV with its own versions. No patching of the IOPRP image on the EE side is required.

    As of right now, OPL keeps a separate IOPRP image that contains the new CDVDMAN and CDVDFSV because OPL has different sets of CDVDMAN and CDVDFSV modules. If you do not need multiple versions of any modules, then you could just integrate your IOPRP image into the UDNL module by replacing its 0-byte IOPRP.IMG file in its sources. If you do it that way, then it becomes simpler because you do not need to allocate memory and upload your IOPRP image.
     
    Last edited: Oct 11, 2014
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page