-
Notifications
You must be signed in to change notification settings - Fork 5
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
Extended keystore and parameters #8
Conversation
6275cbb
to
67171df
Compare
@AKuHAK btw, since balika is not quite active, what do you think about enabling discussions tab on this repo, creating a new one, and use that link to replace the report link of the program |
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.
As always commit history is dirty. It is ok when you change one thing, but here you changed a lot more:
- added shell formatting
- added new functionality
- added new library
- added cmake
- fixed some bugs
It can be in one pr, but then it requires clean commits, one commit per change. If it is not an option, then, please split this pr in pr series, so I can squash each one. Also, shell formatting is very questionable change, will require some testing.
@@ -0,0 +1,8 @@ | |||
#define REDBOLD "\033[1;31m" |
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.
Does this work in CMD? I think only powrshell supports that nice formatting. Actually, I was forced to remove it from hfl-dump due to many reports about this characters in cmd. Can you remove formatting for now, and add it later as separate PR?
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.
Does this work in CMD? I think only powrshell supports that nice formatting. Actually, I was forced to remove it from hfl-dump due to many reports about this characters in cmd. Can you remove formatting for now, and add it later as separate PR?
or disable on windows. althoug, WSL and windows terminal do support it
src/kelftool.cpp | ||
src/keystore.cpp | ||
) | ||
target_link_libraries(kelftool OpenSSL::SSL) |
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.
So then adding this in GitHub action?
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.
or delete it. decide what you see fit
@@ -97,142 +98,149 @@ int Kelf::LoadKelf(const std::string &filename) | |||
|
|||
if (header.Flags & 1 || header.Flags & 0xf0000 || header.BitCount != 0) { | |||
// TODO: check more unknown bit flags | |||
printf("This file is not supported yet and looked after.\n"); | |||
printf(REDBOLD "This file is not supported yet and looked after.\n"); |
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.
Its now super hard to check where you applied formatting, and where you actually changed the code.
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 forgot the cmake there It was for quicker compiling. I can remove it. Or leave it, since it's not hooked to CI in any form |
i'll squash the commits then |
closed in favor of #9 |
Pull Request checklist
Note: these are not necessarily requirements
Features:
--keys=KEY
: searches for the mg keys on the section provided, defaults todefault
--systemtype=TYPE
: manually sets the system type, supported values arePS2
,PSX
or a hex number .--kflags=FLAGS
: Custom KELF flags, supported values areKELF
,KIRX
or a hex number.--mgzone=VALUE
: custom MagicGate region zones, expects a hex number.--apptype=VALUE
: custom KELF application type, expects a hex number.new keystore format
In addition,
ARCADE_KBIT
&ARCADE_KC
have been renamed toOVERRIDE_KBIT
&OVERRIDE_KC
for readabilityAnd when these values are found and valid, program will explicitly inform they're being used by the following message:
keystore search:
Now the keystore file from CWD will have priority over the one on $HOME.
Decrypt command.
The decrypt command will also be capable of using the
--keys
flag. and it will now Identify namco arcade dongle boot.bin user header (not sure if we want to support it on the encrypt cmd??)