forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

irx modules docs

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
radad



Joined: 19 May 2004
Posts: 246
Location: Melbourne, Australia

PostPosted: Wed Jun 27, 2007 10:31 am    Post subject: irx modules docs Reply with quote

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.
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Wed Jun 27, 2007 10:43 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
radad



Joined: 19 May 2004
Posts: 246
Location: Melbourne, Australia

PostPosted: Wed Jun 27, 2007 3:49 pm    Post subject: Reply with quote

I have started, have a look at IOP IRX Modules

Are there any tools for dumping the dependencies for an irx?
Back to top
View user's profile Send private message
Lukasz



Joined: 19 Jan 2004
Posts: 248
Location: Denmark

PostPosted: Wed Jun 27, 2007 6:00 pm    Post subject: Reply with quote

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.php?action=files&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.
_________________
Lukasz.dk
Back to top
View user's profile Send private message Visit poster's website
Lukasz



Joined: 19 Jan 2004
Posts: 248
Location: Denmark

PostPosted: Wed Jun 27, 2007 11:47 pm    Post subject: Reply with quote

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

http://ps2dev.org/ps2/Technical_Documentation/Programming_Reference/System_Information/IRX_Files
_________________
Lukasz.dk
Back to top
View user's profile Send private message Visit poster's website
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Thu Jun 28, 2007 9:41 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
radad



Joined: 19 May 2004
Posts: 246
Location: Melbourne, Australia

PostPosted: Thu Jun 28, 2007 2:10 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Lukasz



Joined: 19 Jan 2004
Posts: 248
Location: Denmark

PostPosted: Thu Jun 28, 2007 7:40 pm    Post subject: Reply with quote

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.
_________________
Lukasz.dk
Back to top
View user's profile Send private message Visit poster's website
radad



Joined: 19 May 2004
Posts: 246
Location: Melbourne, Australia

PostPosted: Fri Jun 29, 2007 9:33 am    Post subject: Reply with quote

I found this in rom0:ROMVER

0170EC20030227

Also, I was planning on doing the PS2SDK IRXs aswell. Just doing the rom ones first.
Back to top
View user's profile Send private message
radad



Joined: 19 May 2004
Posts: 246
Location: Melbourne, Australia

PostPosted: Fri Jun 29, 2007 2:27 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Lukasz



Joined: 19 Jan 2004
Posts: 248
Location: Denmark

PostPosted: Fri Jun 29, 2007 4:56 pm    Post subject: Reply with quote

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
_________________
Lukasz.dk
Back to top
View user's profile Send private message Visit poster's website
radad



Joined: 19 May 2004
Posts: 246
Location: Melbourne, Australia

PostPosted: Mon Jul 02, 2007 1:54 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group