irx modules docs

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

irx modules docs

Post by radad »

There has been a bit of discussion lately about what some of the various irx modules. Personally I have found this information hard to come by but it seems of few of the guys here have this knowledge. I would like to propose some kind of documentation structure on ps2dev for this information.

For each module I would like to see:
- filename ie rom0:SIO2MAN
- name
- description
- irx dependencies
- ps2sdk ee library and header

I am going to need others help but I will start this if others think it is a good idea.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

I think its a great idea.

Start up an entry on the wiki (wiki.ps2dev.org) with some basic structure and get people to add what they know.
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post by radad »

I have started, have a look at IOP IRX Modules

Are there any tools for dumping the dependencies for an irx?
User avatar
Lukasz
Posts: 248
Joined: Mon Jan 19, 2004 8:37 pm
Location: Denmark
Contact:

Post by Lukasz »

I also think this is a great idea :-) I will start adding information as soon as I get back from vacation.

There is some information in the reversed IOP modules made public by [RO]man, I've mirrored them at my website, as the original website has disappeared.

http://lukasz.dk/programming/playstation-2/file-mirror/

As for an IRX tool there is "irxtool" by Herben available from Duke's website. I remember I had trouble using the tool, you need to set some enviroment variable to point at imports.txt file, I forgot what the variable should be called and there is no documentation, so you probably need to look in the executable to find it :-)

Get it here
http://duke.napalm-x.com/php/webengine. ... iles&idx=2

You can check which files are ELF's and which are IRX's with ee-readelf.

I have an very old doc which documents the IRX format, I think it was written by Oobles or Karmix. I will try to locate it and upload as soon as I can.

It is also quite easy to find dependencies with ps2dis, using the goto function and looking for strings which match IOP module names, like "sifcmd", "sifman", "loadcore", etc. By looking in the ps2sdk IOP headers you can find much of the information need to document the IOP modules.

A nice addition to the wiki would be to add IOP module version numbers and their (numbered) exports, again information which can be obtained (partly) from the ps2sdk.
User avatar
Lukasz
Posts: 248
Joined: Mon Jan 19, 2004 8:37 pm
Location: Denmark
Contact:

Post by Lukasz »

Turns out that IRX documentation I mentioned is available at ps2dev.org:

http://ps2dev.org/ps2/Technical_Documen ... /IRX_Files
Mega Man
Posts: 260
Joined: Sat Jun 18, 2005 3:14 am
Contact:

Post by Mega Man »

radad wrote:Are there any tools for dumping the dependencies for an irx?
I have written a program that prints out the exported and imported functions. Function names are detected by using header files from PS2SDK.

http://freenet-homepage.de/ps2dev/irxtool.tgz

I also called it IRX tool. ;)

Example:
irxtool /usr/local/ps2dev/ps2sdk/iop/irx/usbd.irx

loadcore 1.01
0x00004634 6 RegisterLibraryEntries()

stdio 1.02
0x00004658 4 printf()

sysmem 1.01
0x0000467c 4 AllocSysMemory()

sysclib 1.01
0x000046a0 12 memcpy()
0x000046a8 14 memset()
0x000046b0 36 strtol()

intrman 1.02
0x000046d4 7 DisableIntr()
0x000046dc 6 EnableIntr()
0x000046e4 4 RegisterIntrHandler()
0x000046ec 17 CpuSuspendIntr()
0x000046f4 18 CpuResumeIntr()

thsemap 1.02
0x00004718 4 CreateSema()
0x00004720 8 WaitSema()
0x00004728 6 SignalSema()
0x00004730 5 DeleteSema()

thevent 1.01
0x00004754 4 CreateEventFlag()
0x0000475c 6 SetEventFlag()
0x00004764 7 iSetEventFlag()
0x0000476c 10 WaitEventFlag()

thbase 1.01
0x00004790 4 CreateThread()
0x00004798 6 StartThread()
0x000047a0 5 DeleteThread()
0x000047a8 33 DelayThread()

module usbd 1.01 exported functions:
0x000047d4 0 usbd_start() at 0x0000373c
0x000047d8 1 at 0x0000481c
0x000047dc 2 at 0x0000481c
0x000047e0 3 at 0x0000481c
0x000047e4 4 UsbRegisterDriver() at 0x00002470
0x000047e8 5 UsbUnregisterDriver() at 0x000024c4
0x000047ec 6 UsbGetDeviceStaticDescriptor() at 0x00002514
0x000047f0 7 UsbSetDevicePrivateData() at 0x000025f4
0x000047f4 8 UsbGetDevicePrivateData() at 0x00002668
0x000047f8 9 UsbOpenEndpoint() at 0x000026c8
0x000047fc 10 UsbCloseEndpoint() at 0x0000274c
0x00004800 11 UsbTransfer() at 0x000027ac
0x00004804 12 UsbOpenEndpointAligned() at 0x000029a4
0x00004808 13 at 0x00002584
0x0000480c 14 at 0x00002a28
0x00004810 15 at 0x00002a30
0x00004814 16 at 0x00002a38
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post by radad »

Thanks Mega Man, thats what I was looking for.
I have updated the few entries in the wiki with this information.
What do people think? Is it too verbose? Is it looking good? Should I continue with the rest?

BTW This is documenting what my system is reporting. How different would it be for other versions of the console?
User avatar
Lukasz
Posts: 248
Joined: Mon Jan 19, 2004 8:37 pm
Location: Denmark
Contact:

Post by Lukasz »

radad wrote: What do people think? Is it too verbose? Is it looking good? Should I continue with the rest?

BTW This is documenting what my system is reporting. How different would it be for other versions of the console?
I dont think the information is too verbose and I think it looks fine. It would be great if you continued with the rest. Maybe also add PS2SDK IRX modules to the list?

As for different bios versions, I see a few modules on the wiki which are not included in my bios. I think there is a bios version string in one of the bios files, maybe you can add information about which bios version the module was found in.
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post by radad »

I found this in rom0:ROMVER

0170EC20030227

Also, I was planning on doing the PS2SDK IRXs aswell. Just doing the rom ones first.
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post by radad »

Put in all the import/export info in the wiki.

Interestingly some irxs do not have an export section at all while others have an empty export section. Some others have multiple export sections.
User avatar
Lukasz
Posts: 248
Joined: Mon Jan 19, 2004 8:37 pm
Location: Denmark
Contact:

Post by Lukasz »

radad wrote:I found this in rom0:ROMVER

0170EC20030227

Also, I was planning on doing the PS2SDK IRXs aswell. Just doing the rom ones first.
If I am not mistaken 0170EC20030227 means BIOS version 1.70 Europe 27/2/2003.

My pstwo has ROMVER 0200EC20040614 - BIOS version 2.0 Europe 14/6/2004
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post by radad »

I have completed my knowledge on the rom files. Hopefully others can contribute.

Just to note that the page 'IOP IRX Modules' list all of the modules I found on my rom. However they link to an interface page. ie the rom0:TIMEMANI links to a 'timrman' page. On the interface page I have listed all the modules which implement that interface.

This works well for most modules as they only implement one interface. Some do not implement any so they link to a page with the same name as the module. Others implement many so they link to an interface page of the first interface. THREADMAN is a good example of this.

It might also be worth documenting what all of the other files in rom are.

Next I will have a go at the ps2sdk irx modules.
Post Reply