Introduce HLE v2 Database method info

RadWolfie 2017-10-21 18:00:15 -05:00
parent 3224924650
commit 3aae44449e
1 changed files with 30 additions and 0 deletions

30
HLE-v2-Database-Method.md Normal file

@ -0,0 +1,30 @@
### Create OOVPA
Please review [TLDR section](/Cxbx-Reloaded/Cxbx-Reloaded/wiki/Maintaining-OOVPA's-for-HLE-function-detection#too-long-didnt-read) to understand how to create simple OOVPA. The changes to OOVPA method itself has not change.
### Maintenance
Any time a single OOVPA has been add, replaced, or removed; HLE v2 database need to be update. This is a requirement in order to compile properly.
- Any time OOVPA has been lowered, OOVPA itself must be move in specific revision database file.
- If a new OOVPA is replaced with better OOVPA, please do comment the whole obsolete OOVPA section for preservation purpose with the comment stating "replaced with \_version\_".
- Whenever you find out specific OOVPA is making false detection 100%, please comment it out. Then create a correct OOVPA signature for it.
- There are high chances of ability to make generic OOVPAs. When you do discover existing OOVPA or OOVPA you made is indeed generic and does match correctly with highest XDK version (which is 5849). Please do add a comment stating "Generic OOVPA as of \_XDK_version\_ and newer". **Also check with lower XDK titles to be sure if it is possible to add at starting point of the XDK version.**
### Method for HLE Database v2
```c
REGISTER_OOVPAS(/*Name of OOVPA*/, /*documentation flag*/, /*XDK versions*/, ...),
```
`Documentation flag` should be only used either XREF, PATCH, or UNPATCHED.
- `XREF` defined as XREF purpose with no patch necessary.
- `PATCH` define as using with a patch. (It is okay if a patch has a xref included.)
- `UNPATCHED` should be only used whenever a patch is no longer become necessary. (Usually result of Hybrid LLE or certain low level APIs are patched and is able to emulate properly.)
### Register new OOVPA
Once you have done with creating OOVPA. Manually add or update existing register in respective v2 database. For example:
```c
REGISTER_OOVPAS(XAudioCalculatePitch, XREF, 3911, 4039),
```
If you do not understand how `REGISTER_OOVPAS` work, please use the search bar then choose "code" tab for understanding how it works.
### Recommendation
- We strongly advise to keep notes what's not been verified in HLE v2 database file.
- Use specific version title if you are able to discover almost to full compiled library. (Doing this way does speed up add all missing OOVPAs detection.)
- Please do add library version and title's name to the note to keep track of known title might or does contain almost to full library compiled.