-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add NpDrmPackage #79
Add NpDrmPackage #79
Conversation
Yeah, remove the "_" if there's colliding names, the convention is to add "ForKernel" or "ForDriver" to ones in kernel. |
In my opinion:
Note that the library is on userland but not on kernel. Anyway, I don't think the prefix really matters in the actual use. |
generically, |
Many functions from the pastebin file seem to lose one @yifanlu Some rules should be defined. There are currently many discepancies in |
I think that is because those names are cited from the binary of Sony. However, some are determined in the community and they cannot be distinguished from the "real" names. It is no longer possible and doesn't make sense to track real names. We should have our own rules. |
@yifanlu Let's merge it as is, it will be fixed with the rest once the standard is defined. |
69c2c88
to
3e0e5bc
Compare
This pull request is broken since the changes have been overwritten by others. I'll try to recover the changes. |
Reversed and documented by @173210. See http://173210.github.io/scenpdrmpackage
Done. |
* If it is set to 0, the function just checks the header | ||
* and doesn't create the context. | ||
*/ | ||
int _sceNpDrmPackageCheck(const void *buffer, SceSize size, int zero, unsigned int identifier); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add documentation for the return value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it's < 0 on error, otherwise 0. Need @173210 's confirmation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!= 0 on error, otherwise 0.
* @param size - The size of the buffer. The minimum confirmed value is 0x20. | ||
* @param opt - The options. | ||
*/ | ||
int _sceNpDrmPackageDecrypt(void * restrict buffer, SceSize size, _sceNpDrmPackageDecrypt_opt * restrict opt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
* \file | ||
* \brief Header file which defines NpDrmPackage related variables and functions | ||
* | ||
* Copyright (C) 2015 PSP2SDK Project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mean 2015?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this date thing really necessary? It seems to be an unnecessary burden, although minor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should follow the existing code anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
"variables": {} | ||
} | ||
}, | ||
"nid": 120 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need module nid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't all entries in db.json
use a placeholder NID currently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most do, yes. We have the technology to fill these in properly now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this should be done with the massive overhaul, including the _ change.
Done the changes except the module nid. |
Reversed and documented by @173210.
See http://173210.github.io/scenpdrmpackage
I'm not sure about the rule for prefixing function names. Should I remove the
_
?