Adding ordinal enums to kernel modules.
Access via xe::kernel::modules::xboxkrnl::ordinals::MyFunction (or just ordinals::MyFunction when in the namespace). Some collisions occurred - just added random suffixes for now.
This commit is contained in:
parent
87b8ebd613
commit
a332faf419
|
@ -5,6 +5,7 @@
|
|||
'xam_info.h',
|
||||
'xam_module.cc',
|
||||
'xam_module.h',
|
||||
'xam_ordinals.h',
|
||||
'xam_state.cc',
|
||||
'xam_state.h',
|
||||
'xam_table.inc',
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include <xenia/kernel/export.h>
|
||||
#include <xenia/kernel/kernel_module.h>
|
||||
#include <xenia/kernel/modules/xam/xam_ordinals.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_MODULES_XAM_ORDINALS_H_
|
||||
#define XENIA_KERNEL_MODULES_XAM_ORDINALS_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/kernel/export.h>
|
||||
|
||||
|
||||
// Build an ordinal enum to make it easy to lookup ordinals.
|
||||
#include <xenia/kernel/util/ordinal_table_pre.inc>
|
||||
namespace ordinals {
|
||||
enum {
|
||||
#include <xenia/kernel/modules/xam/xam_table.inc>
|
||||
};
|
||||
} // namespace ordinals
|
||||
#include <xenia/kernel/util/ordinal_table_post.inc>
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_MODULES_XAM_ORDINALS_H_
|
|
@ -568,8 +568,8 @@ XE_EXPORT(xam, 0x0000030D, XamVoiceHeadsetPresent,
|
|||
XE_EXPORT(xam, 0x0000030E, XamVoiceSubmitPacket, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x0000030F, XamVoiceClose, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000310, XamVoiceGetBatteryStatus, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000311, Refresh, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000312, Refresh, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000311, Refresh_, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000312, Refresh_0, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000313, XamShowJoinSessionByIdInProgressUI, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000314, XamShowPartyJoinInProgressUI, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000315, XamBuildSharedSystemResourceLocator, ? , Function, 0),
|
||||
|
@ -579,7 +579,7 @@ XE_EXPORT(xam, 0x00000318, XamVoiceGetMicArrayStatus,
|
|||
XE_EXPORT(xam, 0x00000319, XamVoiceSetAudioCaptureRoutine, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x0000031A, XamVoiceGetDirectionalData, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x0000031B, XamBuildResourceLocator, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x0000031C, XamBuildSharedSystemResourceLocator, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x0000031C, XamBuildSharedSystemResourceLocator_, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x0000031D, XamBuildGamercardResourceLocator, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x0000031E, XamBuildDynamicResourceLocator, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x0000031F, XamBuildXamResourceLocator, ? , Function, 0),
|
||||
|
@ -825,7 +825,7 @@ XE_EXPORT(xam, 0x0000040E, OutputDebugStringA,
|
|||
XE_EXPORT(xam, 0x0000040F, DebugBreak, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000410, GetCurrentThreadId, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000411, XDebugError, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000412, XDebugWarning, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000412, XDebugWarning_, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000413, RtlDebugSetLevel, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000414, CloseHandle, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000415, GetTickCount, ? , Function, 0),
|
||||
|
@ -980,17 +980,17 @@ XE_EXPORT(xam, 0x000005E2, XamAvatarGenerateMipMaps,
|
|||
XE_EXPORT(xam, 0x000005E3, XamAvatarSetCustomAsset, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005E4, XamAvatarSetManifest, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005E5, EnumerateMediaObjects, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005E6, EnumerateMediaObjects, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005E6, EnumerateMediaObjects_, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005E7, XamAvatarLoadAnimation, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005E8, XamAvatarBeginEnumAssets, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005E9, XamAvatarEndEnumAssets, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005EA, XamAvatarEnumAssets, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005EB, XamAvatarGetMetadataRandom, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005EC, EnumerateMediaObjects, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005ED, EnumerateMediaObjects, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005EC, EnumerateMediaObjects_0, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005ED, EnumerateMediaObjects_1, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005EE, XamAvatarGetMetadataSignedOutProfileCount, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005EF, XamAvatarGetMetadataSignedOutProfile, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005F0, EnumerateMediaObjects, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005F0, EnumerateMediaObjects_2, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005F1, XamAvatarManifestGetBodyType, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005F2, XamAvatarGetInstrumentation, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x000005F3, XamAvatarGetAssetIcon, ? , Function, 0),
|
||||
|
@ -1102,7 +1102,7 @@ XE_EXPORT(xam, 0x00000822, XamCodeCoverageFileClose,
|
|||
XE_EXPORT(xam, 0x00000823, XamCodeCoverageFileLseek, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000824, XamCodeCoverageFileRead, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000825, XamCodeCoverageFileWrite, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000826, Refresh, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000826, Refresh_1, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000827, XampHeapGetInfo, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000828, XampHeapGetCount, ? , Function, 0),
|
||||
XE_EXPORT(xam, 0x00000829, XamShowPamUI, ? , Function, 0),
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include <xenia/kernel/export.h>
|
||||
#include <xenia/kernel/kernel_module.h>
|
||||
#include <xenia/kernel/modules/xboxkrnl/xboxkrnl_ordinals.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
'xboxkrnl_memory.h',
|
||||
'xboxkrnl_module.cc',
|
||||
'xboxkrnl_module.h',
|
||||
'xboxkrnl_ordinals.h',
|
||||
'xboxkrnl_rtl.cc',
|
||||
'xboxkrnl_rtl.h',
|
||||
'xboxkrnl_table.inc',
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_MODULES_XBOXKRNL_ORDINALS_H_
|
||||
#define XENIA_KERNEL_MODULES_XBOXKRNL_ORDINALS_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/kernel/export.h>
|
||||
|
||||
|
||||
// Build an ordinal enum to make it easy to lookup ordinals.
|
||||
#include <xenia/kernel/util/ordinal_table_pre.inc>
|
||||
namespace ordinals {
|
||||
enum {
|
||||
#include <xenia/kernel/modules/xboxkrnl/xboxkrnl_table.inc>
|
||||
};
|
||||
} // namespace ordinals
|
||||
#include <xenia/kernel/util/ordinal_table_post.inc>
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_MODULES_XBOXKRNL_ORDINALS_H_
|
|
@ -423,7 +423,7 @@ XE_EXPORT(xboxkrnl, 0x00000199, XexLoadImage,
|
|||
XE_EXPORT(xboxkrnl, 0x0000019A, XexLoadImageFromMemory, ? , Function, 0),
|
||||
XE_EXPORT(xboxkrnl, 0x0000019B, XexLoadImageHeaders, ? , Function, 0),
|
||||
XE_EXPORT(xboxkrnl, 0x0000019C, XexPcToFileHeader, ? , Function, 0),
|
||||
XE_EXPORT(xboxkrnl, 0x0000019D, KiApcNormalRoutineNop, ? , Function, 0),
|
||||
XE_EXPORT(xboxkrnl, 0x0000019D, KiApcNormalRoutineNop_, ? , Function, 0),
|
||||
XE_EXPORT(xboxkrnl, 0x0000019E, XexRegisterPatchDescriptor, ? , Function, 0),
|
||||
XE_EXPORT(xboxkrnl, 0x0000019F, XexSendDeferredNotifications, ? , Function, 0),
|
||||
XE_EXPORT(xboxkrnl, 0x000001A0, XexStartExecutable, ? , Function, 0),
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
// Post-include file for an ordinal table.
|
||||
|
||||
|
||||
#undef XE_EXPORT
|
|
@ -0,0 +1,27 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/**
|
||||
* Pre-include file for an ordinal table.
|
||||
* Use this to build tables of constants describing the ordinals:
|
||||
*
|
||||
* // Build an ordinal enum to make it easy to lookup ordinals.
|
||||
* #include <xenia/kernel/util/ordinal_table_pre.inc>
|
||||
* namespace ordinals {
|
||||
* enum {
|
||||
* #include <xenia/kernel/modules/my_module/my_module_table.inc>
|
||||
* };
|
||||
* } // namespace ordinals
|
||||
* #include <xenia/kernel/util/ordinal_table_post.inc>
|
||||
*/
|
||||
|
||||
|
||||
#define XE_EXPORT(module, ordinal, name, signature, type, flags) \
|
||||
name = ordinal
|
||||
|
|
@ -3,5 +3,7 @@
|
|||
'sources': [
|
||||
'export_table_post.inc',
|
||||
'export_table_pre.inc',
|
||||
'ordinal_table_post.inc',
|
||||
'ordinal_table_pre.inc',
|
||||
],
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue