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

Remove as much ALIAS OOVPA as possible #323

Closed
PatrickvL opened this issue Apr 4, 2017 · 13 comments
Closed

Remove as much ALIAS OOVPA as possible #323

PatrickvL opened this issue Apr 4, 2017 · 13 comments
Labels
help wanted other devs should help HLE High Level Emulation OOVPA Optimized Offset Value Pair Array

Comments

@PatrickvL
Copy link
Member

Currently, there are 202 REGISTER_OOVPA occurrences registering an ALIAS.
All those alias-OOVPA shouldn't actually exist, as the function they describe will only occur once in an XBE.
So, these alias-OOVPA should either:

  • be merged into one, allowing the preferred use of normal (PATCH) registations,
  • or they describe an entirely different function, in which case the ALIAS should be renamed, and a patch must be offered for it,
  • or they don't require a patch, but can be either removed, or renamed to their correct name and registered as an XREF.

This is a prerequisite for issue #317 (consolidation of OOVPA databases)

@PatrickvL PatrickvL added help wanted other devs should help HLE High Level Emulation labels Apr 4, 2017
@jarupxx
Copy link
Contributor

jarupxx commented Apr 6, 2017

I've classified ALIAS registrations.
· D3DDevice_SetVertexShaderConstant1Fast
· IDirectSoundStream_SetMixBins
A patch must be be offered for it.

For additional information, check the attached file.
Edit: update attached file.
ALIAS-2017-04-09.xlsx

@jarupxx
Copy link
Contributor

jarupxx commented Apr 9, 2017

I was merged ALIAS OOVPA with multiple patterns into one. so one function is detected in one pattern.

@PatrickvL
Copy link
Member Author

This work might have a positive result for other titles too

@PatrickvL
Copy link
Member Author

Can you please add a summary to this issue of the last remaining ALIAS OOVPA registrations, with per case an explanation why it's still present?

@jarupxx
Copy link
Contributor

jarupxx commented Apr 10, 2017

  • merged into one (Done)
  • renamed
  • a patch must be be offered for it
  • removed

Three tasks are left

About renamed

D3D functions
D3DDevice_SetTileNoWait, 3925, ALIAS, D3DDevice_SetTile
D3DDevice_KickOff, 4627, ALIAS, D3DDevice_KickPushBuffer
Which name will the D3D functions use exactly?

DSound functions
Does not match IDirectSoundStream_ and DirectSound_ CDirectSoundStream_.
I heard that you are using DirectSound_ CDirectSoundStream_ in Cxbx-Reloaded, IDirectSoundStream_ is used in XDK 3936

Also, we registered as an XREF the hacky ALIAS (eg IDirectSoundBuffer_StopEx, 5788, ALIAS, DirectSound_CDirectSoundBuffer_StopEx)

XAPI functions
simply adding the suffix "A".

About a patch must be be offered for it
D3DDevice_SetVertexShaderConstant1Fast, this function needs to provide a patch

About removed
A patch of the D3D8X library exists. We do not care d3dx8 library, removed?
Also removed commented out patch?

@LukeUsher
Copy link
Member

About the names: For consistency it's best to use the ones that exist in the DXBX pattern files (*.PAT) as they are the same names used by the library internally.

@jarupxx
Copy link
Contributor

jarupxx commented Apr 13, 2017

I have completed this task except for D3DDevice_SetVertexShaderConstant1Fast. I investigated this function, but I don't understand it. Please complete the remaining task.

@PatrickvL
Copy link
Member Author

PatrickvL commented Apr 13, 2017

I don't have much details on D3DDevice_SetVertexShaderConstant1Fast, but if it's comparable to D3DDevice_SetRenderState_Simple_Fast then it's probably a function that writes directly to the pushbuffer (or a GPU register). As long as we don't render entirely via the pushbuffer and LLE'd GPU, this could best be patched by converting it's arguments (which are already in the form of NV2A-compatible values) back into Direct3D-form, and call SetVertexShaderConstant with that.

@PatrickvL PatrickvL added the OOVPA Optimized Offset Value Pair Array label Aug 15, 2017
@PatrickvL
Copy link
Member Author

Question to @RadWolfie and @jarupxx : Are all aliases home, now that HLE DB V2 is merged? If so, then this issue is no longer relevant, and should be closed.

@RadWolfie
Copy link
Member

Actually, let's merge this into HLE v2 database issue progress. Don't need to jump around from issue to another issue for finding out what's missing. Is that okay?

Reference #723

To your answer, I don't think so. There's a chance some aliases are not in v2 database or need to be removed base on message outputting "duplicated oovpa".

@jarupxx
Copy link
Contributor

jarupxx commented Oct 29, 2017

In HLE v2, D3DDevice_SetVertexShaderConstant1Fast (aliased to D3DDevice_SetVertexShaderConstant1) is unpatched as far as I know.

Whether this patch is necessary or not may be another issue.

@jarupxx
Copy link
Contributor

jarupxx commented Nov 26, 2017

In HLE v2, D3DDevice_SetVertexShaderConstant1Fast (aliased to D3DDevice_SetVertexShaderConstant1) is unpatched as far as I know.

This patch has been added then all aliases came back.

@PatrickvL I think so, you will be close this issue.

@PatrickvL
Copy link
Member Author

At first I didn't understand what you wrote : "all aliases came back" - I think you meant "all aliases are gone".
And indeed, I've checked : there are no ALIAS OOVPA registrations anymore.
So thanks to your and @RadWolfie hard work, this issue can now be closed - thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted other devs should help HLE High Level Emulation OOVPA Optimized Offset Value Pair Array
Projects
None yet
Development

No branches or pull requests

4 participants