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

XAPI: Add Device types Manual Scan #165

Merged
merged 11 commits into from
Sep 28, 2022

Conversation

RadWolfie
Copy link
Member

@RadWolfie RadWolfie commented Sep 25, 2022

Migrate Cxbx-Reloaded's SetupXboxDeviceTypes function into internal_xapi_find_device_types function.

With this changes, we are able to scan and label each known global device type variables. The following device types supported are:

  • Gamepad (ucType=1)
  • Keyboard (ucType=2)
  • IR Dongle (ucType=3)
  • Mouse (ucType=4)
  • Steel Battalion Controller (ucType=128)

With verification for XInputOpen function to find device types. Titles compiled below 4242 build are provided with static device types. Any titles compiled as of 4242 and later build has ability to add/remove any device types on compile time. Plus ability include g_DeviceTypeInfoTable(Begin|End) variables to perform your own lookup method.

NOTE: g_DeviceTypeInfoTable(Begin|End) is only available for titles compiled from 4242+ build.

internal_section_VirtToHostAddress's helper function is made easier to lookup through each loaded sections in order to find a section contain within virtual address range. This is needed for NFL Blitz 2002 title as there are two external sections, aka ".XID" and ".XPP&Dat", contain device table and types.

I also made internal_section_HostToVirtAddress function can be used as well. Currently, it is not in use.

implemented part of #75 task

EDIT: Add g_XapiAltLett_MU reference to XUnmountAlternateTitleA sig and register it if found.

EDIT2: Renamed existing GetTypeInformation to GetTypeInformation_4 symbol and added GetTypeInformation_8 symbol signature. Since there are actually two overload functions.

@github-actions github-actions bot added needs-verification Require verification before approval OOVPA Any OOVPA change relative XAPI OOVPA relative topic labels Sep 25, 2022
@RadWolfie RadWolfie force-pushed the xapi-add-devicetypes-scan branch from 45f1ebe to daf6e94 Compare September 25, 2022 23:20
src/lib/manual_xapilib.h Outdated Show resolved Hide resolved
@RadWolfie RadWolfie linked an issue Sep 27, 2022 that may be closed by this pull request
@ergo720 ergo720 merged commit 4da0301 into Cxbx-Reloaded:master Sep 28, 2022
@RadWolfie RadWolfie deleted the xapi-add-devicetypes-scan branch September 28, 2022 10:07
@ergo720 ergo720 removed the needs-verification Require verification before approval label Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OOVPA Any OOVPA change relative XAPI OOVPA relative topic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Derive XInput device type exports
2 participants