Skip to content
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

Merge vdsuite NID database to the vitasdk #574

Open
devnoname120 opened this issue Mar 28, 2021 · 9 comments
Open

Merge vdsuite NID database to the vitasdk #574

devnoname120 opened this issue Mar 28, 2021 · 9 comments

Comments

@devnoname120
Copy link
Member

devnoname120 commented Mar 28, 2021

Follow-up of #390.

Use this script: https://github.com/devnoname120/vitasdk-db-tools/blob/master/dbtools.py
Database: https://bin.shotatoshounenwachigau.moe/vdsuite/ghidra-loader-db.yml

I converted this database to a nids.txt format for converting it more easily:
ghidra-loader-db.txt

@Princess-of-Sleeping
Copy link
Contributor

I disagree with this.
Above all, vitasdk and vdsuite db already use different function names.
And added by using script -> vitasdk to broken again.

@devnoname120
Copy link
Member Author

I won't overwrite function names where it doesn't make sense.
My previous iteration (#390) that merged 3 databases didn't cause any regressions and didn't break any homebrews compilation.

@Princess-of-Sleeping
Copy link
Contributor

known problem

  1. vdsuite uses the official name as much as possible, but vitasdk does not.
    This case, Which would you choose?

  2. Removed "k" sce.
    vdsuite decided to use sce instead of ksce even for kernel functions. So need update Travis script.

But, if you ignore 1 and 2 and added them, everything will be mixed and maintenance will be very difficult.

@Princess-of-Sleeping
Copy link
Contributor

@devnoname120
Copy link
Member Author

Both 1 and 2 are covered in the script: https://www.github.com/devnoname120/vitasdk-db-tools/tree/master/dbtools.py

It uses a db_lookup.yml file as a reference to make sure to add to the right modules/libraries and ignore all the unknown NIDs.

Which function was incorrectly added?

@Princess-of-Sleeping
Copy link
Contributor

      SceAppUtilBook:
        nid: 0xDA27A9D3
        kernel: true
        functions:
          ksceAppUtilBookMount: 0xFDAAF091
          ksceAppUtilBookUmount: 0x9C1794C2
      SceAppUtilAddcontForce:
        nid: 0x9D061921
        kernel: true
        functions:
          ksceAppUtilAddcontForceAddcontMount: 0x6087E5F7

These functions are user functions, but in pull/390 they were added as kernel functions.

@devnoname120
Copy link
Member Author

devnoname120 commented Mar 28, 2021

@CelesteBlue-dev Any ideas why your nids-extract tool returns kernel: true for these libraries?
I used this tool to build the reference db_lookup.yml that I used to extract library names, kernel status, etc.

@CelesteBlue-dev
Copy link
Contributor

@devnoname120 I forgot a condition (modattribute & 0x7) in nids-extract. It is now fixed in ps-nids-extract.

@devnoname120
Copy link
Member Author

devnoname120 commented Sep 17, 2022

@CelesteBlue-dev Great! Feel free to take over this idea. You can base it off the script I used in my other PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants