PDA

View Full Version : Are PRX files necessary?



Nieko
September 20th, 2007, 16:02
deniska: on http://forums.ps2dev.org/viewtopic.php?t=7074#55740 kururin posted a sample program that reads from USB cam and mic without using any PRX files in the program's directory.

Do you think this could also be possible for MapThis, the PSP-290 version i.e.? This would save a lot of work for people who have trouble extracting PRX files.

deniska
September 20th, 2007, 19:20
the code there is using some libs that don't have source code attached to them... :-(

PDG
September 21st, 2007, 09:39
deniska: on http://forums.ps2dev.org/viewtopic.php?t=7074#55740 kururin posted a sample program that reads from USB cam and mic without using any PRX files in the program's directory.

Do you think this could also be possible for MapThis, the PSP-290 version i.e.? This would save a lot of work for people who have trouble extracting PRX files.

How hard can extracting a .prx file bee after following my guide :D

Ill try that on my mom today, she hates puters *Lol*

Nieko
September 21st, 2007, 10:09
deniska: looking at libpspusbcam.a and libpspusbcam_driver.a (kernel mode?), it seems to be compiled from a stub file, perhaps i.c.w. a header file, which fills in the arguments per function. The function names present there are exactly the same (in order) as on http://moonlight.lan.st/3.5x/kd/usbcam.html. On http://moonlight.lan.st/3.5x/index.html you can also find usbgps.prx and usbacc.prx. The header file you already have in pspusbgps.h.

I don't know too much about stub and header files yet, so I may be wrong, but it's worth a look anyway :).

If all that fails, you could of course PM kururin on forums.ps2dev.org.


PDG: looking at the number of threads on this forum about PRX files, a lot of people still find it hard, unfortunately. And if this step can be avoided for users completely, then I think this will improve the usability of MapThis a lot.

PDG
September 21st, 2007, 10:12
PDG: looking at the number of threads on this forum about PRX files, a lot of people still find it hard, unfortunately. And if this step can be avoided for users completely, then I think this will improve the usability of MapThis a lot.

Of course ;)
That "Would" help lots of users but i think Sony would get mad if theyr sources got spread with the package, coding a similar is better ;) or just extracting them yourselve from your own PSP :thumbup:

That way sony cant complaign to mouch :rofl:
and Deniska can continue his great and hard work :thumbup:

Nieko
September 21st, 2007, 11:17
I don't see how that is a problem. I hope I understood it correctly, but AFAIK, all those functions from kururin's library files, like the entire PSPSDK, have been reverse engineered and are publicly available (PSPSDK even under BSD). So using that shouldn't be a problem.

The thing is, you're not distributing original Sony PRX files, but are only calling functions available in those PRX files, which are already available on everyone's PSP, albeit in the firmware itself.

deniska: another idea, if this doesn't work, isn't it possible to load the PRX files directly from flash0? In 3.52 M33-4 it's e.g. possible to change "USB connection" from memory stick to flash0, so perhaps it's also possible to have homebrew read from there?

Nieko
September 22nd, 2007, 20:18
I had a go at it myself, and it works :D. There is no need for those extra libraries or header files.

Put simply, both functions loading usbacc.prx and usbgps.prx can be replaced by the following:


if (sceUtilityLoadUsbModule(PSP_USB_MODULE_ACC) < 0)
if (sceUtilityLoadUsbModule(PSP_USB_MODULE_GPS) < 0)


When testing, using my fancy new extension cable, I got a fix in under a minute :).

Do note that this only works for FW2.71+.

I have also updated my version in New Code contribution: http://www.dcemu.co.uk/vbulletin/showthread.php?t=54109&page=37#368.

deniska
September 22nd, 2007, 21:56
I tried your eboot and it worked with 3.60 slim..
I'll do some more testing and if everythin works move this change to official version.. thanks!