Thursday, July 30, 2020

Basics on the code PART 12

In today's entry we were going to read and compile the prx_loader and the prx_simple, which is about the PRX or Playstation Relocatable Executable. Those are about plugin creation (start and stop modules).

For that goal, you can also look into https://tai.henkaku.xyz/ . And also recommended to read about the SceDisplay  (handles management of the framebuffers), and the SceKernelModulemgr (is in charge of loading both user modules and kernel modules)

However, after reading the sample and trying to compile it (for a whole day with breaks), receiving some errors, warnings and whatnot (yes we check other samples to see if the sdk was gone or something, and we tried to solve some of them). We have decide it to just speak about the failure and let that sample appart.

Explanations: Why let it appart? Are you giving up? Are you doing the same with future similar failures? No, we are not giving up, we let that appart because it is about plugins and we don't need that currently. We can go back there in the future when need it, and we have the taihenkaku web for a more clarified way to do them (also we can figure them out with actual plugins if we need to).

Note: While trying to solve the problems, we look other resources and the other big SDK for the vita. Those are the cbps web (currently with an error 523, Origin is unreachable), and the dolce sdk forum a.k.a cbps forum.

Note 2: The vita sdk and the dolce sdk will be appart in time, but currently (as one is a fork from the other) they have the same samples (they only have different cmakelists to differentiate one sdk name with the other). This is useful to know if we want to make a transition or something (more deep knowledge in the sdk will be used when creating the main project of the blog).

Note 3: It must be stated, that the errors found may or may not be caused by us or by the samples' coding.


Having said that, we want to give a brief overview with 2 images of the compiling:

First we tried to read, understand and compile the prx_loader sample. It gaves us, several errors:

   - Lot of them where undeclared functions
     (caused by the lack of a/some include/s, which should be in one of the header files already included).

prx_loader compiling errors

And Then, we decided to compile the prx_simple as it uses the loader as base and goes further.
That means it should give similar errors and/or we can use it to solve some of them. This one gave less errors, nonetheless it gave them:

   - The first time it gave us only three.

prx_simple with 3 compiling errors


 - we reduced them to two adding one include,  #include <psp2/display.h>

prx_simple with 2 compiling errors





 - After this, it seemed easy to solve (giving types to those variables)
   We look in other files what where their types and added them.

prx_simple with errors on the link part


 - Yet again, although it compiled the first part, it gave us more errors, this time, on the link part.
   Knowing this is mostly kernel related we didn't want to take any risk and stop after more fruitless investigation.

No comments:

Post a Comment