diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-02-12 19:09:14 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-02-12 19:09:14 +0100 |
| commit | 5fab7d29931ccf66ac41055042089be46e685abf (patch) | |
| tree | 6b3022495c32b7ab21bb59b55a2b0e7f97393275 /src | |
| parent | faee142876acdcfbf1b8119b6ffa76e0472f8f0d (diff) | |
| download | box64-5fab7d29931ccf66ac41055042089be46e685abf.tar.gz box64-5fab7d29931ccf66ac41055042089be46e685abf.zip | |
Added preliminary support for d3dadapter9, but need more work on calling convention
Diffstat (limited to 'src')
| -rwxr-xr-x | src/library_list.h | 2 | ||||
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 44 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedd3dadapter9defs.h | 8 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedd3dadapter9types.h | 19 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedd3dadapter9undefs.h | 8 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedlibxcbpresentdefs.h | 8 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedlibxcbpresenttypes.h | 17 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedlibxcbpresentundefs.h | 8 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.c | 95 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.h | 40 | ||||
| -rw-r--r-- | src/wrapped/wrappedd3dadapter9.c | 419 | ||||
| -rw-r--r-- | src/wrapped/wrappedd3dadapter9_gen.h | 697 | ||||
| -rw-r--r-- | src/wrapped/wrappedd3dadapter9_genvate.h | 231 | ||||
| -rw-r--r-- | src/wrapped/wrappedd3dadapter9_private.h | 5 | ||||
| -rw-r--r-- | src/wrapped/wrappedd3dadapter9_vtable.h | 744 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibdl.c | 5 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibxcb_private.h | 4 | ||||
| -rw-r--r-- | src/wrapped/wrappedlibxcbpresent.c | 23 | ||||
| -rw-r--r-- | src/wrapped/wrappedlibxcbpresent_private.h | 29 |
19 files changed, 2400 insertions, 6 deletions
diff --git a/src/library_list.h b/src/library_list.h index d830bc6b..fa492fec 100755 --- a/src/library_list.h +++ b/src/library_list.h @@ -58,6 +58,7 @@ GO("libxcb-xfixes.so.0", libxcbxfixes) GO("libxcb-shape.so.0", libxcbshape) GO("libxcb-shm.so.0", libxcbshm) GO("libxcb-randr.so.0", libxcbrandr) +GO("libxcb-present.so.0", libxcbpresent) GO("libxcb-image.so.0", libxcbimage) GO("libxcb-keysyms.so.1", libxcbkeysyms) GO("libxcb-xtest.so.0", libxcbxtest) @@ -216,6 +217,7 @@ GO("libva-drm.so.2", libvadrm) GO("libva-x11.so.2", libvax11) GO("libva-wayland.so.2", libvawayland) GO("libvdpau.so.1", libvdpau) +GO("d3dadapter9.so.1", d3dadapter9) GO("ld-linux-x86-64.so.2", ldlinux) diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 8a0a4799..1db1135c 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -737,6 +737,7 @@ #() iFEpLi #() iFEpLp #() iFEppi +#() iFEppu #() iFEppd #() iFEppL #() iFEppp @@ -805,6 +806,7 @@ #() iFpCpi #() iFpWWu #() iFpuwp +#() iFpuiu #() iFpuiL #() iFpuip #() iFpuui @@ -1155,6 +1157,7 @@ #() iFEippL #() iFEippp #() iFEpiii +#() iFEpiup #() iFEpipi #() iFEpipp #() iFEpipV @@ -1202,6 +1205,7 @@ #() iFpiipp #() iFpiIip #() iFpiuwp +#() iFpiupu #() iFpiUUU #() iFpipii #() iFpipiu @@ -1211,15 +1215,20 @@ #() iFpippW #() iFpippp #() iFpCCCC +#() iFpuiii +#() iFpuiup #() iFpuill #() iFpuipi #() iFpuuip #() iFpuuui #() iFpuuup #() iFpuuLL +#() iFpuupu #() iFpuupp #() iFpupiU +#() iFpupuu #() iFpupup +#() iFpuppu #() iFpuppp #() iFpUiUi #() iFpUupp @@ -1250,6 +1259,8 @@ #() iFpppiL #() iFpppip #() iFpppui +#() iFpppuu +#() iFpppup #() iFpppUi #() iFpppLi #() iFpppLp @@ -1497,6 +1508,7 @@ #() iFEpilpV #() iFEpippi #() iFEpIppp +#() iFEpuuip #() iFEpuppp #() iFEpUppp #() iFEppppp @@ -1517,11 +1529,13 @@ #() iFpiiiii #() iFpiiiip #() iFpiiipp +#() iFpiiuii #() iFpiipip #() iFpiippu #() iFpiippp #() iFpiuuup #() iFpiuupp +#() iFpiuppu #() iFpiUUpp #() iFpipipi #() iFpippip @@ -1529,6 +1543,7 @@ #() iFpipppp #() iFpCpipu #() iFpWpppp +#() iFpuiiii #() iFpuiCpp #() iFpuippp #() iFpupuui @@ -1571,6 +1586,7 @@ #() iFppppip #() iFppppup #() iFpppppi +#() iFpppppu #() iFpppppL #() iFpppppp #() uFEiippp @@ -1625,6 +1641,7 @@ #() pFpuuwwu #() pFpuuuuu #() pFpuuupu +#() pFpuuUUU #() pFplpppp #() pFppiiii #() pFppiipp @@ -1750,6 +1767,7 @@ #() iFpiiiiip #() iFpiiiuwp #() iFpiiuuiu +#() iFpiiuuuu #() iFpiipppp #() iFpiuiipp #() iFpiupiii @@ -1760,12 +1778,17 @@ #() iFpippppp #() iFpIIpppp #() iFpWppppW +#() iFpuiiiip +#() iFpuiiuii #() iFpuiCuCp #() iFpuiuupp +#() iFpuipupp #() iFpuuiuui +#() iFpuuuppu #() iFpuupppp #() iFpupiLpL #() iFpupuuui +#() iFpupuufu #() iFpupupui #() iFpuppppp #() iFpLipipi @@ -1791,6 +1814,7 @@ #() iFpppippi #() iFpppippp #() iFpppuiii +#() iFpppuppp #() iFppppiii #() iFppppipp #() iFppppdpi @@ -1905,6 +1929,8 @@ #() vFpppppuuu #() vFpppppppp #() iFEpippppp +#() iFEpuuiipp +#() iFEpuuuipp #() iFEpuuLppp #() iFEpUUuppp #() iFEppipppp @@ -1919,6 +1945,7 @@ #() iFpWCuWCuu #() iFpWWipppp #() iFpuiipppp +#() iFpuipuppp #() iFpuippLpp #() iFpuuiiiii #() iFpuuupupu @@ -2023,6 +2050,8 @@ #() vFppppipiip #() vFpppppippp #() iFEpiiiiipi +#() iFEpuuiippu +#() iFEpuuuiipp #() iFEpppipppp #() iFEppplPPPP #() iFEpppppupp @@ -2032,7 +2061,9 @@ #() iFipiipippi #() iFuilpluluf #() iFdddpppppp +#() iFpiuuupipu #() iFpipLpiiip +#() iFpuiuuipip #() iFpuuuuuuuu #() iFpdiiiUiUp #() iFppiiiiiii @@ -2042,6 +2073,7 @@ #() iFpppiiuuii #() iFpppiipiiu #() iFppppiiupp +#() iFppppupiii #() iFppppppppu #() iFppppppppp #() uFEipippppp @@ -2098,6 +2130,9 @@ #() vFppdddddddd #() vFpppppppppp #() iFEpiiiiippp +#() iFEpuipupppp +#() iFEpuuiiuipp +#() iFEpuuuuiipp #() iFEpupppLppL #() iFEppppppipp #() iFEppppppppp @@ -2105,6 +2140,7 @@ #() iFpiipiiipip #() iFpippddiidd #() iFpCuWCCCCup +#() iFpuipuppppp #() iFpuupiuiipp #() iFpddpippppp #() iFppuuiiiiii @@ -2151,6 +2187,8 @@ #() vFppipppiiiii #() vFppipppuiiii #() vFppppppppppp +#() iFEpuuiiuippu +#() iFEpuuuuuiipp #() iFEpppipppppp #() iFEppppiiiiuu #() iFiiiiiiiiiip @@ -2234,6 +2272,7 @@ #() vFuuuiiiiiuiiiiilll #() vFppiiiiddddiiiiiuu #() vFpppuppiipppuUUUpi +#() pFpuuuuuwwuuuuUUUup #() pFppippipipipipipip #() vFppuiiiiipuiiiiiiii #() vFpppipppppppppppppp @@ -2256,7 +2295,6 @@ #!defined(HAVE_LD80BITS) KFKp #!defined(HAVE_LD80BITS) vFppippKKC #defined(NOALIGN) iFipiip -#!defined(NOALIGN) iFEppu #!defined(NOALIGN) iFEiiip #!defined(NOALIGN) iFEipii #!defined(NOALIGN) iFEipiip @@ -2324,6 +2362,9 @@ wrappedcurl: - curl_multi_setopt - uFpup: - curl_easy_setopt +wrappedd3dadapter9: +- pFp: + - D3DAdapter9GetProc wrappeddbus: - vFppp: - dbus_connection_remove_filter @@ -3594,6 +3635,7 @@ wrappedlibxcbglx: wrappedlibxcbicccm: wrappedlibxcbimage: wrappedlibxcbkeysyms: +wrappedlibxcbpresent: wrappedlibxcbrandr: wrappedlibxcbrender: wrappedlibxcbrenderutil: diff --git a/src/wrapped/generated/wrappedd3dadapter9defs.h b/src/wrapped/generated/wrappedd3dadapter9defs.h new file mode 100644 index 00000000..aea6f4d8 --- /dev/null +++ b/src/wrapped/generated/wrappedd3dadapter9defs.h @@ -0,0 +1,8 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v2.1.0.16) * + *******************************************************************/ +#ifndef __wrappedd3dadapter9DEFS_H_ +#define __wrappedd3dadapter9DEFS_H_ + + +#endif // __wrappedd3dadapter9DEFS_H_ diff --git a/src/wrapped/generated/wrappedd3dadapter9types.h b/src/wrapped/generated/wrappedd3dadapter9types.h new file mode 100644 index 00000000..d56d88d7 --- /dev/null +++ b/src/wrapped/generated/wrappedd3dadapter9types.h @@ -0,0 +1,19 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v2.1.0.16) * + *******************************************************************/ +#ifndef __wrappedd3dadapter9TYPES_H_ +#define __wrappedd3dadapter9TYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void* (*pFp_t)(void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(D3DAdapter9GetProc, pFp_t) + +#endif // __wrappedd3dadapter9TYPES_H_ diff --git a/src/wrapped/generated/wrappedd3dadapter9undefs.h b/src/wrapped/generated/wrappedd3dadapter9undefs.h new file mode 100644 index 00000000..cdac132a --- /dev/null +++ b/src/wrapped/generated/wrappedd3dadapter9undefs.h @@ -0,0 +1,8 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v2.1.0.16) * + *******************************************************************/ +#ifndef __wrappedd3dadapter9UNDEFS_H_ +#define __wrappedd3dadapter9UNDEFS_H_ + + +#endif // __wrappedd3dadapter9UNDEFS_H_ diff --git a/src/wrapped/generated/wrappedlibxcbpresentdefs.h b/src/wrapped/generated/wrappedlibxcbpresentdefs.h new file mode 100644 index 00000000..b12d69f3 --- /dev/null +++ b/src/wrapped/generated/wrappedlibxcbpresentdefs.h @@ -0,0 +1,8 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v2.1.0.16) * + *******************************************************************/ +#ifndef __wrappedlibxcbpresentDEFS_H_ +#define __wrappedlibxcbpresentDEFS_H_ + + +#endif // __wrappedlibxcbpresentDEFS_H_ diff --git a/src/wrapped/generated/wrappedlibxcbpresenttypes.h b/src/wrapped/generated/wrappedlibxcbpresenttypes.h new file mode 100644 index 00000000..47805f65 --- /dev/null +++ b/src/wrapped/generated/wrappedlibxcbpresenttypes.h @@ -0,0 +1,17 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v2.1.0.16) * + *******************************************************************/ +#ifndef __wrappedlibxcbpresentTYPES_H_ +#define __wrappedlibxcbpresentTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + + +#define SUPER() ADDED_FUNCTIONS() + +#endif // __wrappedlibxcbpresentTYPES_H_ diff --git a/src/wrapped/generated/wrappedlibxcbpresentundefs.h b/src/wrapped/generated/wrappedlibxcbpresentundefs.h new file mode 100644 index 00000000..f5be83c7 --- /dev/null +++ b/src/wrapped/generated/wrappedlibxcbpresentundefs.h @@ -0,0 +1,8 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v2.1.0.16) * + *******************************************************************/ +#ifndef __wrappedlibxcbpresentUNDEFS_H_ +#define __wrappedlibxcbpresentUNDEFS_H_ + + +#endif // __wrappedlibxcbpresentUNDEFS_H_ diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 1e4bb28f..b5192ffc 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -771,6 +771,7 @@ typedef int64_t (*iFEpUp_t)(x64emu_t*, void*, uint64_t, void*); typedef int64_t (*iFEpLi_t)(x64emu_t*, void*, uintptr_t, int64_t); typedef int64_t (*iFEpLp_t)(x64emu_t*, void*, uintptr_t, void*); typedef int64_t (*iFEppi_t)(x64emu_t*, void*, void*, int64_t); +typedef int64_t (*iFEppu_t)(x64emu_t*, void*, void*, uint64_t); typedef int64_t (*iFEppd_t)(x64emu_t*, void*, void*, double); typedef int64_t (*iFEppL_t)(x64emu_t*, void*, void*, uintptr_t); typedef int64_t (*iFEppp_t)(x64emu_t*, void*, void*, void*); @@ -839,6 +840,7 @@ typedef int64_t (*iFpCCC_t)(void*, uint8_t, uint8_t, uint8_t); typedef int64_t (*iFpCpi_t)(void*, uint8_t, void*, int64_t); typedef int64_t (*iFpWWu_t)(void*, uint16_t, uint16_t, uint64_t); typedef int64_t (*iFpuwp_t)(void*, uint64_t, int16_t, void*); +typedef int64_t (*iFpuiu_t)(void*, uint64_t, int64_t, uint64_t); typedef int64_t (*iFpuiL_t)(void*, uint64_t, int64_t, uintptr_t); typedef int64_t (*iFpuip_t)(void*, uint64_t, int64_t, void*); typedef int64_t (*iFpuui_t)(void*, uint64_t, uint64_t, int64_t); @@ -1189,6 +1191,7 @@ typedef int64_t (*iFEippi_t)(x64emu_t*, int64_t, void*, void*, int64_t); typedef int64_t (*iFEippL_t)(x64emu_t*, int64_t, void*, void*, uintptr_t); typedef int64_t (*iFEippp_t)(x64emu_t*, int64_t, void*, void*, void*); typedef int64_t (*iFEpiii_t)(x64emu_t*, void*, int64_t, int64_t, int64_t); +typedef int64_t (*iFEpiup_t)(x64emu_t*, void*, int64_t, uint64_t, void*); typedef int64_t (*iFEpipi_t)(x64emu_t*, void*, int64_t, void*, int64_t); typedef int64_t (*iFEpipp_t)(x64emu_t*, void*, int64_t, void*, void*); typedef int64_t (*iFEpipV_t)(x64emu_t*, void*, int64_t, void*, void*); @@ -1236,6 +1239,7 @@ typedef int64_t (*iFpiipi_t)(void*, int64_t, int64_t, void*, int64_t); typedef int64_t (*iFpiipp_t)(void*, int64_t, int64_t, void*, void*); typedef int64_t (*iFpiIip_t)(void*, int64_t, int64_t, int64_t, void*); typedef int64_t (*iFpiuwp_t)(void*, int64_t, uint64_t, int16_t, void*); +typedef int64_t (*iFpiupu_t)(void*, int64_t, uint64_t, void*, uint64_t); typedef int64_t (*iFpiUUU_t)(void*, int64_t, uint64_t, uint64_t, uint64_t); typedef int64_t (*iFpipii_t)(void*, int64_t, void*, int64_t, int64_t); typedef int64_t (*iFpipiu_t)(void*, int64_t, void*, int64_t, uint64_t); @@ -1245,15 +1249,20 @@ typedef int64_t (*iFpippi_t)(void*, int64_t, void*, void*, int64_t); typedef int64_t (*iFpippW_t)(void*, int64_t, void*, void*, uint16_t); typedef int64_t (*iFpippp_t)(void*, int64_t, void*, void*, void*); typedef int64_t (*iFpCCCC_t)(void*, uint8_t, uint8_t, uint8_t, uint8_t); +typedef int64_t (*iFpuiii_t)(void*, uint64_t, int64_t, int64_t, int64_t); +typedef int64_t (*iFpuiup_t)(void*, uint64_t, int64_t, uint64_t, void*); typedef int64_t (*iFpuill_t)(void*, uint64_t, int64_t, intptr_t, intptr_t); typedef int64_t (*iFpuipi_t)(void*, uint64_t, int64_t, void*, int64_t); typedef int64_t (*iFpuuip_t)(void*, uint64_t, uint64_t, int64_t, void*); typedef int64_t (*iFpuuui_t)(void*, uint64_t, uint64_t, uint64_t, int64_t); typedef int64_t (*iFpuuup_t)(void*, uint64_t, uint64_t, uint64_t, void*); typedef int64_t (*iFpuuLL_t)(void*, uint64_t, uint64_t, uintptr_t, uintptr_t); +typedef int64_t (*iFpuupu_t)(void*, uint64_t, uint64_t, void*, uint64_t); typedef int64_t (*iFpuupp_t)(void*, uint64_t, uint64_t, void*, void*); typedef int64_t (*iFpupiU_t)(void*, uint64_t, void*, int64_t, uint64_t); +typedef int64_t (*iFpupuu_t)(void*, uint64_t, void*, uint64_t, uint64_t); typedef int64_t (*iFpupup_t)(void*, uint64_t, void*, uint64_t, void*); +typedef int64_t (*iFpuppu_t)(void*, uint64_t, void*, void*, uint64_t); typedef int64_t (*iFpuppp_t)(void*, uint64_t, void*, void*, void*); typedef int64_t (*iFpUiUi_t)(void*, uint64_t, int64_t, uint64_t, int64_t); typedef int64_t (*iFpUupp_t)(void*, uint64_t, uint64_t, void*, void*); @@ -1284,6 +1293,8 @@ typedef int64_t (*iFpppii_t)(void*, void*, void*, int64_t, int64_t); typedef int64_t (*iFpppiL_t)(void*, void*, void*, int64_t, uintptr_t); typedef int64_t (*iFpppip_t)(void*, void*, void*, int64_t, void*); typedef int64_t (*iFpppui_t)(void*, void*, void*, uint64_t, int64_t); +typedef int64_t (*iFpppuu_t)(void*, void*, void*, uint64_t, uint64_t); +typedef int64_t (*iFpppup_t)(void*, void*, void*, uint64_t, void*); typedef int64_t (*iFpppUi_t)(void*, void*, void*, uint64_t, int64_t); typedef int64_t (*iFpppLi_t)(void*, void*, void*, uintptr_t, int64_t); typedef int64_t (*iFpppLp_t)(void*, void*, void*, uintptr_t, void*); @@ -1531,6 +1542,7 @@ typedef int64_t (*iFEpiipV_t)(x64emu_t*, void*, int64_t, int64_t, void*, void*); typedef int64_t (*iFEpilpV_t)(x64emu_t*, void*, int64_t, intptr_t, void*, void*); typedef int64_t (*iFEpippi_t)(x64emu_t*, void*, int64_t, void*, void*, int64_t); typedef int64_t (*iFEpIppp_t)(x64emu_t*, void*, int64_t, void*, void*, void*); +typedef int64_t (*iFEpuuip_t)(x64emu_t*, void*, uint64_t, uint64_t, int64_t, void*); typedef int64_t (*iFEpuppp_t)(x64emu_t*, void*, uint64_t, void*, void*, void*); typedef int64_t (*iFEpUppp_t)(x64emu_t*, void*, uint64_t, void*, void*, void*); typedef int64_t (*iFEppppp_t)(x64emu_t*, void*, void*, void*, void*, void*); @@ -1551,11 +1563,13 @@ typedef int64_t (*iFLppipp_t)(uintptr_t, void*, void*, int64_t, void*, void*); typedef int64_t (*iFpiiiii_t)(void*, int64_t, int64_t, int64_t, int64_t, int64_t); typedef int64_t (*iFpiiiip_t)(void*, int64_t, int64_t, int64_t, int64_t, void*); typedef int64_t (*iFpiiipp_t)(void*, int64_t, int64_t, int64_t, void*, void*); +typedef int64_t (*iFpiiuii_t)(void*, int64_t, int64_t, uint64_t, int64_t, int64_t); typedef int64_t (*iFpiipip_t)(void*, int64_t, int64_t, void*, int64_t, void*); typedef int64_t (*iFpiippu_t)(void*, int64_t, int64_t, void*, void*, uint64_t); typedef int64_t (*iFpiippp_t)(void*, int64_t, int64_t, void*, void*, void*); typedef int64_t (*iFpiuuup_t)(void*, int64_t, uint64_t, uint64_t, uint64_t, void*); typedef int64_t (*iFpiuupp_t)(void*, int64_t, uint64_t, uint64_t, void*, void*); +typedef int64_t (*iFpiuppu_t)(void*, int64_t, uint64_t, void*, void*, uint64_t); typedef int64_t (*iFpiUUpp_t)(void*, int64_t, uint64_t, uint64_t, void*, void*); typedef int64_t (*iFpipipi_t)(void*, int64_t, void*, int64_t, void*, int64_t); typedef int64_t (*iFpippip_t)(void*, int64_t, void*, void*, int64_t, void*); @@ -1563,6 +1577,7 @@ typedef int64_t (*iFpipppL_t)(void*, int64_t, void*, void*, void*, uintptr_t); typedef int64_t (*iFpipppp_t)(void*, int64_t, void*, void*, void*, void*); typedef int64_t (*iFpCpipu_t)(void*, uint8_t, void*, int64_t, void*, uint64_t); typedef int64_t (*iFpWpppp_t)(void*, uint16_t, void*, void*, void*, void*); +typedef int64_t (*iFpuiiii_t)(void*, uint64_t, int64_t, int64_t, int64_t, int64_t); typedef int64_t (*iFpuiCpp_t)(void*, uint64_t, int64_t, uint8_t, void*, void*); typedef int64_t (*iFpuippp_t)(void*, uint64_t, int64_t, void*, void*, void*); typedef int64_t (*iFpupuui_t)(void*, uint64_t, void*, uint64_t, uint64_t, int64_t); @@ -1605,6 +1620,7 @@ typedef int64_t (*iFppppiu_t)(void*, void*, void*, void*, int64_t, uint64_t); typedef int64_t (*iFppppip_t)(void*, void*, void*, void*, int64_t, void*); typedef int64_t (*iFppppup_t)(void*, void*, void*, void*, uint64_t, void*); typedef int64_t (*iFpppppi_t)(void*, void*, void*, void*, void*, int64_t); +typedef int64_t (*iFpppppu_t)(void*, void*, void*, void*, void*, uint64_t); typedef int64_t (*iFpppppL_t)(void*, void*, void*, void*, void*, uintptr_t); typedef int64_t (*iFpppppp_t)(void*, void*, void*, void*, void*, void*); typedef uint64_t (*uFEiippp_t)(x64emu_t*, int64_t, int64_t, void*, void*, void*); @@ -1659,6 +1675,7 @@ typedef void* (*pFpCuuup_t)(void*, uint8_t, uint64_t, uint64_t, uint64_t, void*) typedef void* (*pFpuuwwu_t)(void*, uint64_t, uint64_t, int16_t, int16_t, uint64_t); typedef void* (*pFpuuuuu_t)(void*, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t); typedef void* (*pFpuuupu_t)(void*, uint64_t, uint64_t, uint64_t, void*, uint64_t); +typedef void* (*pFpuuUUU_t)(void*, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t); typedef void* (*pFplpppp_t)(void*, intptr_t, void*, void*, void*, void*); typedef void* (*pFppiiii_t)(void*, void*, int64_t, int64_t, int64_t, int64_t); typedef void* (*pFppiipp_t)(void*, void*, int64_t, int64_t, void*, void*); @@ -1784,6 +1801,7 @@ typedef int64_t (*iFpiiiiii_t)(void*, int64_t, int64_t, int64_t, int64_t, int64_ typedef int64_t (*iFpiiiiip_t)(void*, int64_t, int64_t, int64_t, int64_t, int64_t, void*); typedef int64_t (*iFpiiiuwp_t)(void*, int64_t, int64_t, int64_t, uint64_t, int16_t, void*); typedef int64_t (*iFpiiuuiu_t)(void*, int64_t, int64_t, uint64_t, uint64_t, int64_t, uint64_t); +typedef int64_t (*iFpiiuuuu_t)(void*, int64_t, int64_t, uint64_t, uint64_t, uint64_t, uint64_t); typedef int64_t (*iFpiipppp_t)(void*, int64_t, int64_t, void*, void*, void*, void*); typedef int64_t (*iFpiuiipp_t)(void*, int64_t, uint64_t, int64_t, int64_t, void*, void*); typedef int64_t (*iFpiupiii_t)(void*, int64_t, uint64_t, void*, int64_t, int64_t, int64_t); @@ -1794,12 +1812,17 @@ typedef int64_t (*iFpippppW_t)(void*, int64_t, void*, void*, void*, void*, uint1 typedef int64_t (*iFpippppp_t)(void*, int64_t, void*, void*, void*, void*, void*); typedef int64_t (*iFpIIpppp_t)(void*, int64_t, int64_t, void*, void*, void*, void*); typedef int64_t (*iFpWppppW_t)(void*, uint16_t, void*, void*, void*, void*, uint16_t); +typedef int64_t (*iFpuiiiip_t)(void*, uint64_t, int64_t, int64_t, int64_t, int64_t, void*); +typedef int64_t (*iFpuiiuii_t)(void*, uint64_t, int64_t, int64_t, uint64_t, int64_t, int64_t); typedef int64_t (*iFpuiCuCp_t)(void*, uint64_t, int64_t, uint8_t, uint64_t, uint8_t, void*); typedef int64_t (*iFpuiuupp_t)(void*, uint64_t, int64_t, uint64_t, uint64_t, void*, void*); +typedef int64_t (*iFpuipupp_t)(void*, uint64_t, int64_t, void*, uint64_t, void*, void*); typedef int64_t (*iFpuuiuui_t)(void*, uint64_t, uint64_t, int64_t, uint64_t, uint64_t, int64_t); +typedef int64_t (*iFpuuuppu_t)(void*, uint64_t, uint64_t, uint64_t, void*, void*, uint64_t); typedef int64_t (*iFpuupppp_t)(void*, uint64_t, uint64_t, void*, void*, void*, void*); typedef int64_t (*iFpupiLpL_t)(void*, uint64_t, void*, int64_t, uintptr_t, void*, uintptr_t); typedef int64_t (*iFpupuuui_t)(void*, uint64_t, void*, uint64_t, uint64_t, uint64_t, int64_t); +typedef int64_t (*iFpupuufu_t)(void*, uint64_t, void*, uint64_t, uint64_t, float, uint64_t); typedef int64_t (*iFpupupui_t)(void*, uint64_t, void*, uint64_t, void*, uint64_t, int64_t); typedef int64_t (*iFpuppppp_t)(void*, uint64_t, void*, void*, void*, void*, void*); typedef int64_t (*iFpLipipi_t)(void*, uintptr_t, int64_t, void*, int64_t, void*, int64_t); @@ -1825,6 +1848,7 @@ typedef int64_t (*iFpppiuwu_t)(void*, void*, void*, int64_t, uint64_t, int16_t, typedef int64_t (*iFpppippi_t)(void*, void*, void*, int64_t, void*, void*, int64_t); typedef int64_t (*iFpppippp_t)(void*, void*, void*, int64_t, void*, void*, void*); typedef int64_t (*iFpppuiii_t)(void*, void*, void*, uint64_t, int64_t, int64_t, int64_t); +typedef int64_t (*iFpppuppp_t)(void*, void*, void*, uint64_t, void*, void*, void*); typedef int64_t (*iFppppiii_t)(void*, void*, void*, void*, int64_t, int64_t, int64_t); typedef int64_t (*iFppppipp_t)(void*, void*, void*, void*, int64_t, void*, void*); typedef int64_t (*iFppppdpi_t)(void*, void*, void*, void*, double, void*, int64_t); @@ -1939,6 +1963,8 @@ typedef void (*vFppppiipi_t)(void*, void*, void*, void*, int64_t, int64_t, void* typedef void (*vFpppppuuu_t)(void*, void*, void*, void*, void*, uint64_t, uint64_t, uint64_t); typedef void (*vFpppppppp_t)(void*, void*, void*, void*, void*, void*, void*, void*); typedef int64_t (*iFEpippppp_t)(x64emu_t*, void*, int64_t, void*, void*, void*, void*, void*); +typedef int64_t (*iFEpuuiipp_t)(x64emu_t*, void*, uint64_t, uint64_t, int64_t, int64_t, void*, void*); +typedef int64_t (*iFEpuuuipp_t)(x64emu_t*, void*, uint64_t, uint64_t, uint64_t, int64_t, void*, void*); typedef int64_t (*iFEpuuLppp_t)(x64emu_t*, void*, uint64_t, uint64_t, uintptr_t, void*, void*, void*); typedef int64_t (*iFEpUUuppp_t)(x64emu_t*, void*, uint64_t, uint64_t, uint64_t, void*, void*, void*); typedef int64_t (*iFEppipppp_t)(x64emu_t*, void*, void*, int64_t, void*, void*, void*, void*); @@ -1953,6 +1979,7 @@ typedef int64_t (*iFpCCWWpWu_t)(void*, uint8_t, uint8_t, uint16_t, uint16_t, voi typedef int64_t (*iFpWCuWCuu_t)(void*, uint16_t, uint8_t, uint64_t, uint16_t, uint8_t, uint64_t, uint64_t); typedef int64_t (*iFpWWipppp_t)(void*, uint16_t, uint16_t, int64_t, void*, void*, void*, void*); typedef int64_t (*iFpuiipppp_t)(void*, uint64_t, int64_t, int64_t, void*, void*, void*, void*); +typedef int64_t (*iFpuipuppp_t)(void*, uint64_t, int64_t, void*, uint64_t, void*, void*, void*); typedef int64_t (*iFpuippLpp_t)(void*, uint64_t, int64_t, void*, void*, uintptr_t, void*, void*); typedef int64_t (*iFpuuiiiii_t)(void*, uint64_t, uint64_t, int64_t, int64_t, int64_t, int64_t, int64_t); typedef int64_t (*iFpuuupupu_t)(void*, uint64_t, uint64_t, uint64_t, void*, uint64_t, void*, uint64_t); @@ -2057,6 +2084,8 @@ typedef void (*vFpppiiiiii_t)(void*, void*, void*, int64_t, int64_t, int64_t, in typedef void (*vFppppipiip_t)(void*, void*, void*, void*, int64_t, void*, int64_t, int64_t, void*); typedef void (*vFpppppippp_t)(void*, void*, void*, void*, void*, int64_t, void*, void*, void*); typedef int64_t (*iFEpiiiiipi_t)(x64emu_t*, void*, int64_t, int64_t, int64_t, int64_t, int64_t, void*, int64_t); +typedef int64_t (*iFEpuuiippu_t)(x64emu_t*, void*, uint64_t, uint64_t, int64_t, int64_t, void*, void*, uint64_t); +typedef int64_t (*iFEpuuuiipp_t)(x64emu_t*, void*, uint64_t, uint64_t, uint64_t, int64_t, int64_t, void*, void*); typedef int64_t (*iFEpppipppp_t)(x64emu_t*, void*, void*, void*, int64_t, void*, void*, void*, void*); typedef int64_t (*iFEppplPPPP_t)(x64emu_t*, void*, void*, void*, intptr_t, void*, void*, void*, void*); typedef int64_t (*iFEpppppupp_t)(x64emu_t*, void*, void*, void*, void*, void*, uint64_t, void*, void*); @@ -2066,7 +2095,9 @@ typedef int64_t (*iFiiiipiiip_t)(int64_t, int64_t, int64_t, int64_t, void*, int6 typedef int64_t (*iFipiipippi_t)(int64_t, void*, int64_t, int64_t, void*, int64_t, void*, void*, int64_t); typedef int64_t (*iFuilpluluf_t)(uint64_t, int64_t, intptr_t, void*, intptr_t, uint64_t, intptr_t, uint64_t, float); typedef int64_t (*iFdddpppppp_t)(double, double, double, void*, void*, void*, void*, void*, void*); +typedef int64_t (*iFpiuuupipu_t)(void*, int64_t, uint64_t, uint64_t, uint64_t, void*, int64_t, void*, uint64_t); typedef int64_t (*iFpipLpiiip_t)(void*, int64_t, void*, uintptr_t, void*, int64_t, int64_t, int64_t, void*); +typedef int64_t (*iFpuiuuipip_t)(void*, uint64_t, int64_t, uint64_t, uint64_t, int64_t, void*, int64_t, void*); typedef int64_t (*iFpuuuuuuuu_t)(void*, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t); typedef int64_t (*iFpdiiiUiUp_t)(void*, double, int64_t, int64_t, int64_t, uint64_t, int64_t, uint64_t, void*); typedef int64_t (*iFppiiiiiii_t)(void*, void*, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t); @@ -2076,6 +2107,7 @@ typedef int64_t (*iFpppiiipip_t)(void*, void*, void*, int64_t, int64_t, int64_t, typedef int64_t (*iFpppiiuuii_t)(void*, void*, void*, int64_t, int64_t, uint64_t, uint64_t, int64_t, int64_t); typedef int64_t (*iFpppiipiiu_t)(void*, void*, void*, int64_t, int64_t, void*, int64_t, int64_t, uint64_t); typedef int64_t (*iFppppiiupp_t)(void*, void*, void*, void*, int64_t, int64_t, uint64_t, void*, void*); +typedef int64_t (*iFppppupiii_t)(void*, void*, void*, void*, uint64_t, void*, int64_t, int64_t, int64_t); typedef int64_t (*iFppppppppu_t)(void*, void*, void*, void*, void*, void*, void*, void*, uint64_t); typedef int64_t (*iFppppppppp_t)(void*, void*, void*, void*, void*, void*, void*, void*, void*); typedef uint64_t (*uFEipippppp_t)(x64emu_t*, int64_t, void*, int64_t, void*, void*, void*, void*, void*); @@ -2132,6 +2164,9 @@ typedef void (*vFppuuuuiiuu_t)(void*, void*, uint64_t, uint64_t, uint64_t, uint6 typedef void (*vFppdddddddd_t)(void*, void*, double, double, double, double, double, double, double, double); typedef void (*vFpppppppppp_t)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*); typedef int64_t (*iFEpiiiiippp_t)(x64emu_t*, void*, int64_t, int64_t, int64_t, int64_t, int64_t, void*, void*, void*); +typedef int64_t (*iFEpuipupppp_t)(x64emu_t*, void*, uint64_t, int64_t, void*, uint64_t, void*, void*, void*, void*); +typedef int64_t (*iFEpuuiiuipp_t)(x64emu_t*, void*, uint64_t, uint64_t, int64_t, int64_t, uint64_t, int64_t, void*, void*); +typedef int64_t (*iFEpuuuuiipp_t)(x64emu_t*, void*, uint64_t, uint64_t, uint64_t, uint64_t, int64_t, int64_t, void*, void*); typedef int64_t (*iFEpupppLppL_t)(x64emu_t*, void*, uint64_t, void*, void*, void*, uintptr_t, void*, void*, uintptr_t); typedef int64_t (*iFEppppppipp_t)(x64emu_t*, void*, void*, void*, void*, void*, void*, int64_t, void*, void*); typedef int64_t (*iFEppppppppp_t)(x64emu_t*, void*, void*, void*, void*, void*, void*, void*, void*, void*); @@ -2139,6 +2174,7 @@ typedef int64_t (*iFiiiiiiiiip_t)(int64_t, int64_t, int64_t, int64_t, int64_t, i typedef int64_t (*iFpiipiiipip_t)(void*, int64_t, int64_t, void*, int64_t, int64_t, int64_t, void*, int64_t, void*); typedef int64_t (*iFpippddiidd_t)(void*, int64_t, void*, void*, double, double, int64_t, int64_t, double, double); typedef int64_t (*iFpCuWCCCCup_t)(void*, uint8_t, uint64_t, uint16_t, uint8_t, uint8_t, uint8_t, uint8_t, uint64_t, void*); +typedef int64_t (*iFpuipuppppp_t)(void*, uint64_t, int64_t, void*, uint64_t, void*, void*, void*, void*, void*); typedef int64_t (*iFpuupiuiipp_t)(void*, uint64_t, uint64_t, void*, int64_t, uint64_t, int64_t, int64_t, void*, void*); typedef int64_t (*iFpddpippppp_t)(void*, double, double, void*, int64_t, void*, void*, void*, void*, void*); typedef int64_t (*iFppuuiiiiii_t)(void*, void*, uint64_t, uint64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t); @@ -2185,6 +2221,8 @@ typedef void (*vFppiipppiiii_t)(void*, void*, int64_t, int64_t, void*, void*, vo typedef void (*vFppipppiiiii_t)(void*, void*, int64_t, void*, void*, void*, int64_t, int64_t, int64_t, int64_t, int64_t); typedef void (*vFppipppuiiii_t)(void*, void*, int64_t, void*, void*, void*, uint64_t, int64_t, int64_t, int64_t, int64_t); typedef void (*vFppppppppppp_t)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*); +typedef int64_t (*iFEpuuiiuippu_t)(x64emu_t*, void*, uint64_t, uint64_t, int64_t, int64_t, uint64_t, int64_t, void*, void*, uint64_t); +typedef int64_t (*iFEpuuuuuiipp_t)(x64emu_t*, void*, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, int64_t, int64_t, void*, void*); typedef int64_t (*iFEpppipppppp_t)(x64emu_t*, void*, void*, void*, int64_t, void*, void*, void*, void*, void*, void*); typedef int64_t (*iFEppppiiiiuu_t)(x64emu_t*, void*, void*, void*, void*, int64_t, int64_t, int64_t, int64_t, uint64_t, uint64_t); typedef int64_t (*iFiiiiiiiiiip_t)(int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, void*); @@ -2268,6 +2306,7 @@ typedef void* (*pFpppppppppppppppp_t)(void*, void*, void*, void*, void*, void*, typedef void (*vFuuuiiiiiuiiiiilll_t)(uint64_t, uint64_t, uint64_t, int64_t, int64_t, int64_t, int64_t, int64_t, uint64_t, int64_t, int64_t, int64_t, int64_t, int64_t, intptr_t, intptr_t, intptr_t); typedef void (*vFppiiiiddddiiiiiuu_t)(void*, void*, int64_t, int64_t, int64_t, int64_t, double, double, double, double, int64_t, int64_t, int64_t, int64_t, int64_t, uint64_t, uint64_t); typedef void (*vFpppuppiipppuUUUpi_t)(void*, void*, void*, uint64_t, void*, void*, int64_t, int64_t, void*, void*, void*, uint64_t, uint64_t, uint64_t, uint64_t, void*, int64_t); +typedef void* (*pFpuuuuuwwuuuuUUUup_t)(void*, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, int16_t, int16_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, void*); typedef void* (*pFppippipipipipipip_t)(void*, void*, int64_t, void*, void*, int64_t, void*, int64_t, void*, int64_t, void*, int64_t, void*, int64_t, void*, int64_t, void*); typedef void (*vFppuiiiiipuiiiiiiii_t)(void*, void*, uint64_t, int64_t, int64_t, int64_t, int64_t, int64_t, void*, uint64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t); typedef void (*vFpppipppppppppppppp_t)(void*, void*, void*, int64_t, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*); @@ -2301,7 +2340,6 @@ typedef int64_t (*iFipiip_t)(int64_t, void*, int64_t, int64_t, void*); #endif #if !defined(NOALIGN) -typedef int64_t (*iFEppu_t)(x64emu_t*, void*, void*, uint64_t); typedef int64_t (*iFEiiip_t)(x64emu_t*, int64_t, int64_t, int64_t, void*); typedef int64_t (*iFEipii_t)(x64emu_t*, int64_t, void*, int64_t, int64_t); typedef int64_t (*iFEipiip_t)(x64emu_t*, int64_t, void*, int64_t, int64_t, void*); @@ -3046,6 +3084,7 @@ void iFEpUp(x64emu_t *emu, uintptr_t fcn) { iFEpUp_t fn = (iFEpUp_t)fcn; R_RAX=( void iFEpLi(x64emu_t *emu, uintptr_t fcn) { iFEpLi_t fn = (iFEpLi_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uintptr_t)R_RSI, (int64_t)R_RDX); } void iFEpLp(x64emu_t *emu, uintptr_t fcn) { iFEpLp_t fn = (iFEpLp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX); } void iFEppi(x64emu_t *emu, uintptr_t fcn) { iFEppi_t fn = (iFEppi_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX); } +void iFEppu(x64emu_t *emu, uintptr_t fcn) { iFEppu_t fn = (iFEppu_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (uint64_t)R_RDX); } void iFEppd(x64emu_t *emu, uintptr_t fcn) { iFEppd_t fn = (iFEppd_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (void*)R_RSI, emu->xmm[0].d[0]); } void iFEppL(x64emu_t *emu, uintptr_t fcn) { iFEppL_t fn = (iFEppL_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX); } void iFEppp(x64emu_t *emu, uintptr_t fcn) { iFEppp_t fn = (iFEppp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX); } @@ -3114,6 +3153,7 @@ void iFpCCC(x64emu_t *emu, uintptr_t fcn) { iFpCCC_t fn = (iFpCCC_t)fcn; R_RAX=( void iFpCpi(x64emu_t *emu, uintptr_t fcn) { iFpCpi_t fn = (iFpCpi_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint8_t)R_RSI, (void*)R_RDX, (int64_t)R_RCX); } void iFpWWu(x64emu_t *emu, uintptr_t fcn) { iFpWWu_t fn = (iFpWWu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint16_t)R_RSI, (uint16_t)R_RDX, (uint64_t)R_RCX); } void iFpuwp(x64emu_t *emu, uintptr_t fcn) { iFpuwp_t fn = (iFpuwp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int16_t)R_RDX, (void*)R_RCX); } +void iFpuiu(x64emu_t *emu, uintptr_t fcn) { iFpuiu_t fn = (iFpuiu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (uint64_t)R_RCX); } void iFpuiL(x64emu_t *emu, uintptr_t fcn) { iFpuiL_t fn = (iFpuiL_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (uintptr_t)R_RCX); } void iFpuip(x64emu_t *emu, uintptr_t fcn) { iFpuip_t fn = (iFpuip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX); } void iFpuui(x64emu_t *emu, uintptr_t fcn) { iFpuui_t fn = (iFpuui_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (int64_t)R_RCX); } @@ -3464,6 +3504,7 @@ void iFEippi(x64emu_t *emu, uintptr_t fcn) { iFEippi_t fn = (iFEippi_t)fcn; R_RA void iFEippL(x64emu_t *emu, uintptr_t fcn) { iFEippL_t fn = (iFEippL_t)fcn; R_RAX=(int64_t)fn(emu, (int64_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX); } void iFEippp(x64emu_t *emu, uintptr_t fcn) { iFEippp_t fn = (iFEippp_t)fcn; R_RAX=(int64_t)fn(emu, (int64_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX); } void iFEpiii(x64emu_t *emu, uintptr_t fcn) { iFEpiii_t fn = (iFEpiii_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX); } +void iFEpiup(x64emu_t *emu, uintptr_t fcn) { iFEpiup_t fn = (iFEpiup_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (uint64_t)R_RDX, (void*)R_RCX); } void iFEpipi(x64emu_t *emu, uintptr_t fcn) { iFEpipi_t fn = (iFEpipi_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (int64_t)R_RCX); } void iFEpipp(x64emu_t *emu, uintptr_t fcn) { iFEpipp_t fn = (iFEpipp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (void*)R_RCX); } void iFEpipV(x64emu_t *emu, uintptr_t fcn) { iFEpipV_t fn = (iFEpipV_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (void*)(R_RSP + 8)); } @@ -3511,6 +3552,7 @@ void iFpiipi(x64emu_t *emu, uintptr_t fcn) { iFpiipi_t fn = (iFpiipi_t)fcn; R_RA void iFpiipp(x64emu_t *emu, uintptr_t fcn) { iFpiipp_t fn = (iFpiipp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8); } void iFpiIip(x64emu_t *emu, uintptr_t fcn) { iFpiIip_t fn = (iFpiIip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (void*)R_R8); } void iFpiuwp(x64emu_t *emu, uintptr_t fcn) { iFpiuwp_t fn = (iFpiuwp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (uint64_t)R_RDX, (int16_t)R_RCX, (void*)R_R8); } +void iFpiupu(x64emu_t *emu, uintptr_t fcn) { iFpiupu_t fn = (iFpiupu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (uint64_t)R_RDX, (void*)R_RCX, (uint64_t)R_R8); } void iFpiUUU(x64emu_t *emu, uintptr_t fcn) { iFpiUUU_t fn = (iFpiUUU_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8); } void iFpipii(x64emu_t *emu, uintptr_t fcn) { iFpipii_t fn = (iFpipii_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (int64_t)R_RCX, (int64_t)R_R8); } void iFpipiu(x64emu_t *emu, uintptr_t fcn) { iFpipiu_t fn = (iFpipiu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (int64_t)R_RCX, (uint64_t)R_R8); } @@ -3520,15 +3562,20 @@ void iFpippi(x64emu_t *emu, uintptr_t fcn) { iFpippi_t fn = (iFpippi_t)fcn; R_RA void iFpippW(x64emu_t *emu, uintptr_t fcn) { iFpippW_t fn = (iFpippW_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint16_t)R_R8); } void iFpippp(x64emu_t *emu, uintptr_t fcn) { iFpippp_t fn = (iFpippp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); } void iFpCCCC(x64emu_t *emu, uintptr_t fcn) { iFpCCCC_t fn = (iFpCCCC_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint8_t)R_RDX, (uint8_t)R_RCX, (uint8_t)R_R8); } +void iFpuiii(x64emu_t *emu, uintptr_t fcn) { iFpuiii_t fn = (iFpuiii_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8); } +void iFpuiup(x64emu_t *emu, uintptr_t fcn) { iFpuiup_t fn = (iFpuiup_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (uint64_t)R_RCX, (void*)R_R8); } void iFpuill(x64emu_t *emu, uintptr_t fcn) { iFpuill_t fn = (iFpuill_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (intptr_t)R_RCX, (intptr_t)R_R8); } void iFpuipi(x64emu_t *emu, uintptr_t fcn) { iFpuipi_t fn = (iFpuipi_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (int64_t)R_R8); } void iFpuuip(x64emu_t *emu, uintptr_t fcn) { iFpuuip_t fn = (iFpuuip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (int64_t)R_RCX, (void*)R_R8); } void iFpuuui(x64emu_t *emu, uintptr_t fcn) { iFpuuui_t fn = (iFpuuui_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (int64_t)R_R8); } void iFpuuup(x64emu_t *emu, uintptr_t fcn) { iFpuuup_t fn = (iFpuuup_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (void*)R_R8); } void iFpuuLL(x64emu_t *emu, uintptr_t fcn) { iFpuuLL_t fn = (iFpuuLL_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uintptr_t)R_RCX, (uintptr_t)R_R8); } +void iFpuupu(x64emu_t *emu, uintptr_t fcn) { iFpuupu_t fn = (iFpuupu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (void*)R_RCX, (uint64_t)R_R8); } void iFpuupp(x64emu_t *emu, uintptr_t fcn) { iFpuupp_t fn = (iFpuupp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (void*)R_RCX, (void*)R_R8); } void iFpupiU(x64emu_t *emu, uintptr_t fcn) { iFpupiU_t fn = (iFpupiU_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (int64_t)R_RCX, (uint64_t)R_R8); } +void iFpupuu(x64emu_t *emu, uintptr_t fcn) { iFpupuu_t fn = (iFpupuu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8); } void iFpupup(x64emu_t *emu, uintptr_t fcn) { iFpupup_t fn = (iFpupup_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (uint64_t)R_RCX, (void*)R_R8); } +void iFpuppu(x64emu_t *emu, uintptr_t fcn) { iFpuppu_t fn = (iFpuppu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint64_t)R_R8); } void iFpuppp(x64emu_t *emu, uintptr_t fcn) { iFpuppp_t fn = (iFpuppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); } void iFpUiUi(x64emu_t *emu, uintptr_t fcn) { iFpUiUi_t fn = (iFpUiUi_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (uint64_t)R_RCX, (int64_t)R_R8); } void iFpUupp(x64emu_t *emu, uintptr_t fcn) { iFpUupp_t fn = (iFpUupp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (void*)R_RCX, (void*)R_R8); } @@ -3559,6 +3606,8 @@ void iFpppii(x64emu_t *emu, uintptr_t fcn) { iFpppii_t fn = (iFpppii_t)fcn; R_RA void iFpppiL(x64emu_t *emu, uintptr_t fcn) { iFpppiL_t fn = (iFpppiL_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int64_t)R_RCX, (uintptr_t)R_R8); } void iFpppip(x64emu_t *emu, uintptr_t fcn) { iFpppip_t fn = (iFpppip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int64_t)R_RCX, (void*)R_R8); } void iFpppui(x64emu_t *emu, uintptr_t fcn) { iFpppui_t fn = (iFpppui_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint64_t)R_RCX, (int64_t)R_R8); } +void iFpppuu(x64emu_t *emu, uintptr_t fcn) { iFpppuu_t fn = (iFpppuu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8); } +void iFpppup(x64emu_t *emu, uintptr_t fcn) { iFpppup_t fn = (iFpppup_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint64_t)R_RCX, (void*)R_R8); } void iFpppUi(x64emu_t *emu, uintptr_t fcn) { iFpppUi_t fn = (iFpppUi_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint64_t)R_RCX, (int64_t)R_R8); } void iFpppLi(x64emu_t *emu, uintptr_t fcn) { iFpppLi_t fn = (iFpppLi_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX, (int64_t)R_R8); } void iFpppLp(x64emu_t *emu, uintptr_t fcn) { iFpppLp_t fn = (iFpppLp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX, (void*)R_R8); } @@ -3806,6 +3855,7 @@ void iFEpiipV(x64emu_t *emu, uintptr_t fcn) { iFEpiipV_t fn = (iFEpiipV_t)fcn; R void iFEpilpV(x64emu_t *emu, uintptr_t fcn) { iFEpilpV_t fn = (iFEpilpV_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (intptr_t)R_RDX, (void*)R_RCX, (void*)(R_RSP + 8)); } void iFEpippi(x64emu_t *emu, uintptr_t fcn) { iFEpippi_t fn = (iFEpippi_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (int64_t)R_R8); } void iFEpIppp(x64emu_t *emu, uintptr_t fcn) { iFEpIppp_t fn = (iFEpIppp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); } +void iFEpuuip(x64emu_t *emu, uintptr_t fcn) { iFEpuuip_t fn = (iFEpuuip_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (int64_t)R_RCX, (void*)R_R8); } void iFEpuppp(x64emu_t *emu, uintptr_t fcn) { iFEpuppp_t fn = (iFEpuppp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); } void iFEpUppp(x64emu_t *emu, uintptr_t fcn) { iFEpUppp_t fn = (iFEpUppp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); } void iFEppppp(x64emu_t *emu, uintptr_t fcn) { iFEppppp_t fn = (iFEppppp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); } @@ -3826,11 +3876,13 @@ void iFLppipp(x64emu_t *emu, uintptr_t fcn) { iFLppipp_t fn = (iFLppipp_t)fcn; R void iFpiiiii(x64emu_t *emu, uintptr_t fcn) { iFpiiiii_t fn = (iFpiiiii_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9); } void iFpiiiip(x64emu_t *emu, uintptr_t fcn) { iFpiiiip_t fn = (iFpiiiip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (void*)R_R9); } void iFpiiipp(x64emu_t *emu, uintptr_t fcn) { iFpiiipp_t fn = (iFpiiipp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (void*)R_R8, (void*)R_R9); } +void iFpiiuii(x64emu_t *emu, uintptr_t fcn) { iFpiiuii_t fn = (iFpiiuii_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (uint64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9); } void iFpiipip(x64emu_t *emu, uintptr_t fcn) { iFpiipip_t fn = (iFpiipip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (int64_t)R_R8, (void*)R_R9); } void iFpiippu(x64emu_t *emu, uintptr_t fcn) { iFpiippu_t fn = (iFpiippu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (uint64_t)R_R9); } void iFpiippp(x64emu_t *emu, uintptr_t fcn) { iFpiippp_t fn = (iFpiippp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); } void iFpiuuup(x64emu_t *emu, uintptr_t fcn) { iFpiuuup_t fn = (iFpiuuup_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (void*)R_R9); } void iFpiuupp(x64emu_t *emu, uintptr_t fcn) { iFpiuupp_t fn = (iFpiuupp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (void*)R_R8, (void*)R_R9); } +void iFpiuppu(x64emu_t *emu, uintptr_t fcn) { iFpiuppu_t fn = (iFpiuppu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (uint64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (uint64_t)R_R9); } void iFpiUUpp(x64emu_t *emu, uintptr_t fcn) { iFpiUUpp_t fn = (iFpiUUpp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (void*)R_R8, (void*)R_R9); } void iFpipipi(x64emu_t *emu, uintptr_t fcn) { iFpipipi_t fn = (iFpipipi_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (int64_t)R_RCX, (void*)R_R8, (int64_t)R_R9); } void iFpippip(x64emu_t *emu, uintptr_t fcn) { iFpippip_t fn = (iFpippip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (int64_t)R_R8, (void*)R_R9); } @@ -3838,6 +3890,7 @@ void iFpipppL(x64emu_t *emu, uintptr_t fcn) { iFpipppL_t fn = (iFpipppL_t)fcn; R void iFpipppp(x64emu_t *emu, uintptr_t fcn) { iFpipppp_t fn = (iFpipppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); } void iFpCpipu(x64emu_t *emu, uintptr_t fcn) { iFpCpipu_t fn = (iFpCpipu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint8_t)R_RSI, (void*)R_RDX, (int64_t)R_RCX, (void*)R_R8, (uint64_t)R_R9); } void iFpWpppp(x64emu_t *emu, uintptr_t fcn) { iFpWpppp_t fn = (iFpWpppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint16_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); } +void iFpuiiii(x64emu_t *emu, uintptr_t fcn) { iFpuiiii_t fn = (iFpuiiii_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9); } void iFpuiCpp(x64emu_t *emu, uintptr_t fcn) { iFpuiCpp_t fn = (iFpuiCpp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (uint8_t)R_RCX, (void*)R_R8, (void*)R_R9); } void iFpuippp(x64emu_t *emu, uintptr_t fcn) { iFpuippp_t fn = (iFpuippp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); } void iFpupuui(x64emu_t *emu, uintptr_t fcn) { iFpupuui_t fn = (iFpupuui_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (int64_t)R_R9); } @@ -3880,6 +3933,7 @@ void iFppppiu(x64emu_t *emu, uintptr_t fcn) { iFppppiu_t fn = (iFppppiu_t)fcn; R void iFppppip(x64emu_t *emu, uintptr_t fcn) { iFppppip_t fn = (iFppppip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int64_t)R_R8, (void*)R_R9); } void iFppppup(x64emu_t *emu, uintptr_t fcn) { iFppppup_t fn = (iFppppup_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint64_t)R_R8, (void*)R_R9); } void iFpppppi(x64emu_t *emu, uintptr_t fcn) { iFpppppi_t fn = (iFpppppi_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (int64_t)R_R9); } +void iFpppppu(x64emu_t *emu, uintptr_t fcn) { iFpppppu_t fn = (iFpppppu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uint64_t)R_R9); } void iFpppppL(x64emu_t *emu, uintptr_t fcn) { iFpppppL_t fn = (iFpppppL_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uintptr_t)R_R9); } void iFpppppp(x64emu_t *emu, uintptr_t fcn) { iFpppppp_t fn = (iFpppppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); } void uFEiippp(x64emu_t *emu, uintptr_t fcn) { uFEiippp_t fn = (uFEiippp_t)fcn; R_RAX=(uint64_t)fn(emu, (int64_t)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); } @@ -3934,6 +3988,7 @@ void pFpCuuup(x64emu_t *emu, uintptr_t fcn) { pFpCuuup_t fn = (pFpCuuup_t)fcn; R void pFpuuwwu(x64emu_t *emu, uintptr_t fcn) { pFpuuwwu_t fn = (pFpuuwwu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (int16_t)R_RCX, (int16_t)R_R8, (uint64_t)R_R9); } void pFpuuuuu(x64emu_t *emu, uintptr_t fcn) { pFpuuuuu_t fn = (pFpuuuuu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (uint64_t)R_R9); } void pFpuuupu(x64emu_t *emu, uintptr_t fcn) { pFpuuupu_t fn = (pFpuuupu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (void*)R_R8, (uint64_t)R_R9); } +void pFpuuUUU(x64emu_t *emu, uintptr_t fcn) { pFpuuUUU_t fn = (pFpuuUUU_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (uint64_t)R_R9); } void pFplpppp(x64emu_t *emu, uintptr_t fcn) { pFplpppp_t fn = (pFplpppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (intptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); } void pFppiiii(x64emu_t *emu, uintptr_t fcn) { pFppiiii_t fn = (pFppiiii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9); } void pFppiipp(x64emu_t *emu, uintptr_t fcn) { pFppiipp_t fn = (pFppiipp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (void*)R_R8, (void*)R_R9); } @@ -4059,6 +4114,7 @@ void iFpiiiiii(x64emu_t *emu, uintptr_t fcn) { iFpiiiiii_t fn = (iFpiiiiii_t)fcn void iFpiiiiip(x64emu_t *emu, uintptr_t fcn) { iFpiiiiip_t fn = (iFpiiiiip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9, *(void**)(R_RSP + 8)); } void iFpiiiuwp(x64emu_t *emu, uintptr_t fcn) { iFpiiiuwp_t fn = (iFpiiiuwp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (uint64_t)R_R8, (int16_t)R_R9, *(void**)(R_RSP + 8)); } void iFpiiuuiu(x64emu_t *emu, uintptr_t fcn) { iFpiiuuiu_t fn = (iFpiiuuiu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (int64_t)R_R9, *(uint64_t*)(R_RSP + 8)); } +void iFpiiuuuu(x64emu_t *emu, uintptr_t fcn) { iFpiiuuuu_t fn = (iFpiiuuuu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (uint64_t)R_R9, *(uint64_t*)(R_RSP + 8)); } void iFpiipppp(x64emu_t *emu, uintptr_t fcn) { iFpiipppp_t fn = (iFpiipppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } void iFpiuiipp(x64emu_t *emu, uintptr_t fcn) { iFpiuiipp_t fn = (iFpiuiipp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (uint64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } void iFpiupiii(x64emu_t *emu, uintptr_t fcn) { iFpiupiii_t fn = (iFpiupiii_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (uint64_t)R_RDX, (void*)R_RCX, (int64_t)R_R8, (int64_t)R_R9, *(int64_t*)(R_RSP + 8)); } @@ -4069,12 +4125,17 @@ void iFpippppW(x64emu_t *emu, uintptr_t fcn) { iFpippppW_t fn = (iFpippppW_t)fcn void iFpippppp(x64emu_t *emu, uintptr_t fcn) { iFpippppp_t fn = (iFpippppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } void iFpIIpppp(x64emu_t *emu, uintptr_t fcn) { iFpIIpppp_t fn = (iFpIIpppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } void iFpWppppW(x64emu_t *emu, uintptr_t fcn) { iFpWppppW_t fn = (iFpWppppW_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint16_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(uint16_t*)(R_RSP + 8)); } +void iFpuiiiip(x64emu_t *emu, uintptr_t fcn) { iFpuiiiip_t fn = (iFpuiiiip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9, *(void**)(R_RSP + 8)); } +void iFpuiiuii(x64emu_t *emu, uintptr_t fcn) { iFpuiiuii_t fn = (iFpuiiuii_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (uint64_t)R_R8, (int64_t)R_R9, *(int64_t*)(R_RSP + 8)); } void iFpuiCuCp(x64emu_t *emu, uintptr_t fcn) { iFpuiCuCp_t fn = (iFpuiCuCp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (uint8_t)R_RCX, (uint64_t)R_R8, (uint8_t)R_R9, *(void**)(R_RSP + 8)); } void iFpuiuupp(x64emu_t *emu, uintptr_t fcn) { iFpuiuupp_t fn = (iFpuiuupp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } +void iFpuipupp(x64emu_t *emu, uintptr_t fcn) { iFpuipupp_t fn = (iFpuipupp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (uint64_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } void iFpuuiuui(x64emu_t *emu, uintptr_t fcn) { iFpuuiuui_t fn = (iFpuuiuui_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (int64_t)R_RCX, (uint64_t)R_R8, (uint64_t)R_R9, *(int64_t*)(R_RSP + 8)); } +void iFpuuuppu(x64emu_t *emu, uintptr_t fcn) { iFpuuuppu_t fn = (iFpuuuppu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (void*)R_R8, (void*)R_R9, *(uint64_t*)(R_RSP + 8)); } void iFpuupppp(x64emu_t *emu, uintptr_t fcn) { iFpuupppp_t fn = (iFpuupppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } void iFpupiLpL(x64emu_t *emu, uintptr_t fcn) { iFpupiLpL_t fn = (iFpupiLpL_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (int64_t)R_RCX, (uintptr_t)R_R8, (void*)R_R9, *(uintptr_t*)(R_RSP + 8)); } void iFpupuuui(x64emu_t *emu, uintptr_t fcn) { iFpupuuui_t fn = (iFpupuuui_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (uint64_t)R_R9, *(int64_t*)(R_RSP + 8)); } +void iFpupuufu(x64emu_t *emu, uintptr_t fcn) { iFpupuufu_t fn = (iFpupuufu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, emu->xmm[0].f[0], (uint64_t)R_R9); } void iFpupupui(x64emu_t *emu, uintptr_t fcn) { iFpupupui_t fn = (iFpupupui_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (uint64_t)R_RCX, (void*)R_R8, (uint64_t)R_R9, *(int64_t*)(R_RSP + 8)); } void iFpuppppp(x64emu_t *emu, uintptr_t fcn) { iFpuppppp_t fn = (iFpuppppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } void iFpLipipi(x64emu_t *emu, uintptr_t fcn) { iFpLipipi_t fn = (iFpLipipi_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (int64_t)R_R8, (void*)R_R9, *(int64_t*)(R_RSP + 8)); } @@ -4100,6 +4161,7 @@ void iFpppiuwu(x64emu_t *emu, uintptr_t fcn) { iFpppiuwu_t fn = (iFpppiuwu_t)fcn void iFpppippi(x64emu_t *emu, uintptr_t fcn) { iFpppippi_t fn = (iFpppippi_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int64_t)R_RCX, (void*)R_R8, (void*)R_R9, *(int64_t*)(R_RSP + 8)); } void iFpppippp(x64emu_t *emu, uintptr_t fcn) { iFpppippp_t fn = (iFpppippp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int64_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } void iFpppuiii(x64emu_t *emu, uintptr_t fcn) { iFpppuiii_t fn = (iFpppuiii_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9, *(int64_t*)(R_RSP + 8)); } +void iFpppuppp(x64emu_t *emu, uintptr_t fcn) { iFpppuppp_t fn = (iFpppuppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint64_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } void iFppppiii(x64emu_t *emu, uintptr_t fcn) { iFppppiii_t fn = (iFppppiii_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int64_t)R_R8, (int64_t)R_R9, *(int64_t*)(R_RSP + 8)); } void iFppppipp(x64emu_t *emu, uintptr_t fcn) { iFppppipp_t fn = (iFppppipp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int64_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } void iFppppdpi(x64emu_t *emu, uintptr_t fcn) { iFppppdpi_t fn = (iFppppdpi_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, emu->xmm[0].d[0], (void*)R_R8, (int64_t)R_R9); } @@ -4214,6 +4276,8 @@ void vFppppiipi(x64emu_t *emu, uintptr_t fcn) { vFppppiipi_t fn = (vFppppiipi_t) void vFpppppuuu(x64emu_t *emu, uintptr_t fcn) { vFpppppuuu_t fn = (vFpppppuuu_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uint64_t)R_R9, *(uint64_t*)(R_RSP + 8), *(uint64_t*)(R_RSP + 16)); } void vFpppppppp(x64emu_t *emu, uintptr_t fcn) { vFpppppppp_t fn = (vFpppppppp_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); } void iFEpippppp(x64emu_t *emu, uintptr_t fcn) { iFEpippppp_t fn = (iFEpippppp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } +void iFEpuuiipp(x64emu_t *emu, uintptr_t fcn) { iFEpuuiipp_t fn = (iFEpuuiipp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } +void iFEpuuuipp(x64emu_t *emu, uintptr_t fcn) { iFEpuuuipp_t fn = (iFEpuuuipp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (int64_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } void iFEpuuLppp(x64emu_t *emu, uintptr_t fcn) { iFEpuuLppp_t fn = (iFEpuuLppp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uintptr_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } void iFEpUUuppp(x64emu_t *emu, uintptr_t fcn) { iFEpUUuppp_t fn = (iFEpUUuppp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } void iFEppipppp(x64emu_t *emu, uintptr_t fcn) { iFEppipppp_t fn = (iFEppipppp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } @@ -4228,6 +4292,7 @@ void iFpCCWWpWu(x64emu_t *emu, uintptr_t fcn) { iFpCCWWpWu_t fn = (iFpCCWWpWu_t) void iFpWCuWCuu(x64emu_t *emu, uintptr_t fcn) { iFpWCuWCuu_t fn = (iFpWCuWCuu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint16_t)R_RSI, (uint8_t)R_RDX, (uint64_t)R_RCX, (uint16_t)R_R8, (uint8_t)R_R9, *(uint64_t*)(R_RSP + 8), *(uint64_t*)(R_RSP + 16)); } void iFpWWipppp(x64emu_t *emu, uintptr_t fcn) { iFpWWipppp_t fn = (iFpWWipppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint16_t)R_RSI, (uint16_t)R_RDX, (int64_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); } void iFpuiipppp(x64emu_t *emu, uintptr_t fcn) { iFpuiipppp_t fn = (iFpuiipppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); } +void iFpuipuppp(x64emu_t *emu, uintptr_t fcn) { iFpuipuppp_t fn = (iFpuipuppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (uint64_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); } void iFpuippLpp(x64emu_t *emu, uintptr_t fcn) { iFpuippLpp_t fn = (iFpuippLpp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (uintptr_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); } void iFpuuiiiii(x64emu_t *emu, uintptr_t fcn) { iFpuuiiiii_t fn = (iFpuuiiiii_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9, *(int64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16)); } void iFpuuupupu(x64emu_t *emu, uintptr_t fcn) { iFpuuupupu_t fn = (iFpuuupupu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (void*)R_R8, (uint64_t)R_R9, *(void**)(R_RSP + 8), *(uint64_t*)(R_RSP + 16)); } @@ -4332,6 +4397,8 @@ void vFpppiiiiii(x64emu_t *emu, uintptr_t fcn) { vFpppiiiiii_t fn = (vFpppiiiiii void vFppppipiip(x64emu_t *emu, uintptr_t fcn) { vFppppipiip_t fn = (vFppppipiip_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int64_t)R_R8, (void*)R_R9, *(int64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(void**)(R_RSP + 24)); } void vFpppppippp(x64emu_t *emu, uintptr_t fcn) { vFpppppippp_t fn = (vFpppppippp_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (int64_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); } void iFEpiiiiipi(x64emu_t *emu, uintptr_t fcn) { iFEpiiiiipi_t fn = (iFEpiiiiipi_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9, *(void**)(R_RSP + 8), *(int64_t*)(R_RSP + 16)); } +void iFEpuuiippu(x64emu_t *emu, uintptr_t fcn) { iFEpuuiippu_t fn = (iFEpuuiippu_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(uint64_t*)(R_RSP + 16)); } +void iFEpuuuiipp(x64emu_t *emu, uintptr_t fcn) { iFEpuuuiipp_t fn = (iFEpuuuiipp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); } void iFEpppipppp(x64emu_t *emu, uintptr_t fcn) { iFEpppipppp_t fn = (iFEpppipppp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int64_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); } void iFEppplPPPP(x64emu_t *emu, uintptr_t fcn) { iFEppplPPPP_t fn = (iFEppplPPPP_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (intptr_t)R_RCX, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24), *(void**)(R_RSP + 32)); } void iFEpppppupp(x64emu_t *emu, uintptr_t fcn) { iFEpppppupp_t fn = (iFEpppppupp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uint64_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); } @@ -4341,7 +4408,9 @@ void iFiiiipiiip(x64emu_t *emu, uintptr_t fcn) { iFiiiipiiip_t fn = (iFiiiipiiip void iFipiipippi(x64emu_t *emu, uintptr_t fcn) { iFipiipippi_t fn = (iFipiipippi_t)fcn; R_RAX=(int64_t)fn((int64_t)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (void*)R_R8, (int64_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(int64_t*)(R_RSP + 24)); } void iFuilpluluf(x64emu_t *emu, uintptr_t fcn) { iFuilpluluf_t fn = (iFuilpluluf_t)fcn; R_RAX=(int64_t)fn((uint64_t)R_RDI, (int64_t)R_RSI, (intptr_t)R_RDX, (void*)R_RCX, (intptr_t)R_R8, (uint64_t)R_R9, *(intptr_t*)(R_RSP + 8), *(uint64_t*)(R_RSP + 16), emu->xmm[0].f[0]); } void iFdddpppppp(x64emu_t *emu, uintptr_t fcn) { iFdddpppppp_t fn = (iFdddpppppp_t)fcn; R_RAX=(int64_t)fn(emu->xmm[0].d[0], emu->xmm[1].d[0], emu->xmm[2].d[0], (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); } +void iFpiuuupipu(x64emu_t *emu, uintptr_t fcn) { iFpiuuupipu_t fn = (iFpiuuupipu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (void*)R_R9, *(int64_t*)(R_RSP + 8), *(void**)(R_RSP + 16), *(uint64_t*)(R_RSP + 24)); } void iFpipLpiiip(x64emu_t *emu, uintptr_t fcn) { iFpipLpiiip_t fn = (iFpipLpiiip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX, (void*)R_R8, (int64_t)R_R9, *(int64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(void**)(R_RSP + 24)); } +void iFpuiuuipip(x64emu_t *emu, uintptr_t fcn) { iFpuiuuipip_t fn = (iFpuiuuipip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (int64_t)R_R9, *(void**)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(void**)(R_RSP + 24)); } void iFpuuuuuuuu(x64emu_t *emu, uintptr_t fcn) { iFpuuuuuuuu_t fn = (iFpuuuuuuuu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (uint64_t)R_R9, *(uint64_t*)(R_RSP + 8), *(uint64_t*)(R_RSP + 16), *(uint64_t*)(R_RSP + 24)); } void iFpdiiiUiUp(x64emu_t *emu, uintptr_t fcn) { iFpdiiiUiUp_t fn = (iFpdiiiUiUp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, emu->xmm[0].d[0], (int64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (uint64_t)R_R8, (int64_t)R_R9, *(uint64_t*)(R_RSP + 8), *(void**)(R_RSP + 16)); } void iFppiiiiiii(x64emu_t *emu, uintptr_t fcn) { iFppiiiiiii_t fn = (iFppiiiiiii_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9, *(int64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(int64_t*)(R_RSP + 24)); } @@ -4351,6 +4420,7 @@ void iFpppiiipip(x64emu_t *emu, uintptr_t fcn) { iFpppiiipip_t fn = (iFpppiiipip void iFpppiiuuii(x64emu_t *emu, uintptr_t fcn) { iFpppiiuuii_t fn = (iFpppiiuuii_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (uint64_t)R_R9, *(uint64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(int64_t*)(R_RSP + 24)); } void iFpppiipiiu(x64emu_t *emu, uintptr_t fcn) { iFpppiipiiu_t fn = (iFpppiipiiu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (void*)R_R9, *(int64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(uint64_t*)(R_RSP + 24)); } void iFppppiiupp(x64emu_t *emu, uintptr_t fcn) { iFppppiiupp_t fn = (iFppppiiupp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int64_t)R_R8, (int64_t)R_R9, *(uint64_t*)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); } +void iFppppupiii(x64emu_t *emu, uintptr_t fcn) { iFppppupiii_t fn = (iFppppupiii_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint64_t)R_R8, (void*)R_R9, *(int64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(int64_t*)(R_RSP + 24)); } void iFppppppppu(x64emu_t *emu, uintptr_t fcn) { iFppppppppu_t fn = (iFppppppppu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(uint64_t*)(R_RSP + 24)); } void iFppppppppp(x64emu_t *emu, uintptr_t fcn) { iFppppppppp_t fn = (iFppppppppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); } void uFEipippppp(x64emu_t *emu, uintptr_t fcn) { uFEipippppp_t fn = (uFEipippppp_t)fcn; R_RAX=(uint64_t)fn(emu, (int64_t)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); } @@ -4407,6 +4477,9 @@ void vFppuuuuiiuu(x64emu_t *emu, uintptr_t fcn) { vFppuuuuiiuu_t fn = (vFppuuuui void vFppdddddddd(x64emu_t *emu, uintptr_t fcn) { vFppdddddddd_t fn = (vFppdddddddd_t)fcn; fn((void*)R_RDI, (void*)R_RSI, emu->xmm[0].d[0], emu->xmm[1].d[0], emu->xmm[2].d[0], emu->xmm[3].d[0], emu->xmm[4].d[0], emu->xmm[5].d[0], emu->xmm[6].d[0], emu->xmm[7].d[0]); } void vFpppppppppp(x64emu_t *emu, uintptr_t fcn) { vFpppppppppp_t fn = (vFpppppppppp_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24), *(void**)(R_RSP + 32)); } void iFEpiiiiippp(x64emu_t *emu, uintptr_t fcn) { iFEpiiiiippp_t fn = (iFEpiiiiippp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); } +void iFEpuipupppp(x64emu_t *emu, uintptr_t fcn) { iFEpuipupppp_t fn = (iFEpuipupppp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (uint64_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); } +void iFEpuuiiuipp(x64emu_t *emu, uintptr_t fcn) { iFEpuuiiuipp_t fn = (iFEpuuiiuipp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (uint64_t)R_R9, *(int64_t*)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); } +void iFEpuuuuiipp(x64emu_t *emu, uintptr_t fcn) { iFEpuuuuiipp_t fn = (iFEpuuuuiipp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (int64_t)R_R9, *(int64_t*)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); } void iFEpupppLppL(x64emu_t *emu, uintptr_t fcn) { iFEpupppLppL_t fn = (iFEpupppLppL_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uintptr_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(uintptr_t*)(R_RSP + 24)); } void iFEppppppipp(x64emu_t *emu, uintptr_t fcn) { iFEppppppipp_t fn = (iFEppppppipp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(int64_t*)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); } void iFEppppppppp(x64emu_t *emu, uintptr_t fcn) { iFEppppppppp_t fn = (iFEppppppppp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); } @@ -4414,6 +4487,7 @@ void iFiiiiiiiiip(x64emu_t *emu, uintptr_t fcn) { iFiiiiiiiiip_t fn = (iFiiiiiii void iFpiipiiipip(x64emu_t *emu, uintptr_t fcn) { iFpiipiiipip_t fn = (iFpiipiiipip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (int64_t)R_R8, (int64_t)R_R9, *(int64_t*)(R_RSP + 8), *(void**)(R_RSP + 16), *(int64_t*)(R_RSP + 24), *(void**)(R_RSP + 32)); } void iFpippddiidd(x64emu_t *emu, uintptr_t fcn) { iFpippddiidd_t fn = (iFpippddiidd_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, emu->xmm[0].d[0], emu->xmm[1].d[0], (int64_t)R_R8, (int64_t)R_R9, emu->xmm[2].d[0], emu->xmm[3].d[0]); } void iFpCuWCCCCup(x64emu_t *emu, uintptr_t fcn) { iFpCuWCCCCup_t fn = (iFpCuWCCCCup_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint64_t)R_RDX, (uint16_t)R_RCX, (uint8_t)R_R8, (uint8_t)R_R9, *(uint8_t*)(R_RSP + 8), *(uint8_t*)(R_RSP + 16), *(uint64_t*)(R_RSP + 24), *(void**)(R_RSP + 32)); } +void iFpuipuppppp(x64emu_t *emu, uintptr_t fcn) { iFpuipuppppp_t fn = (iFpuipuppppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (uint64_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24), *(void**)(R_RSP + 32)); } void iFpuupiuiipp(x64emu_t *emu, uintptr_t fcn) { iFpuupiuiipp_t fn = (iFpuupiuiipp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (void*)R_RCX, (int64_t)R_R8, (uint64_t)R_R9, *(int64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(void**)(R_RSP + 24), *(void**)(R_RSP + 32)); } void iFpddpippppp(x64emu_t *emu, uintptr_t fcn) { iFpddpippppp_t fn = (iFpddpippppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, emu->xmm[0].d[0], emu->xmm[1].d[0], (void*)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); } void iFppuuiiiiii(x64emu_t *emu, uintptr_t fcn) { iFppuuiiiiii_t fn = (iFppuuiiiiii_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9, *(int64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(int64_t*)(R_RSP + 24), *(int64_t*)(R_RSP + 32)); } @@ -4460,6 +4534,8 @@ void vFppiipppiiii(x64emu_t *emu, uintptr_t fcn) { vFppiipppiiii_t fn = (vFppiip void vFppipppiiiii(x64emu_t *emu, uintptr_t fcn) { vFppipppiiiii_t fn = (vFppipppiiiii_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(int64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(int64_t*)(R_RSP + 24), *(int64_t*)(R_RSP + 32), *(int64_t*)(R_RSP + 40)); } void vFppipppuiiii(x64emu_t *emu, uintptr_t fcn) { vFppipppuiiii_t fn = (vFppipppuiiii_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(uint64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(int64_t*)(R_RSP + 24), *(int64_t*)(R_RSP + 32), *(int64_t*)(R_RSP + 40)); } void vFppppppppppp(x64emu_t *emu, uintptr_t fcn) { vFppppppppppp_t fn = (vFppppppppppp_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24), *(void**)(R_RSP + 32), *(void**)(R_RSP + 40)); } +void iFEpuuiiuippu(x64emu_t *emu, uintptr_t fcn) { iFEpuuiiuippu_t fn = (iFEpuuiiuippu_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (uint64_t)R_R9, *(int64_t*)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24), *(uint64_t*)(R_RSP + 32)); } +void iFEpuuuuuiipp(x64emu_t *emu, uintptr_t fcn) { iFEpuuuuuiipp_t fn = (iFEpuuuuuiipp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (uint64_t)R_R9, *(int64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(void**)(R_RSP + 24), *(void**)(R_RSP + 32)); } void iFEpppipppppp(x64emu_t *emu, uintptr_t fcn) { iFEpppipppppp_t fn = (iFEpppipppppp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int64_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24), *(void**)(R_RSP + 32)); } void iFEppppiiiiuu(x64emu_t *emu, uintptr_t fcn) { iFEppppiiiiuu_t fn = (iFEppppiiiiuu_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int64_t)R_R8, (int64_t)R_R9, *(int64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(uint64_t*)(R_RSP + 24), *(uint64_t*)(R_RSP + 32)); } void iFiiiiiiiiiip(x64emu_t *emu, uintptr_t fcn) { iFiiiiiiiiiip_t fn = (iFiiiiiiiiiip_t)fcn; R_RAX=(int64_t)fn((int64_t)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9, *(int64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(int64_t*)(R_RSP + 24), *(int64_t*)(R_RSP + 32), *(void**)(R_RSP + 40)); } @@ -4543,6 +4619,7 @@ void pFpppppppppppppppp(x64emu_t *emu, uintptr_t fcn) { pFpppppppppppppppp_t fn void vFuuuiiiiiuiiiiilll(x64emu_t *emu, uintptr_t fcn) { vFuuuiiiiiuiiiiilll_t fn = (vFuuuiiiiiuiiiiilll_t)fcn; fn((uint64_t)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9, *(int64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(uint64_t*)(R_RSP + 24), *(int64_t*)(R_RSP + 32), *(int64_t*)(R_RSP + 40), *(int64_t*)(R_RSP + 48), *(int64_t*)(R_RSP + 56), *(int64_t*)(R_RSP + 64), *(intptr_t*)(R_RSP + 72), *(intptr_t*)(R_RSP + 80), *(intptr_t*)(R_RSP + 88)); } void vFppiiiiddddiiiiiuu(x64emu_t *emu, uintptr_t fcn) { vFppiiiiddddiiiiiuu_t fn = (vFppiiiiddddiiiiiuu_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9, emu->xmm[0].d[0], emu->xmm[1].d[0], emu->xmm[2].d[0], emu->xmm[3].d[0], *(int64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(int64_t*)(R_RSP + 24), *(int64_t*)(R_RSP + 32), *(int64_t*)(R_RSP + 40), *(uint64_t*)(R_RSP + 48), *(uint64_t*)(R_RSP + 56)); } void vFpppuppiipppuUUUpi(x64emu_t *emu, uintptr_t fcn) { vFpppuppiipppuUUUpi_t fn = (vFpppuppiipppuUUUpi_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint64_t)R_RCX, (void*)R_R8, (void*)R_R9, *(int64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(void**)(R_RSP + 24), *(void**)(R_RSP + 32), *(void**)(R_RSP + 40), *(uint64_t*)(R_RSP + 48), *(uint64_t*)(R_RSP + 56), *(uint64_t*)(R_RSP + 64), *(uint64_t*)(R_RSP + 72), *(void**)(R_RSP + 80), *(int64_t*)(R_RSP + 88)); } +void pFpuuuuuwwuuuuUUUup(x64emu_t *emu, uintptr_t fcn) { pFpuuuuuwwuuuuUUUup_t fn = (pFpuuuuuwwuuuuUUUup_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (uint64_t)R_R9, *(int16_t*)(R_RSP + 8), *(int16_t*)(R_RSP + 16), *(uint64_t*)(R_RSP + 24), *(uint64_t*)(R_RSP + 32), *(uint64_t*)(R_RSP + 40), *(uint64_t*)(R_RSP + 48), *(uint64_t*)(R_RSP + 56), *(uint64_t*)(R_RSP + 64), *(uint64_t*)(R_RSP + 72), *(uint64_t*)(R_RSP + 80), *(void**)(R_RSP + 88)); } void pFppippipipipipipip(x64emu_t *emu, uintptr_t fcn) { pFppippipipipipipip_t fn = (pFppippipipipipipip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (int64_t)R_R9, *(void**)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(void**)(R_RSP + 24), *(int64_t*)(R_RSP + 32), *(void**)(R_RSP + 40), *(int64_t*)(R_RSP + 48), *(void**)(R_RSP + 56), *(int64_t*)(R_RSP + 64), *(void**)(R_RSP + 72), *(int64_t*)(R_RSP + 80), *(void**)(R_RSP + 88)); } void vFppuiiiiipuiiiiiiii(x64emu_t *emu, uintptr_t fcn) { vFppuiiiiipuiiiiiiii_t fn = (vFppuiiiiipuiiiiiiii_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (uint64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9, *(int64_t*)(R_RSP + 8), *(int64_t*)(R_RSP + 16), *(void**)(R_RSP + 24), *(uint64_t*)(R_RSP + 32), *(int64_t*)(R_RSP + 40), *(int64_t*)(R_RSP + 48), *(int64_t*)(R_RSP + 56), *(int64_t*)(R_RSP + 64), *(int64_t*)(R_RSP + 72), *(int64_t*)(R_RSP + 80), *(int64_t*)(R_RSP + 88), *(int64_t*)(R_RSP + 96)); } void vFpppipppppppppppppp(x64emu_t *emu, uintptr_t fcn) { vFpppipppppppppppppp_t fn = (vFpppipppppppppppppp_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int64_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24), *(void**)(R_RSP + 32), *(void**)(R_RSP + 40), *(void**)(R_RSP + 48), *(void**)(R_RSP + 56), *(void**)(R_RSP + 64), *(void**)(R_RSP + 72), *(void**)(R_RSP + 80), *(void**)(R_RSP + 88), *(void**)(R_RSP + 96)); } @@ -4576,7 +4653,6 @@ void iFipiip(x64emu_t *emu, uintptr_t fcn) { iFipiip_t fn = (iFipiip_t)fcn; R_RA #endif #if !defined(NOALIGN) -void iFEppu(x64emu_t *emu, uintptr_t fcn) { iFEppu_t fn = (iFEppu_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (uint64_t)R_RDX); } void iFEiiip(x64emu_t *emu, uintptr_t fcn) { iFEiiip_t fn = (iFEiiip_t)fcn; R_RAX=(int64_t)fn(emu, (int64_t)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX); } void iFEipii(x64emu_t *emu, uintptr_t fcn) { iFEipii_t fn = (iFEipii_t)fcn; R_RAX=(int64_t)fn(emu, (int64_t)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX); } void iFEipiip(x64emu_t *emu, uintptr_t fcn) { iFEipiip_t fn = (iFEipiip_t)fcn; R_RAX=(int64_t)fn(emu, (int64_t)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (void*)R_R8); } @@ -5274,6 +5350,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &iFpCpi) return 1; if (fun == &iFpWWu) return 1; if (fun == &iFpuwp) return 1; + if (fun == &iFpuiu) return 1; if (fun == &iFpuiL) return 1; if (fun == &iFpuip) return 1; if (fun == &iFpuui) return 1; @@ -5608,6 +5685,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &iFpiipp) return 1; if (fun == &iFpiIip) return 1; if (fun == &iFpiuwp) return 1; + if (fun == &iFpiupu) return 1; if (fun == &iFpiUUU) return 1; if (fun == &iFpipii) return 1; if (fun == &iFpipiu) return 1; @@ -5617,15 +5695,20 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &iFpippW) return 1; if (fun == &iFpippp) return 1; if (fun == &iFpCCCC) return 1; + if (fun == &iFpuiii) return 1; + if (fun == &iFpuiup) return 1; if (fun == &iFpuill) return 1; if (fun == &iFpuipi) return 1; if (fun == &iFpuuip) return 1; if (fun == &iFpuuui) return 1; if (fun == &iFpuuup) return 1; if (fun == &iFpuuLL) return 1; + if (fun == &iFpuupu) return 1; if (fun == &iFpuupp) return 1; if (fun == &iFpupiU) return 1; + if (fun == &iFpupuu) return 1; if (fun == &iFpupup) return 1; + if (fun == &iFpuppu) return 1; if (fun == &iFpuppp) return 1; if (fun == &iFpUiUi) return 1; if (fun == &iFpUupp) return 1; @@ -5656,6 +5739,8 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &iFpppiL) return 1; if (fun == &iFpppip) return 1; if (fun == &iFpppui) return 1; + if (fun == &iFpppuu) return 1; + if (fun == &iFpppup) return 1; if (fun == &iFpppUi) return 1; if (fun == &iFpppLi) return 1; if (fun == &iFpppLp) return 1; @@ -5879,11 +5964,13 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &iFpiiiii) return 1; if (fun == &iFpiiiip) return 1; if (fun == &iFpiiipp) return 1; + if (fun == &iFpiiuii) return 1; if (fun == &iFpiipip) return 1; if (fun == &iFpiippu) return 1; if (fun == &iFpiippp) return 1; if (fun == &iFpiuuup) return 1; if (fun == &iFpiuupp) return 1; + if (fun == &iFpiuppu) return 1; if (fun == &iFpiUUpp) return 1; if (fun == &iFpipipi) return 1; if (fun == &iFpippip) return 1; @@ -5891,6 +5978,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &iFpipppp) return 1; if (fun == &iFpCpipu) return 1; if (fun == &iFpWpppp) return 1; + if (fun == &iFpuiiii) return 1; if (fun == &iFpuiCpp) return 1; if (fun == &iFpuippp) return 1; if (fun == &iFpupuui) return 1; @@ -5933,6 +6021,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &iFppppip) return 1; if (fun == &iFppppup) return 1; if (fun == &iFpppppi) return 1; + if (fun == &iFpppppu) return 1; if (fun == &iFpppppL) return 1; if (fun == &iFpppppp) return 1; if (fun == &uFpippup) return 1; @@ -5966,6 +6055,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &pFpuuwwu) return 1; if (fun == &pFpuuuuu) return 1; if (fun == &pFpuuupu) return 1; + if (fun == &pFpuuUUU) return 1; if (fun == &pFplpppp) return 1; if (fun == &pFppiiii) return 1; if (fun == &pFppiipp) return 1; @@ -5995,6 +6085,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &vFpdddddd) return 7; if (fun == &vFppddddi) return 5; if (fun == &vFppddpii) return 3; + if (fun == &iFpupuufu) return 2; if (fun == &iFppppdpi) return 2; if (fun == &pFifffppp) return 4; if (fun == &pFdiiiIiI) return 2; diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 0f6bb51e..5ebac032 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -770,6 +770,7 @@ void iFEpUp(x64emu_t *emu, uintptr_t fnc); void iFEpLi(x64emu_t *emu, uintptr_t fnc); void iFEpLp(x64emu_t *emu, uintptr_t fnc); void iFEppi(x64emu_t *emu, uintptr_t fnc); +void iFEppu(x64emu_t *emu, uintptr_t fnc); void iFEppd(x64emu_t *emu, uintptr_t fnc); void iFEppL(x64emu_t *emu, uintptr_t fnc); void iFEppp(x64emu_t *emu, uintptr_t fnc); @@ -838,6 +839,7 @@ void iFpCCC(x64emu_t *emu, uintptr_t fnc); void iFpCpi(x64emu_t *emu, uintptr_t fnc); void iFpWWu(x64emu_t *emu, uintptr_t fnc); void iFpuwp(x64emu_t *emu, uintptr_t fnc); +void iFpuiu(x64emu_t *emu, uintptr_t fnc); void iFpuiL(x64emu_t *emu, uintptr_t fnc); void iFpuip(x64emu_t *emu, uintptr_t fnc); void iFpuui(x64emu_t *emu, uintptr_t fnc); @@ -1188,6 +1190,7 @@ void iFEippi(x64emu_t *emu, uintptr_t fnc); void iFEippL(x64emu_t *emu, uintptr_t fnc); void iFEippp(x64emu_t *emu, uintptr_t fnc); void iFEpiii(x64emu_t *emu, uintptr_t fnc); +void iFEpiup(x64emu_t *emu, uintptr_t fnc); void iFEpipi(x64emu_t *emu, uintptr_t fnc); void iFEpipp(x64emu_t *emu, uintptr_t fnc); void iFEpipV(x64emu_t *emu, uintptr_t fnc); @@ -1235,6 +1238,7 @@ void iFpiipi(x64emu_t *emu, uintptr_t fnc); void iFpiipp(x64emu_t *emu, uintptr_t fnc); void iFpiIip(x64emu_t *emu, uintptr_t fnc); void iFpiuwp(x64emu_t *emu, uintptr_t fnc); +void iFpiupu(x64emu_t *emu, uintptr_t fnc); void iFpiUUU(x64emu_t *emu, uintptr_t fnc); void iFpipii(x64emu_t *emu, uintptr_t fnc); void iFpipiu(x64emu_t *emu, uintptr_t fnc); @@ -1244,15 +1248,20 @@ void iFpippi(x64emu_t *emu, uintptr_t fnc); void iFpippW(x64emu_t *emu, uintptr_t fnc); void iFpippp(x64emu_t *emu, uintptr_t fnc); void iFpCCCC(x64emu_t *emu, uintptr_t fnc); +void iFpuiii(x64emu_t *emu, uintptr_t fnc); +void iFpuiup(x64emu_t *emu, uintptr_t fnc); void iFpuill(x64emu_t *emu, uintptr_t fnc); void iFpuipi(x64emu_t *emu, uintptr_t fnc); void iFpuuip(x64emu_t *emu, uintptr_t fnc); void iFpuuui(x64emu_t *emu, uintptr_t fnc); void iFpuuup(x64emu_t *emu, uintptr_t fnc); void iFpuuLL(x64emu_t *emu, uintptr_t fnc); +void iFpuupu(x64emu_t *emu, uintptr_t fnc); void iFpuupp(x64emu_t *emu, uintptr_t fnc); void iFpupiU(x64emu_t *emu, uintptr_t fnc); +void iFpupuu(x64emu_t *emu, uintptr_t fnc); void iFpupup(x64emu_t *emu, uintptr_t fnc); +void iFpuppu(x64emu_t *emu, uintptr_t fnc); void iFpuppp(x64emu_t *emu, uintptr_t fnc); void iFpUiUi(x64emu_t *emu, uintptr_t fnc); void iFpUupp(x64emu_t *emu, uintptr_t fnc); @@ -1283,6 +1292,8 @@ void iFpppii(x64emu_t *emu, uintptr_t fnc); void iFpppiL(x64emu_t *emu, uintptr_t fnc); void iFpppip(x64emu_t *emu, uintptr_t fnc); void iFpppui(x64emu_t *emu, uintptr_t fnc); +void iFpppuu(x64emu_t *emu, uintptr_t fnc); +void iFpppup(x64emu_t *emu, uintptr_t fnc); void iFpppUi(x64emu_t *emu, uintptr_t fnc); void iFpppLi(x64emu_t *emu, uintptr_t fnc); void iFpppLp(x64emu_t *emu, uintptr_t fnc); @@ -1530,6 +1541,7 @@ void iFEpiipV(x64emu_t *emu, uintptr_t fnc); void iFEpilpV(x64emu_t *emu, uintptr_t fnc); void iFEpippi(x64emu_t *emu, uintptr_t fnc); void iFEpIppp(x64emu_t *emu, uintptr_t fnc); +void iFEpuuip(x64emu_t *emu, uintptr_t fnc); void iFEpuppp(x64emu_t *emu, uintptr_t fnc); void iFEpUppp(x64emu_t *emu, uintptr_t fnc); void iFEppppp(x64emu_t *emu, uintptr_t fnc); @@ -1550,11 +1562,13 @@ void iFLppipp(x64emu_t *emu, uintptr_t fnc); void iFpiiiii(x64emu_t *emu, uintptr_t fnc); void iFpiiiip(x64emu_t *emu, uintptr_t fnc); void iFpiiipp(x64emu_t *emu, uintptr_t fnc); +void iFpiiuii(x64emu_t *emu, uintptr_t fnc); void iFpiipip(x64emu_t *emu, uintptr_t fnc); void iFpiippu(x64emu_t *emu, uintptr_t fnc); void iFpiippp(x64emu_t *emu, uintptr_t fnc); void iFpiuuup(x64emu_t *emu, uintptr_t fnc); void iFpiuupp(x64emu_t *emu, uintptr_t fnc); +void iFpiuppu(x64emu_t *emu, uintptr_t fnc); void iFpiUUpp(x64emu_t *emu, uintptr_t fnc); void iFpipipi(x64emu_t *emu, uintptr_t fnc); void iFpippip(x64emu_t *emu, uintptr_t fnc); @@ -1562,6 +1576,7 @@ void iFpipppL(x64emu_t *emu, uintptr_t fnc); void iFpipppp(x64emu_t *emu, uintptr_t fnc); void iFpCpipu(x64emu_t *emu, uintptr_t fnc); void iFpWpppp(x64emu_t *emu, uintptr_t fnc); +void iFpuiiii(x64emu_t *emu, uintptr_t fnc); void iFpuiCpp(x64emu_t *emu, uintptr_t fnc); void iFpuippp(x64emu_t *emu, uintptr_t fnc); void iFpupuui(x64emu_t *emu, uintptr_t fnc); @@ -1604,6 +1619,7 @@ void iFppppiu(x64emu_t *emu, uintptr_t fnc); void iFppppip(x64emu_t *emu, uintptr_t fnc); void iFppppup(x64emu_t *emu, uintptr_t fnc); void iFpppppi(x64emu_t *emu, uintptr_t fnc); +void iFpppppu(x64emu_t *emu, uintptr_t fnc); void iFpppppL(x64emu_t *emu, uintptr_t fnc); void iFpppppp(x64emu_t *emu, uintptr_t fnc); void uFEiippp(x64emu_t *emu, uintptr_t fnc); @@ -1658,6 +1674,7 @@ void pFpCuuup(x64emu_t *emu, uintptr_t fnc); void pFpuuwwu(x64emu_t *emu, uintptr_t fnc); void pFpuuuuu(x64emu_t *emu, uintptr_t fnc); void pFpuuupu(x64emu_t *emu, uintptr_t fnc); +void pFpuuUUU(x64emu_t *emu, uintptr_t fnc); void pFplpppp(x64emu_t *emu, uintptr_t fnc); void pFppiiii(x64emu_t *emu, uintptr_t fnc); void pFppiipp(x64emu_t *emu, uintptr_t fnc); @@ -1783,6 +1800,7 @@ void iFpiiiiii(x64emu_t *emu, uintptr_t fnc); void iFpiiiiip(x64emu_t *emu, uintptr_t fnc); void iFpiiiuwp(x64emu_t *emu, uintptr_t fnc); void iFpiiuuiu(x64emu_t *emu, uintptr_t fnc); +void iFpiiuuuu(x64emu_t *emu, uintptr_t fnc); void iFpiipppp(x64emu_t *emu, uintptr_t fnc); void iFpiuiipp(x64emu_t *emu, uintptr_t fnc); void iFpiupiii(x64emu_t *emu, uintptr_t fnc); @@ -1793,12 +1811,17 @@ void iFpippppW(x64emu_t *emu, uintptr_t fnc); void iFpippppp(x64emu_t *emu, uintptr_t fnc); void iFpIIpppp(x64emu_t *emu, uintptr_t fnc); void iFpWppppW(x64emu_t *emu, uintptr_t fnc); +void iFpuiiiip(x64emu_t *emu, uintptr_t fnc); +void iFpuiiuii(x64emu_t *emu, uintptr_t fnc); void iFpuiCuCp(x64emu_t *emu, uintptr_t fnc); void iFpuiuupp(x64emu_t *emu, uintptr_t fnc); +void iFpuipupp(x64emu_t *emu, uintptr_t fnc); void iFpuuiuui(x64emu_t *emu, uintptr_t fnc); +void iFpuuuppu(x64emu_t *emu, uintptr_t fnc); void iFpuupppp(x64emu_t *emu, uintptr_t fnc); void iFpupiLpL(x64emu_t *emu, uintptr_t fnc); void iFpupuuui(x64emu_t *emu, uintptr_t fnc); +void iFpupuufu(x64emu_t *emu, uintptr_t fnc); void iFpupupui(x64emu_t *emu, uintptr_t fnc); void iFpuppppp(x64emu_t *emu, uintptr_t fnc); void iFpLipipi(x64emu_t *emu, uintptr_t fnc); @@ -1824,6 +1847,7 @@ void iFpppiuwu(x64emu_t *emu, uintptr_t fnc); void iFpppippi(x64emu_t *emu, uintptr_t fnc); void iFpppippp(x64emu_t *emu, uintptr_t fnc); void iFpppuiii(x64emu_t *emu, uintptr_t fnc); +void iFpppuppp(x64emu_t *emu, uintptr_t fnc); void iFppppiii(x64emu_t *emu, uintptr_t fnc); void iFppppipp(x64emu_t *emu, uintptr_t fnc); void iFppppdpi(x64emu_t *emu, uintptr_t fnc); @@ -1938,6 +1962,8 @@ void vFppppiipi(x64emu_t *emu, uintptr_t fnc); void vFpppppuuu(x64emu_t *emu, uintptr_t fnc); void vFpppppppp(x64emu_t *emu, uintptr_t fnc); void iFEpippppp(x64emu_t *emu, uintptr_t fnc); +void iFEpuuiipp(x64emu_t *emu, uintptr_t fnc); +void iFEpuuuipp(x64emu_t *emu, uintptr_t fnc); void iFEpuuLppp(x64emu_t *emu, uintptr_t fnc); void iFEpUUuppp(x64emu_t *emu, uintptr_t fnc); void iFEppipppp(x64emu_t *emu, uintptr_t fnc); @@ -1952,6 +1978,7 @@ void iFpCCWWpWu(x64emu_t *emu, uintptr_t fnc); void iFpWCuWCuu(x64emu_t *emu, uintptr_t fnc); void iFpWWipppp(x64emu_t *emu, uintptr_t fnc); void iFpuiipppp(x64emu_t *emu, uintptr_t fnc); +void iFpuipuppp(x64emu_t *emu, uintptr_t fnc); void iFpuippLpp(x64emu_t *emu, uintptr_t fnc); void iFpuuiiiii(x64emu_t *emu, uintptr_t fnc); void iFpuuupupu(x64emu_t *emu, uintptr_t fnc); @@ -2056,6 +2083,8 @@ void vFpppiiiiii(x64emu_t *emu, uintptr_t fnc); void vFppppipiip(x64emu_t *emu, uintptr_t fnc); void vFpppppippp(x64emu_t *emu, uintptr_t fnc); void iFEpiiiiipi(x64emu_t *emu, uintptr_t fnc); +void iFEpuuiippu(x64emu_t *emu, uintptr_t fnc); +void iFEpuuuiipp(x64emu_t *emu, uintptr_t fnc); void iFEpppipppp(x64emu_t *emu, uintptr_t fnc); void iFEppplPPPP(x64emu_t *emu, uintptr_t fnc); void iFEpppppupp(x64emu_t *emu, uintptr_t fnc); @@ -2065,7 +2094,9 @@ void iFiiiipiiip(x64emu_t *emu, uintptr_t fnc); void iFipiipippi(x64emu_t *emu, uintptr_t fnc); void iFuilpluluf(x64emu_t *emu, uintptr_t fnc); void iFdddpppppp(x64emu_t *emu, uintptr_t fnc); +void iFpiuuupipu(x64emu_t *emu, uintptr_t fnc); void iFpipLpiiip(x64emu_t *emu, uintptr_t fnc); +void iFpuiuuipip(x64emu_t *emu, uintptr_t fnc); void iFpuuuuuuuu(x64emu_t *emu, uintptr_t fnc); void iFpdiiiUiUp(x64emu_t *emu, uintptr_t fnc); void iFppiiiiiii(x64emu_t *emu, uintptr_t fnc); @@ -2075,6 +2106,7 @@ void iFpppiiipip(x64emu_t *emu, uintptr_t fnc); void iFpppiiuuii(x64emu_t *emu, uintptr_t fnc); void iFpppiipiiu(x64emu_t *emu, uintptr_t fnc); void iFppppiiupp(x64emu_t *emu, uintptr_t fnc); +void iFppppupiii(x64emu_t *emu, uintptr_t fnc); void iFppppppppu(x64emu_t *emu, uintptr_t fnc); void iFppppppppp(x64emu_t *emu, uintptr_t fnc); void uFEipippppp(x64emu_t *emu, uintptr_t fnc); @@ -2131,6 +2163,9 @@ void vFppuuuuiiuu(x64emu_t *emu, uintptr_t fnc); void vFppdddddddd(x64emu_t *emu, uintptr_t fnc); void vFpppppppppp(x64emu_t *emu, uintptr_t fnc); void iFEpiiiiippp(x64emu_t *emu, uintptr_t fnc); +void iFEpuipupppp(x64emu_t *emu, uintptr_t fnc); +void iFEpuuiiuipp(x64emu_t *emu, uintptr_t fnc); +void iFEpuuuuiipp(x64emu_t *emu, uintptr_t fnc); void iFEpupppLppL(x64emu_t *emu, uintptr_t fnc); void iFEppppppipp(x64emu_t *emu, uintptr_t fnc); void iFEppppppppp(x64emu_t *emu, uintptr_t fnc); @@ -2138,6 +2173,7 @@ void iFiiiiiiiiip(x64emu_t *emu, uintptr_t fnc); void iFpiipiiipip(x64emu_t *emu, uintptr_t fnc); void iFpippddiidd(x64emu_t *emu, uintptr_t fnc); void iFpCuWCCCCup(x64emu_t *emu, uintptr_t fnc); +void iFpuipuppppp(x64emu_t *emu, uintptr_t fnc); void iFpuupiuiipp(x64emu_t *emu, uintptr_t fnc); void iFpddpippppp(x64emu_t *emu, uintptr_t fnc); void iFppuuiiiiii(x64emu_t *emu, uintptr_t fnc); @@ -2184,6 +2220,8 @@ void vFppiipppiiii(x64emu_t *emu, uintptr_t fnc); void vFppipppiiiii(x64emu_t *emu, uintptr_t fnc); void vFppipppuiiii(x64emu_t *emu, uintptr_t fnc); void vFppppppppppp(x64emu_t *emu, uintptr_t fnc); +void iFEpuuiiuippu(x64emu_t *emu, uintptr_t fnc); +void iFEpuuuuuiipp(x64emu_t *emu, uintptr_t fnc); void iFEpppipppppp(x64emu_t *emu, uintptr_t fnc); void iFEppppiiiiuu(x64emu_t *emu, uintptr_t fnc); void iFiiiiiiiiiip(x64emu_t *emu, uintptr_t fnc); @@ -2267,6 +2305,7 @@ void pFpppppppppppppppp(x64emu_t *emu, uintptr_t fnc); void vFuuuiiiiiuiiiiilll(x64emu_t *emu, uintptr_t fnc); void vFppiiiiddddiiiiiuu(x64emu_t *emu, uintptr_t fnc); void vFpppuppiipppuUUUpi(x64emu_t *emu, uintptr_t fnc); +void pFpuuuuuwwuuuuUUUup(x64emu_t *emu, uintptr_t fnc); void pFppippipipipipipip(x64emu_t *emu, uintptr_t fnc); void vFppuiiiiipuiiiiiiii(x64emu_t *emu, uintptr_t fnc); void vFpppipppppppppppppp(x64emu_t *emu, uintptr_t fnc); @@ -2300,7 +2339,6 @@ void iFipiip(x64emu_t *emu, uintptr_t fnc); #endif #if !defined(NOALIGN) -void iFEppu(x64emu_t *emu, uintptr_t fnc); void iFEiiip(x64emu_t *emu, uintptr_t fnc); void iFEipii(x64emu_t *emu, uintptr_t fnc); void iFEipiip(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedd3dadapter9.c b/src/wrapped/wrappedd3dadapter9.c new file mode 100644 index 00000000..a4a0c9a9 --- /dev/null +++ b/src/wrapped/wrappedd3dadapter9.c @@ -0,0 +1,419 @@ +#define _GNU_SOURCE /* See feature_test_macros(7) */ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <dlfcn.h> + +#include "wrappedlibs.h" + +#include "debug.h" +#include "wrapper.h" +#include "bridge.h" +#include "librarian/library_private.h" +#include "x64emu.h" +#include "emu/x64emu_private.h" +#include "callback.h" + +#include "wrappedd3dadapter9_vtable.h" + +static int (*my_CreateAuthenticatedChannel_real)(void* This, int ChannelType, void*** ppAuthenticatedChannel, void* pChannelHandle); +static int my_CreateAuthenticatedChannel(x64emu_t* emu, void* This, int ChannelType, void*** ppAuthenticatedChannel, void* pChannelHandle); +static int (*my_CreateCryptoSession_real)(void* This, const void* pCryptoType, const void* pDecodeProfile, void*** ppCryptoSession, void* pCryptoHandle); +static int my_CreateCryptoSession(x64emu_t* emu, void* This, const void* pCryptoType, const void* pDecodeProfile, void*** ppCryptoSession, void* pCryptoHandle); +static int (*my_CreateCubeTexture_real)(void* This, unsigned EdgeLength, unsigned Levels, unsigned Usage, int Format, int Pool, void*** ppCubeTexture, void* pSharedHandle); +static int my_CreateCubeTexture(x64emu_t* emu, void* This, unsigned EdgeLength, unsigned Levels, unsigned Usage, int Format, int Pool, void*** ppCubeTexture, void* pSharedHandle); +static int (*my_CreateIndexBuffer_real)(void* This, unsigned Length, unsigned Usage, int Format, int Pool, void*** ppIndexBuffer, void* pSharedHandle); +static int my_CreateIndexBuffer(x64emu_t* emu, void* This, unsigned Length, unsigned Usage, int Format, int Pool, void*** ppIndexBuffer, void* pSharedHandle); +static int (*my_CreatePixelShader_real)(void* This, const void* pFunction, void*** ppShader); +static int my_CreatePixelShader(x64emu_t* emu, void* This, const void* pFunction, void*** ppShader); +static int (*my_CreateQuery_real)(void* This, int Type, void*** ppQuery); +static int my_CreateQuery(x64emu_t* emu, void* This, int Type, void*** ppQuery); +static int (*my_CheckResourceResidency_real)(void* This, void*** pResourceArray, unsigned NumResources); +static int my_CheckResourceResidency(x64emu_t* emu, void* This, void*** pResourceArray, unsigned NumResources); +static int (*my_CreateStateBlock_real)(void* This, int Type, void*** ppSB); +static int my_CreateStateBlock(x64emu_t* emu, void* This, int Type, void*** ppSB); +static int (*my_EndStateBlock_real)(void* This, void*** ppSB); +static int my_EndStateBlock(x64emu_t* emu, void* This, void*** ppSB); +static int (*my_CreateDepthStencilSurfaceEx_real)(void* This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Discard, void*** ppSurface, void* pSharedHandle, unsigned Usage); +static int my_CreateDepthStencilSurfaceEx(x64emu_t* emu, void* This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Discard, void*** ppSurface, void* pSharedHandle, unsigned Usage); +static int (*my_CreateDepthStencilSurface_real)(void* This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Discard, void*** ppSurface, void* pSharedHandle); +static int my_CreateDepthStencilSurface(x64emu_t* emu, void* This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Discard, void*** ppSurface, void* pSharedHandle); +static int (*my_CreateOffscreenPlainSurfaceEx_real)(void* This, unsigned Width, unsigned Height, int Format, int Pool, void*** ppSurface, void* pSharedHandle, unsigned Usage); +static int my_CreateOffscreenPlainSurfaceEx(x64emu_t* emu, void* This, unsigned Width, unsigned Height, int Format, int Pool, void*** ppSurface, void* pSharedHandle, unsigned Usage); +static int (*my_CreateOffscreenPlainSurface_real)(void* This, unsigned Width, unsigned Height, int Format, int Pool, void*** ppSurface, void* pSharedHandle); +static int my_CreateOffscreenPlainSurface(x64emu_t* emu, void* This, unsigned Width, unsigned Height, int Format, int Pool, void*** ppSurface, void* pSharedHandle); +static int (*my_CreateRenderTargetEx_real)(void* This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Lockable, void*** ppSurface, void* pSharedHandle, unsigned Usage); +static int my_CreateRenderTargetEx(x64emu_t* emu, void* This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Lockable, void*** ppSurface, void* pSharedHandle, unsigned Usage); +static int (*my_CreateRenderTarget_real)(void* This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Lockable, void*** ppSurface, void* pSharedHandle); +static int my_CreateRenderTarget(x64emu_t* emu, void* This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Lockable, void*** ppSurface, void* pSharedHandle); +static int (*my_GetCubeMapSurface_real)(void* This, int FaceType, unsigned Level, void*** ppCubeMapSurface); +static int my_GetCubeMapSurface(x64emu_t* emu, void* This, int FaceType, unsigned Level, void*** ppCubeMapSurface); +static int (*my_GetDepthStencilSurface_real)(void* This, void*** ppZStencilSurface); +static int my_GetDepthStencilSurface(x64emu_t* emu, void* This, void*** ppZStencilSurface); +static int (*my_GetBackBuffer_real)(void* This, unsigned iSwapChain, unsigned iBackBuffer, int Type, void*** ppBackBuffer); +static int my_GetBackBuffer(x64emu_t* emu, void* This, unsigned iSwapChain, unsigned iBackBuffer, int Type, void*** ppBackBuffer); +static int (*my_GetRenderTarget_real)(void* This, unsigned RenderTargetIndex, void*** ppRenderTarget); +static int my_GetRenderTarget(x64emu_t* emu, void* This, unsigned RenderTargetIndex, void*** ppRenderTarget); +static int (*my_GetSurfaceLevel_real)(void* This, unsigned Level, void*** ppSurfaceLevel); +static int my_GetSurfaceLevel(x64emu_t* emu, void* This, unsigned Level, void*** ppSurfaceLevel); +static int (*my_CreateAdditionalSwapChain_real)(void* This, void* pPresentationParameters, void*** pSwapChain); +static int my_CreateAdditionalSwapChain(x64emu_t* emu, void* This, void* pPresentationParameters, void*** pSwapChain); +static int (*my_GetSwapChain_real)(void* This, unsigned iSwapChain, void*** pSwapChain); +static int my_GetSwapChain(x64emu_t* emu, void* This, unsigned iSwapChain, void*** pSwapChain); +static int (*my_CreateTexture_real)(void* This, unsigned Width, unsigned Height, unsigned Levels, unsigned Usage, int Format, int Pool, void*** ppTexture, void* pSharedHandle); +static int my_CreateTexture(x64emu_t* emu, void* This, unsigned Width, unsigned Height, unsigned Levels, unsigned Usage, int Format, int Pool, void*** ppTexture, void* pSharedHandle); +static int (*my_CreateVertexBuffer_real)(void* This, unsigned Length, unsigned Usage, unsigned FVF, int Pool, void*** ppVertexBuffer, void* pSharedHandle); +static int my_CreateVertexBuffer(x64emu_t* emu, void* This, unsigned Length, unsigned Usage, unsigned FVF, int Pool, void*** ppVertexBuffer, void* pSharedHandle); +static int (*my_CreateVertexDeclaration_real)(void* This, const void* pVertexElements, void*** ppDecl); +static int my_CreateVertexDeclaration(x64emu_t* emu, void* This, const void* pVertexElements, void*** ppDecl); +static int (*my_CreateVertexShader_real)(void* This, const void* pFunction, void*** ppShader); +static int my_CreateVertexShader(x64emu_t* emu, void* This, const void* pFunction, void*** ppShader); +static int (*my_GetVolumeLevel_real)(void* This, unsigned Level, void*** ppVolumeLevel); +static int my_GetVolumeLevel(x64emu_t* emu, void* This, unsigned Level, void*** ppVolumeLevel); +static int (*my_CreateVolumeTexture_real)(void* This, unsigned Width, unsigned Height, unsigned Depth, unsigned Levels, unsigned Usage, int Format, int Pool, void*** ppVolumeTexture, void* pSharedHandle); +static int my_CreateVolumeTexture(x64emu_t* emu, void* This, unsigned Width, unsigned Height, unsigned Depth, unsigned Levels, unsigned Usage, int Format, int Pool, void*** ppVolumeTexture, void* pSharedHandle); + +static int (*my_GetDirect3D_real)(void* This, void*** ppD3D9); +static int my_GetDirect3D(x64emu_t* emu, void* This, void*** ppD3D9); + +#define UNPACK(...) __VA_ARGS__ + +#define GO(name, type, size) \ + new->name = (void*)AddBridge(emu->context->system, type, real->name, size*4, #name) + +#define GOM(name, type, size) \ + my_##name##_real = (void*)real->name; \ + new->name = (void*)AddBridge(emu->context->system, type, my_##name, size*4, "my_" #name) + +#define GO2(name, type, size) \ + my_##name##_real2 = (void*)real->name; \ + new->name = (void*)AddBridge(emu->context->system, type, my_##name2, size*4, "my_" #name) + +#include "wrappedd3dadapter9_gen.h" + +#undef GO +#undef GOM +#undef GO2 + + +const char* d3dadapter9Name = "d3dadapter9.so.1"; +#define LIBNAME d3dadapter9 +#define ALTNAME "/usr/lib/aarch64-linux-gnu/d3d/d3dadapter9.so.1" + +typedef void* (*pFp_t)(void*); + +typedef struct my_D3DAdapter9DRM { + uint32_t major_version; + uint32_t minor_version; + void *create_adapter; +} my_D3DAdapter9DRM; + +typedef struct d3d_my_s { + pFp_t D3DAdapter9GetProc; + my_D3DAdapter9DRM adapter; + int (*create_adapter)(int, ID3DAdapter9Vtbl ***); + + int (*CreateDevice)(void*, unsigned, int, void*, unsigned, void*, void*, void*, IDirect3DDevice9Vtbl ***); + + int presentgroup_init; + + struct { + ID3DAdapter9Vtbl adapter; + int adapter_init; + + IDirect3DDevice9Vtbl device; + int device_init; + + IDirect3DAuthenticatedChannel9Vtbl my_IDirect3DAuthenticatedChannel9Vtbl; + int my_IDirect3DAuthenticatedChannel9Vtbl_init; + IDirect3DCryptoSession9Vtbl my_IDirect3DCryptoSession9Vtbl; + int my_IDirect3DCryptoSession9Vtbl_init; + IDirect3DCubeTexture9Vtbl my_IDirect3DCubeTexture9Vtbl; + int my_IDirect3DCubeTexture9Vtbl_init; + IDirect3DIndexBuffer9Vtbl my_IDirect3DIndexBuffer9Vtbl; + int my_IDirect3DIndexBuffer9Vtbl_init; + IDirect3DPixelShader9Vtbl my_IDirect3DPixelShader9Vtbl; + int my_IDirect3DPixelShader9Vtbl_init; + IDirect3DQuery9Vtbl my_IDirect3DQuery9Vtbl; + int my_IDirect3DQuery9Vtbl_init; + IDirect3DResource9Vtbl my_IDirect3DResource9Vtbl; + int my_IDirect3DResource9Vtbl_init; + IDirect3DStateBlock9Vtbl my_IDirect3DStateBlock9Vtbl; + int my_IDirect3DStateBlock9Vtbl_init; + IDirect3DSurface9Vtbl my_IDirect3DSurface9Vtbl; + int my_IDirect3DSurface9Vtbl_init; + IDirect3DSwapChain9Vtbl my_IDirect3DSwapChain9Vtbl; + int my_IDirect3DSwapChain9Vtbl_init; + IDirect3DTexture9Vtbl my_IDirect3DTexture9Vtbl; + int my_IDirect3DTexture9Vtbl_init; + IDirect3DVertexBuffer9Vtbl my_IDirect3DVertexBuffer9Vtbl; + int my_IDirect3DVertexBuffer9Vtbl_init; + IDirect3DVertexDeclaration9Vtbl my_IDirect3DVertexDeclaration9Vtbl; + int my_IDirect3DVertexDeclaration9Vtbl_init; + IDirect3DVertexShader9Vtbl my_IDirect3DVertexShader9Vtbl; + int my_IDirect3DVertexShader9Vtbl_init; + IDirect3DVolume9Vtbl my_IDirect3DVolume9Vtbl; + int my_IDirect3DVolume9Vtbl_init; + IDirect3DVolumeTexture9Vtbl my_IDirect3DVolumeTexture9Vtbl; + int my_IDirect3DVolumeTexture9Vtbl_init; + } vtables; +} d3d_my_t; + +static d3d_my_t my_d3d = {0}; +static d3d_my_t * const my = &my_d3d; + +#define GOR(retcnd, name, args, call, ret, vtbl, a) \ + static ret name(UNPACK args) \ + { \ + int r = name##_real(UNPACK call); \ + if (retcnd) return r; \ + if (!my->vtables.my_##vtbl##_init) { \ + make_vtable_##vtbl(emu, &my->vtables.my_##vtbl, **a); \ + my->vtables.my_##vtbl##_init = 1; \ + } \ + (*a)[0] = &my->vtables.my_##vtbl; \ + (*a)[1] = &my->vtables.my_##vtbl; \ + return 0; \ + } + +#define GO(name, args, call, ret, vtbl, a) \ + GOR(r, name, args, call, ret, vtbl, a) + +GO(my_CreateAuthenticatedChannel, (x64emu_t* emu, void* This, int ChannelType, void*** ppAuthenticatedChannel, void* pChannelHandle), (This, ChannelType, ppAuthenticatedChannel, pChannelHandle), int, IDirect3DAuthenticatedChannel9Vtbl, ppAuthenticatedChannel) +GO(my_CreateCryptoSession, (x64emu_t* emu, void* This, const void* pCryptoType, const void* pDecodeProfile, void*** ppCryptoSession, void* pCryptoHandle), (This, pCryptoType, pDecodeProfile, ppCryptoSession, pCryptoHandle), int, IDirect3DCryptoSession9Vtbl, ppCryptoSession) +GO(my_CreateCubeTexture, (x64emu_t* emu, void* This, unsigned EdgeLength, unsigned Levels, unsigned Usage, int Format, int Pool, void*** ppCubeTexture, void* pSharedHandle), (This, EdgeLength, Levels, Usage, Format, Pool, ppCubeTexture, pSharedHandle), int, IDirect3DCubeTexture9Vtbl, ppCubeTexture) +GO(my_CreateIndexBuffer, (x64emu_t* emu, void* This, unsigned Length, unsigned Usage, int Format, int Pool, void*** ppIndexBuffer, void* pSharedHandle), (This, Length, Usage, Format, Pool, ppIndexBuffer, pSharedHandle), int, IDirect3DIndexBuffer9Vtbl, ppIndexBuffer) +GO(my_CreatePixelShader, (x64emu_t* emu, void* This, const void* pFunction, void*** ppShader), (This, pFunction, ppShader), int, IDirect3DPixelShader9Vtbl, ppShader) +GO(my_CheckResourceResidency, (x64emu_t* emu, void* This, void*** pResourceArray, unsigned NumResources), (This, pResourceArray, NumResources), int, IDirect3DResource9Vtbl, pResourceArray) +GO(my_CreateStateBlock, (x64emu_t* emu, void* This, int Type, void*** ppSB), (This, Type, ppSB), int, IDirect3DStateBlock9Vtbl, ppSB) +GO(my_EndStateBlock, (x64emu_t* emu, void* This, void*** ppSB), (This, ppSB), int, IDirect3DStateBlock9Vtbl, ppSB) +GO(my_CreateDepthStencilSurfaceEx, (x64emu_t* emu, void* This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Discard, void*** ppSurface, void* pSharedHandle, unsigned Usage), (This, Width, Height, Format, MultiSample, MultisampleQuality, Discard, ppSurface, pSharedHandle, Usage), int, IDirect3DSurface9Vtbl, ppSurface) +GO(my_CreateDepthStencilSurface, (x64emu_t* emu, void* This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Discard, void*** ppSurface, void* pSharedHandle), (This, Width, Height, Format, MultiSample, MultisampleQuality, Discard, ppSurface, pSharedHandle), int, IDirect3DSurface9Vtbl, ppSurface) +GO(my_CreateOffscreenPlainSurfaceEx, (x64emu_t* emu, void* This, unsigned Width, unsigned Height, int Format, int Pool, void*** ppSurface, void* pSharedHandle, unsigned Usage), (This, Width, Height, Format, Pool, ppSurface, pSharedHandle, Usage), int, IDirect3DSurface9Vtbl, ppSurface) +GO(my_CreateOffscreenPlainSurface, (x64emu_t* emu, void* This, unsigned Width, unsigned Height, int Format, int Pool, void*** ppSurface, void* pSharedHandle), (This, Width, Height, Format, Pool, ppSurface, pSharedHandle), int, IDirect3DSurface9Vtbl, ppSurface) +GO(my_CreateRenderTargetEx, (x64emu_t* emu, void* This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Lockable, void*** ppSurface, void* pSharedHandle, unsigned Usage), (This, Width, Height, Format, MultiSample, MultisampleQuality, Lockable, ppSurface, pSharedHandle, Usage), int, IDirect3DSurface9Vtbl, ppSurface) +GO(my_CreateRenderTarget, (x64emu_t* emu, void* This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Lockable, void*** ppSurface, void* pSharedHandle), (This, Width, Height, Format, MultiSample, MultisampleQuality, Lockable, ppSurface, pSharedHandle), int, IDirect3DSurface9Vtbl, ppSurface) +GO(my_GetCubeMapSurface, (x64emu_t* emu, void* This, int FaceType, unsigned Level, void*** ppCubeMapSurface), (This, FaceType, Level, ppCubeMapSurface), int, IDirect3DSurface9Vtbl, ppCubeMapSurface) +GO(my_GetDepthStencilSurface, (x64emu_t* emu, void* This, void*** ppZStencilSurface), (This, ppZStencilSurface), int, IDirect3DSurface9Vtbl, ppZStencilSurface) +GO(my_GetBackBuffer, (x64emu_t* emu, void* This, unsigned iSwapChain, unsigned iBackBuffer, int Type, void*** ppBackBuffer), (This, iSwapChain, iBackBuffer, Type, ppBackBuffer), int, IDirect3DSurface9Vtbl, ppBackBuffer) +GO(my_GetRenderTarget, (x64emu_t* emu, void* This, unsigned RenderTargetIndex, void*** ppRenderTarget), (This, RenderTargetIndex, ppRenderTarget), int, IDirect3DSurface9Vtbl, ppRenderTarget) +GO(my_GetSurfaceLevel, (x64emu_t* emu, void* This, unsigned Level, void*** ppSurfaceLevel), (This, Level, ppSurfaceLevel), int, IDirect3DSurface9Vtbl, ppSurfaceLevel) +GO(my_CreateAdditionalSwapChain, (x64emu_t* emu, void* This, void* pPresentationParameters, void*** pSwapChain), (This, pPresentationParameters, pSwapChain), int, IDirect3DSwapChain9Vtbl, pSwapChain) +GO(my_GetSwapChain, (x64emu_t* emu, void* This, unsigned iSwapChain, void*** pSwapChain), (This, iSwapChain, pSwapChain), int, IDirect3DSwapChain9Vtbl, pSwapChain) +GO(my_CreateTexture, (x64emu_t* emu, void* This, unsigned Width, unsigned Height, unsigned Levels, unsigned Usage, int Format, int Pool, void*** ppTexture, void* pSharedHandle), (This, Width, Height, Levels, Usage, Format, Pool, ppTexture, pSharedHandle), int, IDirect3DTexture9Vtbl, ppTexture) +GO(my_CreateVertexBuffer, (x64emu_t* emu, void* This, unsigned Length, unsigned Usage, unsigned FVF, int Pool, void*** ppVertexBuffer, void* pSharedHandle), (This, Length, Usage, FVF, Pool, ppVertexBuffer, pSharedHandle), int, IDirect3DVertexBuffer9Vtbl, ppVertexBuffer) +GO(my_CreateVertexDeclaration, (x64emu_t* emu, void* This, const void* pVertexElements, void*** ppDecl), (This, pVertexElements, ppDecl), int, IDirect3DVertexDeclaration9Vtbl, ppDecl) +GO(my_CreateVertexShader, (x64emu_t* emu, void* This, const void* pFunction, void*** ppShader), (This, pFunction, ppShader), int, IDirect3DVertexShader9Vtbl, ppShader) +GO(my_GetVolumeLevel, (x64emu_t* emu, void* This, unsigned Level, void*** ppVolumeLevel), (This, Level, ppVolumeLevel), int, IDirect3DVolume9Vtbl, ppVolumeLevel) +GO(my_CreateVolumeTexture, (x64emu_t* emu, void* This, unsigned Width, unsigned Height, unsigned Depth, unsigned Levels, unsigned Usage, int Format, int Pool, void*** ppVolumeTexture, void* pSharedHandle), (This, Width, Height, Depth, Levels, Usage, Format, Pool, ppVolumeTexture, pSharedHandle), int, IDirect3DVolumeTexture9Vtbl, ppVolumeTexture) + +GOR((r || !ppQuery), my_CreateQuery, (x64emu_t* emu, void* This, int Type, void*** ppQuery), (This, Type, ppQuery), int, IDirect3DQuery9Vtbl, ppQuery) + +#undef GO +#undef GOR + +static void getMy(library_t* lib) +{ + my->D3DAdapter9GetProc = (pFp_t)dlsym(lib->w.lib, "D3DAdapter9GetProc"); +} + +static void freeMy() +{ +} + +#define GOV(ns, ret, fn, args, call) \ + static uintptr_t my_##ns##_##fn##_fct = 0; \ + static ret my_##ns##_##fn(UNPACK args) { \ + ret r = (ret)RunFunction(my_context, my_##ns##_##fn##_fct, UNPACK call); \ +/* no closing brace */ + +#define GOV_1(ns, ret, fn, t1) \ + GOV(ns, ret, fn, (t1 a), (1, a)) return r; } +#define GOV_2(ns, ret, fn, t1, t2) \ + GOV(ns, ret, fn, (t1 a, t2 b), (2, a, b)) return r; } +#define GOV_3(ns, ret, fn, t1, t2, t3) \ + GOV(ns, ret, fn, (t1 a, t2 b, t3 c), (3, a, b, c)) return r; } +#define GOV_4(ns, ret, fn, t1, t2, t3, t4) \ + GOV(ns, ret, fn, (t1 a, t2 b, t3 c, t4 d), (4, a, b, c, d)) return r; } +#define GOV_5(ns, ret, fn, t1, t2, t3, t4, t5) \ + GOV(ns, ret, fn, (t1 a, t2 b, t3 c, t4 d, t5 e), (5, a, b, c, d, e)) return r; } +#define GOV_6(ns, ret, fn, t1, t2, t3, t4, t5, t6) \ + GOV(ns, ret, fn, (t1 a, t2 b, t3 c, t4 d, t5 e, t6 f), (6, a, b, c, d, e, f)) return r; } +#define GOV_7(ns, ret, fn, t1, t2, t3, t4, t5, t6, t7) \ + GOV(ns, ret, fn, (t1 a, t2 b, t3 c, t4 d, t5 e, t6 f, t7 g), (7, a, b, c, d, e, f, g)) return r; } +#define GOV_8(ns, ret, fn, t1, t2, t3, t4, t5, t6, t7, t8) \ + GOV(ns, ret, fn, (t1 a, t2 b, t3 c, t4 d, t5 e, t6 f, t7 g, t8 h), (8, a, b, c, d, e, f, g, h)) return r; } + +#define GOS(ns, ret, fn, ...) \ + my_##ns##_##fn##_fct = (uintptr_t)vtbl->fn; \ + vtbl->fn = my_##ns##_##fn; + +#define SUPER(ns, X1, X2, X3, X4, X5, X6, X7, X8) \ + X3(ns, int, QueryInterface, void*, void*, void**) \ + X1(ns, unsigned, AddRef, void*) \ + X1(ns, unsigned, Release, void*) \ + X3(ns, int, SetPresentParameters, void*, void*, void*) \ + X8(ns, int, NewD3DWindowBufferFromDmaBuf, void*, int, int, int, int, int, int, void**) \ + X2(ns, int, DestroyD3DWindowBuffer, void*, void*) \ + X2(ns, int, WaitBufferReleased, void*, void*) \ + X2(ns, int, FrontBufferCopy, void*, void*) \ + X7(ns, int, PresentBuffer, void*, void*, void*, const void*, const void*, const void*, unsigned) \ + X2(ns, int, GetRasterStatus, void*, void*) \ + X3(ns, int, GetDisplayMode, void*, void*, void*) \ + X2(ns, int, GetPresentStats, void*, void*) \ + X2(ns, int, GetCursorPos, void*, void*) \ + X2(ns, int, SetCursorPos, void*, void*) \ + X4(ns, int, SetCursor, void*, void*, void*, int) \ + X3(ns, int, SetGammaRamp, void*, const void*, void*) \ + X5(ns, int, GetWindowInfo, void*, void*, void*, void*, void*) \ + X1(ns, int, GetWindowOccluded, void*) \ + X1(ns, int, ResolutionMismatch, void*) \ + X3(ns, void*, CreateThread, void*, void*, void*) \ + X2(ns, int, WaitForThread, void*, void*) \ + X2(ns, int, SetPresentParameters2, void*, void*) \ + X2(ns, int, IsBufferReleased, void*, void*) \ + X1(ns, int, WaitBufferReleaseEvent, void*) \ + +SUPER(Present, GOV_1, GOV_2, GOV_3, GOV_4, GOV_5, GOV_6, GOV_7, GOV_8) + +static void fixup_PresentVtbl(ID3DPresentVtbl *vtbl) +{ + SUPER(Present, GOS, GOS, GOS, GOS, GOS, GOS, GOS, GOS) +} +#undef SUPER + +static int pres_init = 0; + +#define GOV_PRES(ns, ret, fn, t1, t2, t3) \ + GOV(ns, ret, fn, (t1 a, t2 b, t3 c), (3, a, b, c)) \ + ID3DPresentVtbl*** vtbl = (void*)c; \ + if (!pres_init) fixup_PresentVtbl(**vtbl); \ + pres_init = 1; \ + return r; \ + } + +#define SUPER(ns, X1, X2, X3, XPRES) \ + X3(ns, int, QueryInterface, void*, void*, void**) \ + X1(ns, unsigned, AddRef, void*) \ + X1(ns, unsigned, Release, void*) \ + X1(ns, unsigned, GetMultiheadCount, void*) \ + XPRES(ns, int, GetPresent, void*, unsigned, void**) \ + X3(ns, int, CreateAdditionalPresent, void*, void*, void**) \ + X3(ns, /*void*/ int, GetVersion, void*, void*, void*) \ + +SUPER(PresentGroup, GOV_1, GOV_2, GOV_3, GOV_PRES) + +static void fixup_PresentGroupVtbl(ID3DPresentGroupVtbl *vtbl) +{ + SUPER(PresentGroup, GOS, GOS, GOS, GOS) +} +#undef SUPER +#undef GOS + +typedef struct my_Direct3D9 { + IDirect3D9Vtbl *vtbl; + IDirect3D9Vtbl **real; +} my_Direct3D9; + +unsigned my_Direct3D9_AddRef(void *This) +{ + my_Direct3D9 *my = This; + return RunFunction(my_context, (uintptr_t)(*my->real)->AddRef, 1, my->real); +} + +unsigned my_Direct3D9_Release(void *This) +{ + my_Direct3D9 *my = This; + return RunFunction(my_context, (uintptr_t)(*my->real)->Release, 1, my->real); +} + +IDirect3D9Vtbl my_Direct3D9_vtbl = { + .AddRef = my_Direct3D9_AddRef, + .Release = my_Direct3D9_Release, +}; + +static int my_GetDirect3D(x64emu_t* emu, void* This, void*** ppD3D9) +{ + int r = my_GetDirect3D_real(This, ppD3D9); + if (r) return r; + *ppD3D9 = (void**)((my_Direct3D9*)*ppD3D9)->real; + return 0; +} + +int my_create_device(x64emu_t* emu, void *This, unsigned RealAdapter, int DeviceType, void *hFocusWindow, unsigned BehaviorFlags, void *pPresent, IDirect3D9Vtbl **pD3D9, ID3DPresentGroupVtbl **pPresentationFactory, IDirect3DDevice9Vtbl ***ppReturnedDeviceInterface) +{ + my_Direct3D9 *my_pD3D9 = malloc(sizeof(my_Direct3D9)); + + my_pD3D9->vtbl = &my_Direct3D9_vtbl; + my_pD3D9->real = pD3D9; + + if (!my->presentgroup_init) { + fixup_PresentGroupVtbl(*pPresentationFactory); + my->presentgroup_init = 1; + } + + IDirect3DDevice9Vtbl **ret; + int r = my->CreateDevice(This, RealAdapter, DeviceType, hFocusWindow, BehaviorFlags, pPresent, my_pD3D9, pPresentationFactory, &ret); + + if (r) return r; + + if (!my->vtables.device_init) { + make_vtable_IDirect3DDevice9Vtbl(emu, &my->vtables.device, *ret); + my->vtables.device_init = 1; + } + + ret[0] = &my->vtables.device; + ret[1] = &my->vtables.device; + *ppReturnedDeviceInterface = ret; + + return 0; +} + +int my_create_adapter(x64emu_t* emu/*, int fd, ID3DAdapter9Vtbl ***x_adapter*/) +{ + + int fd = R_ECX; + ID3DAdapter9Vtbl ***x_adapter = (ID3DAdapter9Vtbl ***)R_RDX; + + ID3DAdapter9Vtbl **adapter; + int r = my->create_adapter(fd, &adapter); + if (r) return r; + + if (!my->vtables.adapter_init) { + my->CreateDevice = (void*)(*adapter)->CreateDevice; + (*adapter)->CreateDevice = (void*)my_create_device; + + make_vtable_ID3DAdapter9Vtbl(emu, &my->vtables.adapter, *adapter); + my->vtables.adapter_init = 1; + } + + adapter[0] = &my->vtables.adapter; + adapter[1] = &my->vtables.adapter; + *x_adapter = adapter; + + return 0 /* D3D_OK */; +} + +EXPORT void* my_D3DAdapter9GetProc(x64emu_t* emu, void *ptr) +{ + + /* stdcall, 1st param is in RCX */ + + my_D3DAdapter9DRM* adapter = my->D3DAdapter9GetProc("drm"); + + my->create_adapter = adapter->create_adapter; + + my->adapter.major_version = adapter->major_version; + my->adapter.minor_version = adapter->minor_version; + my->adapter.create_adapter = (void*)AddBridge(emu->context->system, iFEv, my_create_adapter, 0, "my_create_adapter"); + + return &my->adapter; +} + +#define CUSTOM_INIT \ + getMy(lib); + +#define CUSTOM_FINI \ + freeMy(); + +#include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedd3dadapter9_gen.h b/src/wrapped/wrappedd3dadapter9_gen.h new file mode 100644 index 00000000..c647412c --- /dev/null +++ b/src/wrapped/wrappedd3dadapter9_gen.h @@ -0,0 +1,697 @@ +/* Based on include/D3D9/ and include/d3dadapter/ in Mesa */ + +/* + * Copyright 2011 Joakim Sindholt <opensource@zhasha.com> + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. */ + +static void make_vtable_ID3DAdapter9Vtbl(x64emu_t* emu, ID3DAdapter9Vtbl* new, ID3DAdapter9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetAdapterIdentifier, iFpup, 3); + GO(CheckDeviceType, iFpiiii, 5); + GO(CheckDeviceFormat, iFpiiuii, 6); + GO(CheckDeviceMultiSampleType, iFpiiiip, 6); + GO(CheckDepthStencilMatch, iFpiiii, 5); + GO(CheckDeviceFormatConversion, iFpiii, 4); + GO(GetDeviceCaps, iFpip, 3); + GO(CreateDevice, iFEpuipupppp, 9); + GO(CreateDeviceEx, iFpuipuppppp, 10); +} + +static void make_vtable_IDirect3D9Vtbl(x64emu_t* emu, IDirect3D9Vtbl* new, IDirect3D9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(RegisterSoftwareDevice, iFpp, 2); + GO(GetAdapterCount, uFp, 1); + GO(GetAdapterIdentifier, iFpuup, 4); + GO(GetAdapterModeCount, uFpui, 3); + GO(EnumAdapterModes, iFpuiup, 5); + GO(GetAdapterDisplayMode, iFpup, 3); + GO(CheckDeviceType, iFpuiiii, 6); + GO(CheckDeviceFormat, iFpuiiuii, 7); + GO(CheckDeviceMultiSampleType, iFpuiiiip, 7); + GO(CheckDepthStencilMatch, iFpuiiii, 6); + GO(CheckDeviceFormatConversion, iFpuiii, 5); + GO(GetDeviceCaps, iFpuip, 4); + GO(GetAdapterMonitor, pFpu, 2); + GO(CreateDevice, iFpuipupp, 7); +} + +static void make_vtable_IDirect3D9ExVtbl(x64emu_t* emu, IDirect3D9ExVtbl* new, IDirect3D9ExVtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(RegisterSoftwareDevice, iFpp, 2); + GO(GetAdapterCount, uFp, 1); + GO(GetAdapterIdentifier, iFpuup, 4); + GO(GetAdapterModeCount, uFpui, 3); + GO(EnumAdapterModes, iFpuiup, 5); + GO(GetAdapterDisplayMode, iFpup, 3); + GO(CheckDeviceType, iFpuiiii, 6); + GO(CheckDeviceFormat, iFpuiiuii, 7); + GO(CheckDeviceMultiSampleType, iFpuiiiip, 7); + GO(CheckDepthStencilMatch, iFpuiiii, 6); + GO(CheckDeviceFormatConversion, iFpuiii, 5); + GO(GetDeviceCaps, iFpuip, 4); + GO(GetAdapterMonitor, pFpu, 2); + GO(CreateDevice, iFpuipupp, 7); + + GO(GetAdapterModeCountEx, uFpup, 3); + GO(EnumAdapterModesEx, iFpupup, 5); + GO(GetAdapterDisplayModeEx, iFpupp, 4); + GO(CreateDeviceEx, iFpuipuppp, 8); + GO(GetAdapterLUID, iFpup, 3); +} + +static void make_vtable_IDirect3D9ExOverlayExtensionVtbl(x64emu_t* emu, IDirect3D9ExOverlayExtensionVtbl* new, IDirect3D9ExOverlayExtensionVtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(CheckDeviceOverlayType, iFpuiuuipip, 9); +} + +static void make_vtable_IDirect3DAuthenticatedChannel9Vtbl(x64emu_t* emu, IDirect3DAuthenticatedChannel9Vtbl* new, IDirect3DAuthenticatedChannel9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetCertificateSize, iFpp, 2); + GO(GetCertificate, iFpup, 3); + GO(NegotiateKeyExchange, iFpup, 3); + GO(Query, iFpupup, 5); + GO(Configure, iFpupp, 4); +} + +static void make_vtable_IDirect3DBaseTexture9Vtbl(x64emu_t* emu, IDirect3DBaseTexture9Vtbl* new, IDirect3DBaseTexture9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetDevice, iFpp, 2); + GO(SetPrivateData, iFpppuu, 5); + GO(GetPrivateData, iFpppp, 4); + GO(FreePrivateData, iFpp, 2); + GO(SetPriority, uFpu, 2); + GO(GetPriority, uFp, 1); + GO(PreLoad, vFp, 1); + GO(GetType, iFp, 1); + + GO(SetLOD, uFpu, 2); + GO(GetLOD, uFp, 1); + GO(GetLevelCount, uFp, 1); + GO(SetAutoGenFilterType, iFpi, 2); + GO(GetAutoGenFilterType, iFp, 1); + GO(GenerateMipSubLevels, vFp, 1); +} + +static void make_vtable_IDirect3DCryptoSession9Vtbl(x64emu_t* emu, IDirect3DCryptoSession9Vtbl* new, IDirect3DCryptoSession9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetCertificateSize, iFpp, 2); + GO(GetCertificate, iFpup, 3); + GO(NegotiateKeyExchange, iFpup, 3); + GO(EncryptionBlt, iFpppup, 5); + GO(DecryptionBlt, iFpppuppp, 7); + GO(GetSurfacePitch, iFppp, 3); + GO(StartSessionKeyRefresh, iFppu, 3); + GO(FinishSessionKeyRefresh, iFp, 1); + GO(GetEncryptionBltKey, iFppu, 3); +} + +static void make_vtable_IDirect3DCubeTexture9Vtbl(x64emu_t* emu, IDirect3DCubeTexture9Vtbl* new, IDirect3DCubeTexture9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetDevice, iFpp, 2); + GO(SetPrivateData, iFpppuu, 5); + GO(GetPrivateData, iFpppp, 4); + GO(FreePrivateData, iFpp, 2); + GO(SetPriority, uFpu, 2); + GO(GetPriority, uFp, 1); + GO(PreLoad, vFp, 1); + GO(GetType, iFp, 1); + + GO(SetLOD, uFpu, 2); + GO(GetLOD, uFp, 1); + GO(GetLevelCount, uFp, 1); + GO(SetAutoGenFilterType, iFpi, 2); + GO(GetAutoGenFilterType, iFp, 1); + GO(GenerateMipSubLevels, vFp, 1); + + GO(GetLevelDesc, iFpup, 3); + GOM(GetCubeMapSurface, iFEpiup, 4); + GO(LockRect, iFpiuppu, 6); + GO(UnlockRect, iFpiu, 3); + GO(AddDirtyRect, iFpip, 3); +} + +static void make_vtable_IDirect3DDevice9Vtbl(x64emu_t* emu, IDirect3DDevice9Vtbl* new, IDirect3DDevice9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(TestCooperativeLevel, iFp, 1); + GO(GetAvailableTextureMem, uFp, 1); + GO(EvictManagedResources, iFp, 1); + GOM(GetDirect3D, iFEpp, 2); + GO(GetDeviceCaps, iFpp, 2); + GO(GetDisplayMode, iFpup, 3); + GO(GetCreationParameters, iFpp, 2); + GO(SetCursorProperties, iFpuup, 4); + GO(SetCursorPosition, vFpiiu, 4); + GO(ShowCursor, iFpi, 2); + GOM(CreateAdditionalSwapChain, iFEppp, 3); + GOM(GetSwapChain, iFEpup, 3); + GO(GetNumberOfSwapChains, uFp, 1); + GO(Reset, iFpp, 2); + GO(Present, iFppppp, 5); + GOM(GetBackBuffer, iFEpuuip, 5); + GO(GetRasterStatus, iFpup, 3); + GO(SetDialogBoxMode, iFpi, 2); + GO(SetGammaRamp, vFpuup, 4); + GO(GetGammaRamp, vFpup, 3); + GOM(CreateTexture, iFEpuuuuiipp, 9); + GOM(CreateVolumeTexture, iFEpuuuuuiipp, 10); + GOM(CreateCubeTexture, iFEpuuuiipp, 8); + GOM(CreateVertexBuffer, iFEpuuuipp, 7); + GOM(CreateIndexBuffer, iFEpuuiipp, 7); + GOM(CreateRenderTarget, iFEpuuiiuipp, 9); + GOM(CreateDepthStencilSurface, iFEpuuiiuipp, 9); + GO(UpdateSurface, iFppppp, 5); + GO(UpdateTexture, iFppp, 3); + GO(GetRenderTargetData, iFppp, 3); + GO(GetFrontBufferData, iFpup, 3); + GO(StretchRect, iFpppppi, 6); + GO(ColorFill, iFpppu, 4); + GOM(CreateOffscreenPlainSurface, iFEpuuiipp, 7); + GO(SetRenderTarget, iFpup, 3); + GOM(GetRenderTarget, iFEpup, 3); + GO(SetDepthStencilSurface, iFpp, 2); + GOM(GetDepthStencilSurface, iFEpp, 2); + GO(BeginScene, iFp, 1); + GO(EndScene, iFp, 1); + GO(Clear, iFpupuufu, 7); + GO(SetTransform, iFpip, 3); + GO(GetTransform, iFpip, 3); + GO(MultiplyTransform, iFpip, 3); + GO(SetViewport, iFpp, 2); + GO(GetViewport, iFpp, 2); + GO(SetMaterial, iFpp, 2); + GO(GetMaterial, iFpp, 2); + GO(SetLight, iFpup, 3); + GO(GetLight, iFpup, 3); + GO(LightEnable, iFpui, 3); + GO(GetLightEnable, iFpup, 3); + GO(SetClipPlane, iFpup, 3); + GO(GetClipPlane, iFpup, 3); + GO(SetRenderState, iFpiu, 3); + GO(GetRenderState, iFpip, 3); + GOM(CreateStateBlock, iFEpip, 3); + GO(BeginStateBlock, iFp, 1); + GOM(EndStateBlock, iFEpp, 2); + GO(SetClipStatus, iFpp, 2); + GO(GetClipStatus, iFpp, 2); + GO(GetTexture, iFpup, 3); + GO(SetTexture, iFpup, 3); + GO(GetTextureStageState, iFpuip, 4); + GO(SetTextureStageState, iFpuiu, 4); + GO(GetSamplerState, iFpuip, 4); + GO(SetSamplerState, iFpuiu, 4); + GO(ValidateDevice, iFpp, 2); + GO(SetPaletteEntries, iFpup, 3); + GO(GetPaletteEntries, iFpup, 3); + GO(SetCurrentTexturePalette, iFpu, 2); + GO(GetCurrentTexturePalette, iFpp, 2); + GO(SetScissorRect, iFpp, 2); + GO(GetScissorRect, iFpp, 2); + GO(SetSoftwareVertexProcessing, iFpi, 2); + GO(GetSoftwareVertexProcessing, iFp, 1); + GO(SetNPatchMode, iFpf, 2); + GO(GetNPatchMode, fFp, 1); + GO(DrawPrimitive, iFpiuu, 4); + GO(DrawIndexedPrimitive, iFpiiuuuu, 7); + GO(DrawPrimitiveUP, iFpiupu, 5); + GO(DrawIndexedPrimitiveUP, iFpiuuupipu, 9); + GO(ProcessVertices, iFpuuuppu, 7); + GOM(CreateVertexDeclaration, iFEppp, 3); + GO(SetVertexDeclaration, iFpp, 2); + GO(GetVertexDeclaration, iFpp, 2); + GO(SetFVF, iFpu, 2); + GO(GetFVF, iFpp, 2); + GOM(CreateVertexShader, iFEppp, 3); + GO(SetVertexShader, iFpp, 2); + GO(GetVertexShader, iFpp, 2); + GO(SetVertexShaderConstantF, iFpupu, 4); + GO(GetVertexShaderConstantF, iFpupu, 4); + GO(SetVertexShaderConstantI, iFpupu, 4); + GO(GetVertexShaderConstantI, iFpupu, 4); + GO(SetVertexShaderConstantB, iFpupu, 4); + GO(GetVertexShaderConstantB, iFpupu, 4); + GO(SetStreamSource, iFpupuu, 5); + GO(GetStreamSource, iFpuppp, 5); + GO(SetStreamSourceFreq, iFpuu, 3); + GO(GetStreamSourceFreq, iFpup, 3); + GO(SetIndices, iFpp, 2); + GO(GetIndices, iFpp, 2); + GOM(CreatePixelShader, iFEppp, 3); + GO(SetPixelShader, iFpp, 2); + GO(GetPixelShader, iFpp, 2); + GO(SetPixelShaderConstantF, iFpupu, 4); + GO(GetPixelShaderConstantF, iFpupu, 4); + GO(SetPixelShaderConstantI, iFpupu, 4); + GO(GetPixelShaderConstantI, iFpupu, 4); + GO(SetPixelShaderConstantB, iFpupu, 4); + GO(GetPixelShaderConstantB, iFpupu, 4); + GO(DrawRectPatch, iFpupp, 4); + GO(DrawTriPatch, iFpupp, 4); + GO(DeletePatch, iFpu, 2); + GOM(CreateQuery, iFEpip, 3); +} + +static void make_vtable_IDirect3DDevice9ExVtbl(x64emu_t* emu, IDirect3DDevice9ExVtbl* new, IDirect3DDevice9ExVtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(TestCooperativeLevel, iFp, 1); + GO(GetAvailableTextureMem, uFp, 1); + GO(EvictManagedResources, iFp, 1); + GO(GetDirect3D, iFpp, 2); + GO(GetDeviceCaps, iFpp, 2); + GO(GetDisplayMode, iFpup, 3); + GO(GetCreationParameters, iFpp, 2); + GO(SetCursorProperties, iFpuup, 4); + GO(SetCursorPosition, vFpiiu, 4); + GO(ShowCursor, iFpi, 2); + GOM(CreateAdditionalSwapChain, iFEppp, 3); + GOM(GetSwapChain, iFEpup, 3); + GO(GetNumberOfSwapChains, uFp, 1); + GO(Reset, iFpp, 2); + GO(Present, iFppppp, 5); + GOM(GetBackBuffer, iFEpuuip, 5); + GO(GetRasterStatus, iFpup, 3); + GO(SetDialogBoxMode, iFpi, 2); + GO(SetGammaRamp, vFpuup, 4); + GO(GetGammaRamp, vFpup, 3); + GOM(CreateTexture, iFEpuuuuiipp, 9); + GOM(CreateVolumeTexture, iFEpuuuuuiipp, 10); + GOM(CreateCubeTexture, iFEpuuuiipp, 8); + GOM(CreateVertexBuffer, iFEpuuuipp, 7); + GOM(CreateIndexBuffer, iFEpuuiipp, 7); + GOM(CreateRenderTarget, iFEpuuiiuipp, 9); + GOM(CreateDepthStencilSurface, iFEpuuiiuipp, 9); + GO(UpdateSurface, iFppppp, 5); + GO(UpdateTexture, iFppp, 3); + GO(GetRenderTargetData, iFppp, 3); + GO(GetFrontBufferData, iFpup, 3); + GO(StretchRect, iFpppppi, 6); + GO(ColorFill, iFpppu, 4); + GOM(CreateOffscreenPlainSurface, iFEpuuiipp, 7); + GO(SetRenderTarget, iFpup, 3); + GOM(GetRenderTarget, iFEpup, 3); + GO(SetDepthStencilSurface, iFpp, 2); + GOM(GetDepthStencilSurface, iFEpp, 2); + GO(BeginScene, iFp, 1); + GO(EndScene, iFp, 1); + GO(Clear, iFpupuufu, 7); + GO(SetTransform, iFpip, 3); + GO(GetTransform, iFpip, 3); + GO(MultiplyTransform, iFpip, 3); + GO(SetViewport, iFpp, 2); + GO(GetViewport, iFpp, 2); + GO(SetMaterial, iFpp, 2); + GO(GetMaterial, iFpp, 2); + GO(SetLight, iFpup, 3); + GO(GetLight, iFpup, 3); + GO(LightEnable, iFpui, 3); + GO(GetLightEnable, iFpup, 3); + GO(SetClipPlane, iFpup, 3); + GO(GetClipPlane, iFpup, 3); + GO(SetRenderState, iFpiu, 3); + GO(GetRenderState, iFpip, 3); + GOM(CreateStateBlock, iFEpip, 3); + GO(BeginStateBlock, iFp, 1); + GOM(EndStateBlock, iFEpp, 2); + GO(SetClipStatus, iFpp, 2); + GO(GetClipStatus, iFpp, 2); + GO(GetTexture, iFpup, 3); + GO(SetTexture, iFpup, 3); + GO(GetTextureStageState, iFpuip, 4); + GO(SetTextureStageState, iFpuiu, 4); + GO(GetSamplerState, iFpuip, 4); + GO(SetSamplerState, iFpuiu, 4); + GO(ValidateDevice, iFpp, 2); + GO(SetPaletteEntries, iFpup, 3); + GO(GetPaletteEntries, iFpup, 3); + GO(SetCurrentTexturePalette, iFpu, 2); + GO(GetCurrentTexturePalette, iFpp, 2); + GO(SetScissorRect, iFpp, 2); + GO(GetScissorRect, iFpp, 2); + GO(SetSoftwareVertexProcessing, iFpi, 2); + GO(GetSoftwareVertexProcessing, iFp, 1); + GO(SetNPatchMode, iFpf, 2); + GO(GetNPatchMode, fFp, 1); + GO(DrawPrimitive, iFpiuu, 4); + GO(DrawIndexedPrimitive, iFpiiuuuu, 7); + GO(DrawPrimitiveUP, iFpiupu, 5); + GO(DrawIndexedPrimitiveUP, iFpiuuupipu, 9); + GO(ProcessVertices, iFpuuuppu, 7); + GOM(CreateVertexDeclaration, iFEppp, 3); + GO(SetVertexDeclaration, iFpp, 2); + GO(GetVertexDeclaration, iFpp, 2); + GO(SetFVF, iFpu, 2); + GO(GetFVF, iFpp, 2); + GOM(CreateVertexShader, iFEppp, 3); + GO(SetVertexShader, iFpp, 2); + GO(GetVertexShader, iFpp, 2); + GO(SetVertexShaderConstantF, iFpupu, 4); + GO(GetVertexShaderConstantF, iFpupu, 4); + GO(SetVertexShaderConstantI, iFpupu, 4); + GO(GetVertexShaderConstantI, iFpupu, 4); + GO(SetVertexShaderConstantB, iFpupu, 4); + GO(GetVertexShaderConstantB, iFpupu, 4); + GO(SetStreamSource, iFpupuu, 5); + GO(GetStreamSource, iFpuppp, 5); + GO(SetStreamSourceFreq, iFpuu, 3); + GO(GetStreamSourceFreq, iFpup, 3); + GO(SetIndices, iFpp, 2); + GO(GetIndices, iFpp, 2); + GOM(CreatePixelShader, iFEppp, 3); + GO(SetPixelShader, iFpp, 2); + GO(GetPixelShader, iFpp, 2); + GO(SetPixelShaderConstantF, iFpupu, 4); + GO(GetPixelShaderConstantF, iFpupu, 4); + GO(SetPixelShaderConstantI, iFpupu, 4); + GO(GetPixelShaderConstantI, iFpupu, 4); + GO(SetPixelShaderConstantB, iFpupu, 4); + GO(GetPixelShaderConstantB, iFpupu, 4); + GO(DrawRectPatch, iFpupp, 4); + GO(DrawTriPatch, iFpupp, 4); + GO(DeletePatch, iFpu, 2); + GOM(CreateQuery, iFEpip, 3); + + GO(SetConvolutionMonoKernel, iFpuupp, 5); + GO(ComposeRects, iFppppupiii, 9); + GO(PresentEx, iFpppppu, 6); + GO(GetGPUThreadPriority, iFpp, 2); + GO(SetGPUThreadPriority, iFpi, 2); + GO(WaitForVBlank, iFpu, 2); + GOM(CheckResourceResidency, iFEppu, 3); + GO(SetMaximumFrameLatency, iFpu, 2); + GO(GetMaximumFrameLatency, iFpp, 2); + GO(CheckDeviceState, iFpp, 2); + GOM(CreateRenderTargetEx, iFEpuuiiuippu, 10); + GOM(CreateOffscreenPlainSurfaceEx, iFEpuuiippu, 8); + GOM(CreateDepthStencilSurfaceEx, iFEpuuiiuippu, 10); + GO(ResetEx, iFppp, 3); + GO(GetDisplayModeEx, iFpupp, 4); +} + +static void make_vtable_IDirect3DDevice9VideoVtbl(x64emu_t* emu, IDirect3DDevice9VideoVtbl* new, IDirect3DDevice9VideoVtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetContentProtectionCaps, iFpppp, 4); + GOM(CreateAuthenticatedChannel, iFEpipp, 4); + GOM(CreateCryptoSession, iFEppppp, 5); +} + +static void make_vtable_IDirect3DIndexBuffer9Vtbl(x64emu_t* emu, IDirect3DIndexBuffer9Vtbl* new, IDirect3DIndexBuffer9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetDevice, iFpp, 2); + GO(SetPrivateData, iFpppuu, 5); + GO(GetPrivateData, iFpppp, 4); + GO(FreePrivateData, iFpp, 2); + GO(SetPriority, uFpu, 2); + GO(GetPriority, uFp, 1); + GO(PreLoad, vFp, 1); + GO(GetType, iFp, 1); + + GO(Lock, iFpuupu, 5); + GO(Unlock, iFp, 1); + GO(GetDesc, iFpp, 2); +} + +static void make_vtable_IDirect3DPixelShader9Vtbl(x64emu_t* emu, IDirect3DPixelShader9Vtbl* new, IDirect3DPixelShader9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetDevice, iFpp, 2); + GO(GetFunction, iFppp, 3); +} + +static void make_vtable_IDirect3DQuery9Vtbl(x64emu_t* emu, IDirect3DQuery9Vtbl* new, IDirect3DQuery9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetDevice, iFpp, 2); + GO(GetType, iFp, 1); + GO(GetDataSize, uFp, 1); + GO(Issue, iFpu, 2); + GO(GetData, iFppuu, 4); +} + +static void make_vtable_IDirect3DResource9Vtbl(x64emu_t* emu, IDirect3DResource9Vtbl* new, IDirect3DResource9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetDevice, iFpp, 2); + GO(SetPrivateData, iFpppuu, 5); + GO(GetPrivateData, iFpppp, 4); + GO(FreePrivateData, iFpp, 2); + GO(SetPriority, uFpu, 2); + GO(GetPriority, uFp, 1); + GO(PreLoad, vFp, 1); + GO(GetType, iFp, 1); +} + +static void make_vtable_IDirect3DStateBlock9Vtbl(x64emu_t* emu, IDirect3DStateBlock9Vtbl* new, IDirect3DStateBlock9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetDevice, iFpp, 2); + GO(Capture, iFp, 1); + GO(Apply, iFp, 1); +} + +static void make_vtable_IDirect3DSurface9Vtbl(x64emu_t* emu, IDirect3DSurface9Vtbl* new, IDirect3DSurface9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetDevice, iFpp, 2); + GO(SetPrivateData, iFpppuu, 5); + GO(GetPrivateData, iFpppp, 4); + GO(FreePrivateData, iFpp, 2); + GO(SetPriority, uFpu, 2); + GO(GetPriority, uFp, 1); + GO(PreLoad, vFp, 1); + GO(GetType, iFp, 1); + + GO(GetContainer, iFppp, 3); + GO(GetDesc, iFpp, 2); + GO(LockRect, iFpppu, 4); + GO(UnlockRect, iFp, 1); + GO(GetDC, iFpp, 2); + GO(ReleaseDC, iFpp, 2); +} + +static void make_vtable_IDirect3DSwapChain9Vtbl(x64emu_t* emu, IDirect3DSwapChain9Vtbl* new, IDirect3DSwapChain9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(Present, iFpppppu, 6); + GO(GetFrontBufferData, iFpp, 2); + GO(GetBackBuffer, iFpuip, 4); // XXX + GO(GetRasterStatus, iFpp, 2); + GO(GetDisplayMode, iFpp, 2); + GO(GetDevice, iFpp, 2); + GO(GetPresentParameters, iFpp, 2); +} + +static void make_vtable_IDirect3DSwapChain9ExVtbl(x64emu_t* emu, IDirect3DSwapChain9ExVtbl* new, IDirect3DSwapChain9ExVtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(Present, iFpppppu, 6); + GO(GetFrontBufferData, iFpp, 2); + GO(GetBackBuffer, iFpuip, 4); // XXX + GO(GetRasterStatus, iFpp, 2); + GO(GetDisplayMode, iFpp, 2); + GO(GetDevice, iFpp, 2); + GO(GetPresentParameters, iFpp, 2); + + GO(GetLastPresentCount, iFpp, 2); + GO(GetPresentStats, iFpp, 2); + GO(GetDisplayModeEx, iFppp, 3); +} + +static void make_vtable_IDirect3DTexture9Vtbl(x64emu_t* emu, IDirect3DTexture9Vtbl* new, IDirect3DTexture9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetDevice, iFpp, 2); + GO(SetPrivateData, iFpppuu, 5); + GO(GetPrivateData, iFpppp, 4); + GO(FreePrivateData, iFpp, 2); + GO(SetPriority, uFpu, 2); + GO(GetPriority, uFp, 1); + GO(PreLoad, vFp, 1); + GO(GetType, iFp, 1); + + GO(SetLOD, uFpu, 2); + GO(GetLOD, uFp, 1); + GO(GetLevelCount, uFp, 1); + GO(SetAutoGenFilterType, iFpi, 2); + GO(GetAutoGenFilterType, iFp, 1); + GO(GenerateMipSubLevels, vFp, 1); + + GO(GetLevelDesc, iFpup, 3); + GOM(GetSurfaceLevel, iFEpup, 3); + GO(LockRect, iFpuppu, 5); + GO(UnlockRect, iFpu, 2); + GO(AddDirtyRect, iFpp, 2); +} + +static void make_vtable_IDirect3DVertexBuffer9Vtbl(x64emu_t* emu, IDirect3DVertexBuffer9Vtbl* new, IDirect3DVertexBuffer9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetDevice, iFpp, 2); + GO(SetPrivateData, iFpppuu, 5); + GO(GetPrivateData, iFpppp, 4); + GO(FreePrivateData, iFpp, 2); + GO(SetPriority, uFpu, 2); + GO(GetPriority, uFp, 1); + GO(PreLoad, vFp, 1); + GO(GetType, iFp, 1); + + GO(Lock, iFpuupu, 5); + GO(Unlock, iFp, 1); + GO(GetDesc, iFpp, 2); +} + +static void make_vtable_IDirect3DVertexDeclaration9Vtbl(x64emu_t* emu, IDirect3DVertexDeclaration9Vtbl* new, IDirect3DVertexDeclaration9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetDevice, iFpp, 2); + GO(GetDeclaration, iFppp, 3); +} + +static void make_vtable_IDirect3DVertexShader9Vtbl(x64emu_t* emu, IDirect3DVertexShader9Vtbl* new, IDirect3DVertexShader9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetDevice, iFpp, 2); + GO(GetFunction, iFppp, 3); +} + +static void make_vtable_IDirect3DVolume9Vtbl(x64emu_t* emu, IDirect3DVolume9Vtbl* new, IDirect3DVolume9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetDevice, iFpp, 2); + GO(SetPrivateData, iFpppuu, 5); + GO(GetPrivateData, iFpppp, 4); + GO(FreePrivateData, iFpp, 2); + GO(GetContainer, iFppp, 3); + GO(GetDesc, iFpp, 2); + GO(LockBox, iFpppu, 4); + GO(UnlockBox, iFp, 1); +} + +static void make_vtable_IDirect3DVolumeTexture9Vtbl(x64emu_t* emu, IDirect3DVolumeTexture9Vtbl* new, IDirect3DVolumeTexture9Vtbl* real) +{ + GO(QueryInterface, iFppp, 3); + GO(AddRef, uFp, 1); + GO(Release, uFp, 1); + + GO(GetDevice, iFpp, 2); + GO(SetPrivateData, iFpppuu, 5); + GO(GetPrivateData, iFpppp, 4); + GO(FreePrivateData, iFpp, 2); + GO(SetPriority, uFpu, 2); + GO(GetPriority, uFp, 1); + GO(PreLoad, vFp, 1); + GO(GetType, iFp, 1); + + GO(SetLOD, uFpu, 2); + GO(GetLOD, uFp, 1); + GO(GetLevelCount, uFp, 1); + GO(SetAutoGenFilterType, iFpi, 2); + GO(GetAutoGenFilterType, iFp, 1); + GO(GenerateMipSubLevels, vFp, 1); + + GO(GetLevelDesc, iFpup, 3); + GOM(GetVolumeLevel, iFEpup, 3); + GO(LockBox, iFpuppu, 5); + GO(UnlockBox, iFpu, 2); + GO(AddDirtyBox, iFpp, 2); +} diff --git a/src/wrapped/wrappedd3dadapter9_genvate.h b/src/wrapped/wrappedd3dadapter9_genvate.h new file mode 100644 index 00000000..51fe5a1b --- /dev/null +++ b/src/wrapped/wrappedd3dadapter9_genvate.h @@ -0,0 +1,231 @@ +GO(AddDirtyBox, iFpp) +GO(AddDirtyRect, iFpip) +GO(AddDirtyRect, iFpp) +GO(AddRef, uFp) +GO(Apply, iFp) +GO(BeginScene, iFp) +GO(BeginStateBlock, iFp) +GO(Capture, iFp) +GO(CheckDepthStencilMatch, iFpiiii) +GO(CheckDepthStencilMatch, iFpuiiii) +GO(CheckDeviceFormatConversion, iFpiii) +GO(CheckDeviceFormatConversion, iFpuiii) +GO(CheckDeviceFormat, iFpiiuii) +GO(CheckDeviceFormat, iFpuiiuii) +GO(CheckDeviceMultiSampleType, iFpiiiip) +GO(CheckDeviceMultiSampleType, iFpuiiiip) +GO(CheckDeviceOverlayType, iFpuiuuipip) +GO(CheckDeviceState, iFpp) +GO(CheckDeviceType, iFpiiii) +GO(CheckDeviceType, iFpuiiii) +GO(Clear, iFpupuufu) +GO(ColorFill, iFpppu) +GO(ComposeRects, iFppppupiii) +GO(Configure, iFpupp) +GO(CreateDeviceEx, iFpuipuppp) +GO(CreateDeviceEx, iFpuipuppppp) +GOM(CreateDevice, iFEpuipupppp) // Note that this one is unique (not a real GOM as it is assigned manually) +GO(CreateDevice, iFpuipupp) +GO(DecryptionBlt, iFpppuppp) +GO(DeletePatch, iFpu) +GO(DrawIndexedPrimitive, iFpiiuuuu) +GO(DrawIndexedPrimitiveUP, iFpiuuupipu) +GO(DrawPrimitive, iFpiuu) +GO(DrawPrimitiveUP, iFpiupu) +GO(DrawRectPatch, iFpupp) +GO(DrawTriPatch, iFpupp) +GO(EncryptionBlt, iFpppup) +GO(EndScene, iFp) +GO(EnumAdapterModesEx, iFpupup) +GO(EnumAdapterModes, iFpuiup) +GO(EvictManagedResources, iFp) +GO(FinishSessionKeyRefresh, iFp) +GO(FreePrivateData, iFpp) +GO(GenerateMipSubLevels, vFp) +GO(GetAdapterCount, uFp) +GO(GetAdapterDisplayModeEx, iFpupp) +GO(GetAdapterDisplayMode, iFpup) +GO(GetAdapterIdentifier, iFpup) +GO(GetAdapterIdentifier, iFpuup) +GO(GetAdapterLUID, iFpup) +GO(GetAdapterModeCountEx, uFpup) +GO(GetAdapterModeCount, uFpui) +GO(GetAdapterMonitor, pFpu) +GO(GetAutoGenFilterType, iFp) +GO(GetAvailableTextureMem, uFp) +GO(GetBackBuffer, iFpuip, 4);) +GO(GetCertificate, iFpup) +GO(GetCertificateSize, iFpp) +GO(GetClipPlane, iFpup) +GO(GetClipStatus, iFpp) +GO(GetContainer, iFppp) +GO(GetContentProtectionCaps, iFpppp) +GO(GetCreationParameters, iFpp) +GO(GetCurrentTexturePalette, iFpp) +GO(GetData, iFppuu) +GO(GetDataSize, uFp) +GO(GetDC, iFpp) +GO(GetDeclaration, iFppp) +GO(GetDesc, iFpp) +GO(GetDeviceCaps, iFpip) +GO(GetDeviceCaps, iFpp) +GO(GetDeviceCaps, iFpuip) +GO(GetDevice, iFpp) +GO(GetDirect3D, iFpp) +GO(GetDisplayModeEx, iFppp) +GO(GetDisplayModeEx, iFpupp) +GO(GetDisplayMode, iFpp) +GO(GetDisplayMode, iFpup) +GO(GetEncryptionBltKey, iFppu) +GO(GetFrontBufferData, iFpp) +GO(GetFrontBufferData, iFpup) +GO(GetFunction, iFppp) +GO(GetFVF, iFpp) +GO(GetGammaRamp, vFpup) +GO(GetGPUThreadPriority, iFpp) +GO(GetIndices, iFpp) +GO(GetLastPresentCount, iFpp) +GO(GetLevelCount, uFp) +GO(GetLevelDesc, iFpup) +GO(GetLightEnable, iFpup) +GO(GetLight, iFpup) +GO(GetLOD, uFp) +GO(GetMaterial, iFpp) +GO(GetMaximumFrameLatency, iFpp) +GO(GetNPatchMode, fFp) +GO(GetNumberOfSwapChains, uFp) +GO(GetPaletteEntries, iFpup) +GO(GetPixelShaderConstantB, iFpupu) +GO(GetPixelShaderConstantF, iFpupu) +GO(GetPixelShaderConstantI, iFpupu) +GO(GetPixelShader, iFpp) +GO(GetPresentParameters, iFpp) +GO(GetPresentStats, iFpp) +GO(GetPriority, uFp) +GO(GetPrivateData, iFpppp) +GO(GetRasterStatus, iFpp) +GO(GetRasterStatus, iFpup) +GO(GetRenderState, iFpip) +GO(GetRenderTargetData, iFppp) +GO(GetSamplerState, iFpuip) +GO(GetScissorRect, iFpp) +GO(GetSoftwareVertexProcessing, iFp) +GO(GetStreamSourceFreq, iFpup) +GO(GetStreamSource, iFpuppp) +GO(GetSurfacePitch, iFppp) +GO(GetTexture, iFpup) +GO(GetTextureStageState, iFpuip) +GO(GetTransform, iFpip) +GO(GetType, iFp) +GO(GetVertexDeclaration, iFpp) +GO(GetVertexShaderConstantB, iFpupu) +GO(GetVertexShaderConstantF, iFpupu) +GO(GetVertexShaderConstantI, iFpupu) +GO(GetVertexShader, iFpp) +GO(GetViewport, iFpp) +GO(Issue, iFpu) +GO(LightEnable, iFpui) +GO(LockBox, iFpppu) +GO(LockBox, iFpuppu) +GO(Lock, iFpuupu) +GO(LockRect, iFpiuppu) +GO(LockRect, iFpppu) +GO(LockRect, iFpuppu) +GOM(CheckResourceResidency, iFEppu) +GOM(CreateAdditionalSwapChain, iFEppp) +GOM(CreateAuthenticatedChannel, iFEpipp) +GOM(CreateCryptoSession, iFEppppp) +GOM(CreateCubeTexture, iFEpuuuiipp) +GOM(CreateDepthStencilSurfaceEx, iFEpuuiiuippu) +GOM(CreateDepthStencilSurface, iFEpuuiiuipp) +GOM(CreateIndexBuffer, iFEpuuiipp) +GOM(CreateOffscreenPlainSurfaceEx, iFEpuuiippu) +GOM(CreateOffscreenPlainSurface, iFEpuuiipp) +GOM(CreatePixelShader, iFEppp) +GOM(CreateQuery, iFEpip) +GOM(CreateRenderTargetEx, iFEpuuiiuippu) +GOM(CreateRenderTarget, iFEpuuiiuipp) +GOM(CreateStateBlock, iFEpip) +GOM(CreateTexture, iFEpuuuuiipp) +GOM(CreateVertexBuffer, iFEpuuuipp) +GOM(CreateVertexDeclaration, iFEppp) +GOM(CreateVertexShader, iFEppp) +GOM(CreateVolumeTexture, iFEpuuuuuiipp) +GOM(EndStateBlock, iFEpp) +GOM(GetBackBuffer, iFEpuuip) +GOM(GetCubeMapSurface, iFEpiup) +GOM(GetDepthStencilSurface, iFEpp) +GOM(GetDirect3D, iFEpp) +GOM(GetRenderTarget, iFEpup) +GOM(GetSurfaceLevel, iFEpup) +GOM(GetSwapChain, iFEpup) +GOM(GetVolumeLevel, iFEpup) +GO(MultiplyTransform, iFpip) +GO(NegotiateKeyExchange, iFpup) +GO(PreLoad, vFp) +GO(PresentEx, iFpppppu) +GO(Present, iFppppp) +GO(Present, iFpppppu) +GO(ProcessVertices, iFpuuuppu) +GO(Query, iFpupup) +GO(QueryInterface, iFppp) +GO(RegisterSoftwareDevice, iFpp) +GO(ReleaseDC, iFpp) +GO(Release, uFp) +GO(ResetEx, iFppp) +GO(Reset, iFpp) +GO(SetAutoGenFilterType, iFpi) +GO(SetClipPlane, iFpup) +GO(SetClipStatus, iFpp) +GO(SetConvolutionMonoKernel, iFpuupp) +GO(SetCurrentTexturePalette, iFpu) +GO(SetCursorPosition, vFpiiu) +GO(SetCursorProperties, iFpuup) +GO(SetDepthStencilSurface, iFpp) +GO(SetDialogBoxMode, iFpi) +GO(SetFVF, iFpu) +GO(SetGammaRamp, vFpuup) +GO(SetGPUThreadPriority, iFpi) +GO(SetIndices, iFpp) +GO(SetLight, iFpup) +GO(SetLOD, uFpu) +GO(SetMaterial, iFpp) +GO(SetMaximumFrameLatency, iFpu) +GO(SetNPatchMode, iFpf) +GO(SetPaletteEntries, iFpup) +GO(SetPixelShaderConstantB, iFpupu) +GO(SetPixelShaderConstantF, iFpupu) +GO(SetPixelShaderConstantI, iFpupu) +GO(SetPixelShader, iFpp) +GO(SetPriority, uFpu) +GO(SetPrivateData, iFpppuu) +GO(SetRenderState, iFpiu) +GO(SetRenderTarget, iFpup) +GO(SetSamplerState, iFpuiu) +GO(SetScissorRect, iFpp) +GO(SetSoftwareVertexProcessing, iFpi) +GO(SetStreamSourceFreq, iFpuu) +GO(SetStreamSource, iFpupuu) +GO(SetTexture, iFpup) +GO(SetTextureStageState, iFpuiu) +GO(SetTransform, iFpip) +GO(SetVertexDeclaration, iFpp) +GO(SetVertexShaderConstantB, iFpupu) +GO(SetVertexShaderConstantF, iFpupu) +GO(SetVertexShaderConstantI, iFpupu) +GO(SetVertexShader, iFpp) +GO(SetViewport, iFpp) +GO(ShowCursor, iFpi) +GO(StartSessionKeyRefresh, iFppu) +GO(StretchRect, iFpppppi) +GO(TestCooperativeLevel, iFp) +GO(UnlockBox, iFp) +GO(UnlockBox, iFpu) +GO(Unlock, iFp) +GO(UnlockRect, iFp) +GO(UnlockRect, iFpiu) +GO(UnlockRect, iFpu) +GO(UpdateSurface, iFppppp) +GO(UpdateTexture, iFppp) +GO(ValidateDevice, iFpp) +GO(WaitForVBlank, iFpu) diff --git a/src/wrapped/wrappedd3dadapter9_private.h b/src/wrapped/wrappedd3dadapter9_private.h new file mode 100644 index 00000000..a6bfb6d8 --- /dev/null +++ b/src/wrapped/wrappedd3dadapter9_private.h @@ -0,0 +1,5 @@ +#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA)) +#error meh! +#endif + +GOM(D3DAdapter9GetProc, pFEp) diff --git a/src/wrapped/wrappedd3dadapter9_vtable.h b/src/wrapped/wrappedd3dadapter9_vtable.h new file mode 100644 index 00000000..c274e15a --- /dev/null +++ b/src/wrapped/wrappedd3dadapter9_vtable.h @@ -0,0 +1,744 @@ +/* Taken from include/ and include/d3dadapter/ in Mesa, with some + * typedefs and defines removed. */ + +/* + * Copyright 2011 Joakim Sindholt <opensource@zhasha.com> + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. */ + +typedef struct ID3DAdapter9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* ID3DAdapter9 */ + int (*GetAdapterIdentifier)(void *This, unsigned Flags, void *pIdentifier); + int (*CheckDeviceType)(void *This, int DevType, int AdapterFormat, int BackBufferFormat, int bWindowed); + int (*CheckDeviceFormat)(void *This, int DeviceType, int AdapterFormat, unsigned Usage, int RType, int CheckFormat); + int (*CheckDeviceMultiSampleType)(void *This, int DeviceType, int SurfaceFormat, int Windowed, int MultiSampleType, void *pQualityLevels); + int (*CheckDepthStencilMatch)(void *This, int DeviceType, int AdapterFormat, int RenderTargetFormat, int DepthStencilFormat); + int (*CheckDeviceFormatConversion)(void *This, int DeviceType, int SourceFormat, int TargetFormat); + int (*GetDeviceCaps)(void *This, int DeviceType, void *pCaps); + int (*CreateDevice)(void *This, unsigned RealAdapter, int DeviceType, void *hFocusWindow, unsigned BehaviorFlags, void *pPresentationParameters, void *pD3D9, void *pPresentationFactory, void **ppReturnedDeviceInterface); + int (*CreateDeviceEx)(void *This, unsigned RealAdapter, int DeviceType, void *hFocusWindow, unsigned BehaviorFlags, void *pPresentationParameters, void *pFullscreenDisplayMode, void *pD3D9Ex, void *pPresentationFactory, void **ppReturnedDeviceInterface); +} ID3DAdapter9Vtbl; + +typedef struct ID3DPresentVtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + + /* ID3DPresent */ + int (*SetPresentParameters)(void *This, void *pPresentationParameters, void *pFullscreenDisplayMode); + int (*NewD3DWindowBufferFromDmaBuf)(void *This, int dmaBufFd, int width, int height, int stride, int depth, int bpp, void **out); + int (*DestroyD3DWindowBuffer)(void *This, void *buffer); + int (*WaitBufferReleased)(void *This, void *buffer); + int (*FrontBufferCopy)(void *This, void *buffer); + int (*PresentBuffer)(void *This, void *buffer, void *hWndOverride, const void *pSourceRect, const void *pDestRect, const void *pDirtyRegion, unsigned Flags); + int (*GetRasterStatus)(void *This, void *pRasterStatus); + int (*GetDisplayMode)(void *This, void *pMode, void *pRotation); + int (*GetPresentStats)(void *This, void *pStats); + int (*GetCursorPos)(void *This, void *pPoint); + int (*SetCursorPos)(void *This, void *pPoint); + int (*SetCursor)(void *This, void *pBitmap, void *pHotspot, int bShow); + int (*SetGammaRamp)(void *This, const void *pRamp, void *hWndOverride); + int (*GetWindowInfo)(void *This, void *hWnd, void *width, void *height, void *depth); + int (*GetWindowOccluded)(void *This); + int (*ResolutionMismatch)(void *This); + void *(*CreateThread)(void *This, void *pThreadfunc, void *pParam); + int (*WaitForThread)(void *This, void *thread); + int (*SetPresentParameters2)(void *This, void *pParameters); + int (*IsBufferReleased)(void *This, void *buffer); + int (*WaitBufferReleaseEvent)(void *This); +} ID3DPresentVtbl; + +typedef struct ID3DPresentGroupVtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + + /* ID3DPresentGroup */ + unsigned (*GetMultiheadCount)(void *This); + int (*GetPresent)(void *This, unsigned Index, void **ppPresent); + int (*CreateAdditionalPresent)(void *This, void *pPresentationParameters, void **ppPresent); + /*void*/ int (*GetVersion) (void *This, void *major, void *minor); +} ID3DPresentGroupVtbl; + + + +typedef struct IDirect3D9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3D9 */ + int (*RegisterSoftwareDevice)(void *This, void *pInitializeFunction); + unsigned (*GetAdapterCount)(void *This); + int (*GetAdapterIdentifier)(void *This, unsigned Adapter, unsigned Flags, void *pIdentifier); + unsigned (*GetAdapterModeCount)(void *This, unsigned Adapter, int Format); + int (*EnumAdapterModes)(void *This, unsigned Adapter, int Format, unsigned Mode, void *pMode); + int (*GetAdapterDisplayMode)(void *This, unsigned Adapter, void *pMode); + int (*CheckDeviceType)(void *This, unsigned Adapter, int DevType, int AdapterFormat, int BackBufferFormat, int bWindowed); + int (*CheckDeviceFormat)(void *This, unsigned Adapter, int DeviceType, int AdapterFormat, unsigned Usage, int RType, int CheckFormat); + int (*CheckDeviceMultiSampleType)(void *This, unsigned Adapter, int DeviceType, int SurfaceFormat, int Windowed, int MultiSampleType, void *pQualityLevels); + int (*CheckDepthStencilMatch)(void *This, unsigned Adapter, int DeviceType, int AdapterFormat, int RenderTargetFormat, int DepthStencilFormat); + int (*CheckDeviceFormatConversion)(void *This, unsigned Adapter, int DeviceType, int SourceFormat, int TargetFormat); + int (*GetDeviceCaps)(void *This, unsigned Adapter, int DeviceType, void *pCaps); + void *(*GetAdapterMonitor)(void *This, unsigned Adapter); + int (*CreateDevice)(void *This, unsigned Adapter, int DeviceType, void *hFocusWindow, unsigned BehaviorFlags, void *pPresentationParameters, void **ppReturnedDeviceInterface); +} IDirect3D9Vtbl; + +typedef struct IDirect3D9ExVtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3D9 */ + int (*RegisterSoftwareDevice)(void *This, void *pInitializeFunction); + unsigned (*GetAdapterCount)(void *This); + int (*GetAdapterIdentifier)(void *This, unsigned Adapter, unsigned Flags, void *pIdentifier); + unsigned (*GetAdapterModeCount)(void *This, unsigned Adapter, int Format); + int (*EnumAdapterModes)(void *This, unsigned Adapter, int Format, unsigned Mode, void *pMode); + int (*GetAdapterDisplayMode)(void *This, unsigned Adapter, void *pMode); + int (*CheckDeviceType)(void *This, unsigned Adapter, int DevType, int AdapterFormat, int BackBufferFormat, int bWindowed); + int (*CheckDeviceFormat)(void *This, unsigned Adapter, int DeviceType, int AdapterFormat, unsigned Usage, int RType, int CheckFormat); + int (*CheckDeviceMultiSampleType)(void *This, unsigned Adapter, int DeviceType, int SurfaceFormat, int Windowed, int MultiSampleType, void *pQualityLevels); + int (*CheckDepthStencilMatch)(void *This, unsigned Adapter, int DeviceType, int AdapterFormat, int RenderTargetFormat, int DepthStencilFormat); + int (*CheckDeviceFormatConversion)(void *This, unsigned Adapter, int DeviceType, int SourceFormat, int TargetFormat); + int (*GetDeviceCaps)(void *This, unsigned Adapter, int DeviceType, void *pCaps); + void *(*GetAdapterMonitor)(void *This, unsigned Adapter); + int (*CreateDevice)(void *This, unsigned Adapter, int DeviceType, void *hFocusWindow, unsigned BehaviorFlags, void *pPresentationParameters, void **ppReturnedDeviceInterface); + /* IDirect3D9Ex */ + unsigned (*GetAdapterModeCountEx)(void *This, unsigned Adapter, const void *pFilter); + int (*EnumAdapterModesEx)(void *This, unsigned Adapter, const void *pFilter, unsigned Mode, void *pMode); + int (*GetAdapterDisplayModeEx)(void *This, unsigned Adapter, void *pMode, void *pRotation); + int (*CreateDeviceEx)(void *This, unsigned Adapter, int DeviceType, void *hFocusWindow, unsigned BehaviorFlags, void *pPresentationParameters, void *pFullscreenDisplayMode, void **ppReturnedDeviceInterface); + int (*GetAdapterLUID)(void *This, unsigned Adapter, void *pLUID); +} IDirect3D9ExVtbl; + +typedef struct IDirect3D9ExOverlayExtensionVtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3D9ExOverlayExtension */ + int (*CheckDeviceOverlayType)(void *This, unsigned Adapter, int DevType, unsigned OverlayWidth, unsigned OverlayHeight, int OverlayFormat, void *pDisplayMode, int DisplayRotation, void *pOverlayCaps); +} IDirect3D9ExOverlayExtensionVtbl; + +typedef struct IDirect3DAuthenticatedChannel9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DAuthenticatedChannel9 */ + int (*GetCertificateSize)(void *This, void *pCertificateSize); + int (*GetCertificate)(void *This, unsigned CertifacteSize, void *ppCertificate); + int (*NegotiateKeyExchange)(void *This, unsigned DataSize, void *pData); + int (*Query)(void *This, unsigned InputSize, const void *pInput, unsigned OutputSize, void *pOutput); + int (*Configure)(void *This, unsigned InputSize, const void *pInput, void *pOutput); +} IDirect3DAuthenticatedChannel9Vtbl; + +typedef struct IDirect3DBaseTexture9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DResource9 */ + int (*GetDevice)(void *This, void **ppDevice); + int (*SetPrivateData)(void *This, void *refguid, const void *pData, unsigned SizeOfData, unsigned Flags); + int (*GetPrivateData)(void *This, void *refguid, void *pData, void *pSizeOfData); + int (*FreePrivateData)(void *This, void *refguid); + unsigned (*SetPriority)(void *This, unsigned PriorityNew); + unsigned (*GetPriority)(void *This); + void (*PreLoad)(void *This); + int (*GetType)(void *This); + /* IDirect3DBaseTexture9 */ + unsigned (*SetLOD)(void *This, unsigned LODNew); + unsigned (*GetLOD)(void *This); + unsigned (*GetLevelCount)(void *This); + int (*SetAutoGenFilterType)(void *This, int FilterType); + int (*GetAutoGenFilterType)(void *This); + void (*GenerateMipSubLevels)(void *This); +} IDirect3DBaseTexture9Vtbl; + +typedef struct IDirect3DCryptoSession9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DCryptoSession9 */ + int (*GetCertificateSize)(void *This, void *pCertificateSize); + int (*GetCertificate)(void *This, unsigned CertifacteSize, void *ppCertificate); + int (*NegotiateKeyExchange)(void *This, unsigned DataSize, void *pData); + int (*EncryptionBlt)(void *This, void *pSrcSurface, void *pDstSurface, unsigned DstSurfaceSize, void *pIV); + int (*DecryptionBlt)(void *This, void *pSrcSurface, void *pDstSurface, unsigned SrcSurfaceSize, void *pEncryptedBlockInfo, void *pContentKey, void *pIV); + int (*GetSurfacePitch)(void *This, void *pSrcSurface, void *pSurfacePitch); + int (*StartSessionKeyRefresh)(void *This, void *pRandomNumber, unsigned RandomNumberSize); + int (*FinishSessionKeyRefresh)(void *This); + int (*GetEncryptionBltKey)(void *This, void *pReadbackKey, unsigned KeySize); +} IDirect3DCryptoSession9Vtbl; + +typedef struct IDirect3DCubeTexture9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DResource9 */ + int (*GetDevice)(void *This, void **ppDevice); + int (*SetPrivateData)(void *This, void *refguid, const void *pData, unsigned SizeOfData, unsigned Flags); + int (*GetPrivateData)(void *This, void *refguid, void *pData, void *pSizeOfData); + int (*FreePrivateData)(void *This, void *refguid); + unsigned (*SetPriority)(void *This, unsigned PriorityNew); + unsigned (*GetPriority)(void *This); + void (*PreLoad)(void *This); + int (*GetType)(void *This); + /* IDirect3DBaseTexture9 */ + unsigned (*SetLOD)(void *This, unsigned LODNew); + unsigned (*GetLOD)(void *This); + unsigned (*GetLevelCount)(void *This); + int (*SetAutoGenFilterType)(void *This, int FilterType); + int (*GetAutoGenFilterType)(void *This); + void (*GenerateMipSubLevels)(void *This); + /* IDirect3DCubeTexture9 */ + int (*GetLevelDesc)(void *This, unsigned Level, void *pDesc); + int (*GetCubeMapSurface)(void *This, int FaceType, unsigned Level, void **ppCubeMapSurface); + int (*LockRect)(void *This, int FaceType, unsigned Level, void *pLockedRect, const void *pRect, unsigned Flags); + int (*UnlockRect)(void *This, int FaceType, unsigned Level); + int (*AddDirtyRect)(void *This, int FaceType, const void *pDirtyRect); +} IDirect3DCubeTexture9Vtbl; + +typedef struct IDirect3DDevice9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DDevice9 */ + int (*TestCooperativeLevel)(void *This); + unsigned (*GetAvailableTextureMem)(void *This); + int (*EvictManagedResources)(void *This); + int (*GetDirect3D)(void *This, void **ppD3D9); + int (*GetDeviceCaps)(void *This, void *pCaps); + int (*GetDisplayMode)(void *This, unsigned iSwapChain, void *pMode); + int (*GetCreationParameters)(void *This, void *pParameters); + int (*SetCursorProperties)(void *This, unsigned XHotSpot, unsigned YHotSpot, void *pCursorBitmap); + void (*SetCursorPosition)(void *This, int X, int Y, unsigned Flags); + int (*ShowCursor)(void *This, int bShow); + int (*CreateAdditionalSwapChain)(void *This, void *pPresentationParameters, void **pSwapChain); + int (*GetSwapChain)(void *This, unsigned iSwapChain, void **pSwapChain); + unsigned (*GetNumberOfSwapChains)(void *This); + int (*Reset)(void *This, void *pPresentationParameters); + int (*Present)(void *This, const void *pSourceRect, const void *pDestRect, void *hDestWindowOverride, const void *pDirtyRegion); + int (*GetBackBuffer)(void *This, unsigned iSwapChain, unsigned iBackBuffer, int Type, void **ppBackBuffer); + int (*GetRasterStatus)(void *This, unsigned iSwapChain, void *pRasterStatus); + int (*SetDialogBoxMode)(void *This, int bEnableDialogs); + void (*SetGammaRamp)(void *This, unsigned iSwapChain, unsigned Flags, const void *pRamp); + void (*GetGammaRamp)(void *This, unsigned iSwapChain, void *pRamp); + int (*CreateTexture)(void *This, unsigned Width, unsigned Height, unsigned Levels, unsigned Usage, int Format, int Pool, void **ppTexture, void *pSharedHandle); + int (*CreateVolumeTexture)(void *This, unsigned Width, unsigned Height, unsigned Depth, unsigned Levels, unsigned Usage, int Format, int Pool, void **ppVolumeTexture, void *pSharedHandle); + int (*CreateCubeTexture)(void *This, unsigned EdgeLength, unsigned Levels, unsigned Usage, int Format, int Pool, void **ppCubeTexture, void *pSharedHandle); + int (*CreateVertexBuffer)(void *This, unsigned Length, unsigned Usage, unsigned FVF, int Pool, void **ppVertexBuffer, void *pSharedHandle); + int (*CreateIndexBuffer)(void *This, unsigned Length, unsigned Usage, int Format, int Pool, void **ppIndexBuffer, void *pSharedHandle); + int (*CreateRenderTarget)(void *This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Lockable, void **ppSurface, void *pSharedHandle); + int (*CreateDepthStencilSurface)(void *This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Discard, void **ppSurface, void *pSharedHandle); + int (*UpdateSurface)(void *This, void *pSourceSurface, const void *pSourceRect, void *pDestinationSurface, const void *pDestPoint); + int (*UpdateTexture)(void *This, void *pSourceTexture, void *pDestinationTexture); + int (*GetRenderTargetData)(void *This, void *pRenderTarget, void *pDestSurface); + int (*GetFrontBufferData)(void *This, unsigned iSwapChain, void *pDestSurface); + int (*StretchRect)(void *This, void *pSourceSurface, const void *pSourceRect, void *pDestSurface, const void *pDestRect, int Filter); + int (*ColorFill)(void *This, void *pSurface, const void *pRect, unsigned color); + int (*CreateOffscreenPlainSurface)(void *This, unsigned Width, unsigned Height, int Format, int Pool, void **ppSurface, void *pSharedHandle); + int (*SetRenderTarget)(void *This, unsigned RenderTargetIndex, void *pRenderTarget); + int (*GetRenderTarget)(void *This, unsigned RenderTargetIndex, void **ppRenderTarget); + int (*SetDepthStencilSurface)(void *This, void *pNewZStencil); + int (*GetDepthStencilSurface)(void *This, void **ppZStencilSurface); + int (*BeginScene)(void *This); + int (*EndScene)(void *This); + int (*Clear)(void *This, unsigned Count, const void *pRects, unsigned Flags, unsigned Color, float Z, unsigned Stencil); + int (*SetTransform)(void *This, int State, const void *pMatrix); + int (*GetTransform)(void *This, int State, void *pMatrix); + int (*MultiplyTransform)(void *This, int State, const void *pMatrix); + int (*SetViewport)(void *This, const void *pViewport); + int (*GetViewport)(void *This, void *pViewport); + int (*SetMaterial)(void *This, const void *pMaterial); + int (*GetMaterial)(void *This, void *pMaterial); + int (*SetLight)(void *This, unsigned Index, const void *pLight); + int (*GetLight)(void *This, unsigned Index, void *pLight); + int (*LightEnable)(void *This, unsigned Index, int Enable); + int (*GetLightEnable)(void *This, unsigned Index, void *pEnable); + int (*SetClipPlane)(void *This, unsigned Index, const void *pPlane); + int (*GetClipPlane)(void *This, unsigned Index, void *pPlane); + int (*SetRenderState)(void *This, int State, unsigned Value); + int (*GetRenderState)(void *This, int State, void *pValue); + int (*CreateStateBlock)(void *This, int Type, void **ppSB); + int (*BeginStateBlock)(void *This); + int (*EndStateBlock)(void *This, void **ppSB); + int (*SetClipStatus)(void *This, const void *pClipStatus); + int (*GetClipStatus)(void *This, void *pClipStatus); + int (*GetTexture)(void *This, unsigned Stage, void **ppTexture); + int (*SetTexture)(void *This, unsigned Stage, void *pTexture); + int (*GetTextureStageState)(void *This, unsigned Stage, int Type, void *pValue); + int (*SetTextureStageState)(void *This, unsigned Stage, int Type, unsigned Value); + int (*GetSamplerState)(void *This, unsigned Sampler, int Type, void *pValue); + int (*SetSamplerState)(void *This, unsigned Sampler, int Type, unsigned Value); + int (*ValidateDevice)(void *This, void *pNumPasses); + int (*SetPaletteEntries)(void *This, unsigned PaletteNumber, const void *pEntries); + int (*GetPaletteEntries)(void *This, unsigned PaletteNumber, void *pEntries); + int (*SetCurrentTexturePalette)(void *This, unsigned PaletteNumber); + int (*GetCurrentTexturePalette)(void *This, void *PaletteNumber); + int (*SetScissorRect)(void *This, const void *pRect); + int (*GetScissorRect)(void *This, void *pRect); + int (*SetSoftwareVertexProcessing)(void *This, int bSoftware); + int (*GetSoftwareVertexProcessing)(void *This); + int (*SetNPatchMode)(void *This, float nSegments); + float (*GetNPatchMode)(void *This); + int (*DrawPrimitive)(void *This, int PrimitiveType, unsigned StartVertex, unsigned PrimitiveCount); + int (*DrawIndexedPrimitive)(void *This, int PrimitiveType, int BaseVertexIndex, unsigned MinVertexIndex, unsigned NumVertices, unsigned startIndex, unsigned primCount); + int (*DrawPrimitiveUP)(void *This, int PrimitiveType, unsigned PrimitiveCount, const void *pVertexStreamZeroData, unsigned VertexStreamZeroStride); + int (*DrawIndexedPrimitiveUP)(void *This, int PrimitiveType, unsigned MinVertexIndex, unsigned NumVertices, unsigned PrimitiveCount, const void *pIndexData, int IndexDataFormat, const void *pVertexStreamZeroData, unsigned VertexStreamZeroStride); + int (*ProcessVertices)(void *This, unsigned SrcStartIndex, unsigned DestIndex, unsigned VertexCount, void *pDestBuffer, void *pVertexDecl, unsigned Flags); + int (*CreateVertexDeclaration)(void *This, const void *pVertexElements, void **ppDecl); + int (*SetVertexDeclaration)(void *This, void *pDecl); + int (*GetVertexDeclaration)(void *This, void **ppDecl); + int (*SetFVF)(void *This, unsigned FVF); + int (*GetFVF)(void *This, void *pFVF); + int (*CreateVertexShader)(void *This, const void *pFunction, void **ppShader); + int (*SetVertexShader)(void *This, void *pShader); + int (*GetVertexShader)(void *This, void **ppShader); + int (*SetVertexShaderConstantF)(void *This, unsigned StartRegister, const void *pConstantData, unsigned Vector4fCount); + int (*GetVertexShaderConstantF)(void *This, unsigned StartRegister, void *pConstantData, unsigned Vector4fCount); + int (*SetVertexShaderConstantI)(void *This, unsigned StartRegister, const void *pConstantData, unsigned Vector4iCount); + int (*GetVertexShaderConstantI)(void *This, unsigned StartRegister, void *pConstantData, unsigned Vector4iCount); + int (*SetVertexShaderConstantB)(void *This, unsigned StartRegister, const void *pConstantData, unsigned BoolCount); + int (*GetVertexShaderConstantB)(void *This, unsigned StartRegister, void *pConstantData, unsigned BoolCount); + int (*SetStreamSource)(void *This, unsigned StreamNumber, void *pStreamData, unsigned OffsetInBytes, unsigned Stride); + int (*GetStreamSource)(void *This, unsigned StreamNumber, void **ppStreamData, void *pOffsetInBytes, void *pStride); + int (*SetStreamSourceFreq)(void *This, unsigned StreamNumber, unsigned Setting); + int (*GetStreamSourceFreq)(void *This, unsigned StreamNumber, void *pSetting); + int (*SetIndices)(void *This, void *pIndexData); + int (*GetIndices)(void *This, void **ppIndexData); + int (*CreatePixelShader)(void *This, const void *pFunction, void **ppShader); + int (*SetPixelShader)(void *This, void *pShader); + int (*GetPixelShader)(void *This, void **ppShader); + int (*SetPixelShaderConstantF)(void *This, unsigned StartRegister, const void *pConstantData, unsigned Vector4fCount); + int (*GetPixelShaderConstantF)(void *This, unsigned StartRegister, void *pConstantData, unsigned Vector4fCount); + int (*SetPixelShaderConstantI)(void *This, unsigned StartRegister, const void *pConstantData, unsigned Vector4iCount); + int (*GetPixelShaderConstantI)(void *This, unsigned StartRegister, void *pConstantData, unsigned Vector4iCount); + int (*SetPixelShaderConstantB)(void *This, unsigned StartRegister, const void *pConstantData, unsigned BoolCount); + int (*GetPixelShaderConstantB)(void *This, unsigned StartRegister, void *pConstantData, unsigned BoolCount); + int (*DrawRectPatch)(void *This, unsigned Handle, const void *pNumSegs, const void *pRectPatchInfo); + int (*DrawTriPatch)(void *This, unsigned Handle, const void *pNumSegs, const void *pTriPatchInfo); + int (*DeletePatch)(void *This, unsigned Handle); + int (*CreateQuery)(void *This, int Type, void **ppQuery); +} IDirect3DDevice9Vtbl; + +typedef struct IDirect3DDevice9ExVtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DDevice9 */ + int (*TestCooperativeLevel)(void *This); + unsigned (*GetAvailableTextureMem)(void *This); + int (*EvictManagedResources)(void *This); + int (*GetDirect3D)(void *This, void **ppD3D9); + int (*GetDeviceCaps)(void *This, void *pCaps); + int (*GetDisplayMode)(void *This, unsigned iSwapChain, void *pMode); + int (*GetCreationParameters)(void *This, void *pParameters); + int (*SetCursorProperties)(void *This, unsigned XHotSpot, unsigned YHotSpot, void *pCursorBitmap); + void (*SetCursorPosition)(void *This, int X, int Y, unsigned Flags); + int (*ShowCursor)(void *This, int bShow); + int (*CreateAdditionalSwapChain)(void *This, void *pPresentationParameters, void **pSwapChain); + int (*GetSwapChain)(void *This, unsigned iSwapChain, void **pSwapChain); + unsigned (*GetNumberOfSwapChains)(void *This); + int (*Reset)(void *This, void *pPresentationParameters); + int (*Present)(void *This, const void *pSourceRect, const void *pDestRect, void *hDestWindowOverride, const void *pDirtyRegion); + int (*GetBackBuffer)(void *This, unsigned iSwapChain, unsigned iBackBuffer, int Type, void **ppBackBuffer); + int (*GetRasterStatus)(void *This, unsigned iSwapChain, void *pRasterStatus); + int (*SetDialogBoxMode)(void *This, int bEnableDialogs); + void (*SetGammaRamp)(void *This, unsigned iSwapChain, unsigned Flags, const void *pRamp); + void (*GetGammaRamp)(void *This, unsigned iSwapChain, void *pRamp); + int (*CreateTexture)(void *This, unsigned Width, unsigned Height, unsigned Levels, unsigned Usage, int Format, int Pool, void **ppTexture, void *pSharedHandle); + int (*CreateVolumeTexture)(void *This, unsigned Width, unsigned Height, unsigned Depth, unsigned Levels, unsigned Usage, int Format, int Pool, void **ppVolumeTexture, void *pSharedHandle); + int (*CreateCubeTexture)(void *This, unsigned EdgeLength, unsigned Levels, unsigned Usage, int Format, int Pool, void **ppCubeTexture, void *pSharedHandle); + int (*CreateVertexBuffer)(void *This, unsigned Length, unsigned Usage, unsigned FVF, int Pool, void **ppVertexBuffer, void *pSharedHandle); + int (*CreateIndexBuffer)(void *This, unsigned Length, unsigned Usage, int Format, int Pool, void **ppIndexBuffer, void *pSharedHandle); + int (*CreateRenderTarget)(void *This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Lockable, void **ppSurface, void *pSharedHandle); + int (*CreateDepthStencilSurface)(void *This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Discard, void **ppSurface, void *pSharedHandle); + int (*UpdateSurface)(void *This, void *pSourceSurface, const void *pSourceRect, void *pDestinationSurface, const void *pDestPoint); + int (*UpdateTexture)(void *This, void *pSourceTexture, void *pDestinationTexture); + int (*GetRenderTargetData)(void *This, void *pRenderTarget, void *pDestSurface); + int (*GetFrontBufferData)(void *This, unsigned iSwapChain, void *pDestSurface); + int (*StretchRect)(void *This, void *pSourceSurface, const void *pSourceRect, void *pDestSurface, const void *pDestRect, int Filter); + int (*ColorFill)(void *This, void *pSurface, const void *pRect, unsigned color); + int (*CreateOffscreenPlainSurface)(void *This, unsigned Width, unsigned Height, int Format, int Pool, void **ppSurface, void *pSharedHandle); + int (*SetRenderTarget)(void *This, unsigned RenderTargetIndex, void *pRenderTarget); + int (*GetRenderTarget)(void *This, unsigned RenderTargetIndex, void **ppRenderTarget); + int (*SetDepthStencilSurface)(void *This, void *pNewZStencil); + int (*GetDepthStencilSurface)(void *This, void **ppZStencilSurface); + int (*BeginScene)(void *This); + int (*EndScene)(void *This); + int (*Clear)(void *This, unsigned Count, const void *pRects, unsigned Flags, unsigned Color, float Z, unsigned Stencil); + int (*SetTransform)(void *This, int State, const void *pMatrix); + int (*GetTransform)(void *This, int State, void *pMatrix); + int (*MultiplyTransform)(void *This, int State, const void *pMatrix); + int (*SetViewport)(void *This, const void *pViewport); + int (*GetViewport)(void *This, void *pViewport); + int (*SetMaterial)(void *This, const void *pMaterial); + int (*GetMaterial)(void *This, void *pMaterial); + int (*SetLight)(void *This, unsigned Index, const void *pLight); + int (*GetLight)(void *This, unsigned Index, void *pLight); + int (*LightEnable)(void *This, unsigned Index, int Enable); + int (*GetLightEnable)(void *This, unsigned Index, void *pEnable); + int (*SetClipPlane)(void *This, unsigned Index, const void *pPlane); + int (*GetClipPlane)(void *This, unsigned Index, void *pPlane); + int (*SetRenderState)(void *This, int State, unsigned Value); + int (*GetRenderState)(void *This, int State, void *pValue); + int (*CreateStateBlock)(void *This, int Type, void **ppSB); + int (*BeginStateBlock)(void *This); + int (*EndStateBlock)(void *This, void **ppSB); + int (*SetClipStatus)(void *This, const void *pClipStatus); + int (*GetClipStatus)(void *This, void *pClipStatus); + int (*GetTexture)(void *This, unsigned Stage, void **ppTexture); + int (*SetTexture)(void *This, unsigned Stage, void *pTexture); + int (*GetTextureStageState)(void *This, unsigned Stage, int Type, void *pValue); + int (*SetTextureStageState)(void *This, unsigned Stage, int Type, unsigned Value); + int (*GetSamplerState)(void *This, unsigned Sampler, int Type, void *pValue); + int (*SetSamplerState)(void *This, unsigned Sampler, int Type, unsigned Value); + int (*ValidateDevice)(void *This, void *pNumPasses); + int (*SetPaletteEntries)(void *This, unsigned PaletteNumber, const void *pEntries); + int (*GetPaletteEntries)(void *This, unsigned PaletteNumber, void *pEntries); + int (*SetCurrentTexturePalette)(void *This, unsigned PaletteNumber); + int (*GetCurrentTexturePalette)(void *This, void *PaletteNumber); + int (*SetScissorRect)(void *This, const void *pRect); + int (*GetScissorRect)(void *This, void *pRect); + int (*SetSoftwareVertexProcessing)(void *This, int bSoftware); + int (*GetSoftwareVertexProcessing)(void *This); + int (*SetNPatchMode)(void *This, float nSegments); + float (*GetNPatchMode)(void *This); + int (*DrawPrimitive)(void *This, int PrimitiveType, unsigned StartVertex, unsigned PrimitiveCount); + int (*DrawIndexedPrimitive)(void *This, int PrimitiveType, int BaseVertexIndex, unsigned MinVertexIndex, unsigned NumVertices, unsigned startIndex, unsigned primCount); + int (*DrawPrimitiveUP)(void *This, int PrimitiveType, unsigned PrimitiveCount, const void *pVertexStreamZeroData, unsigned VertexStreamZeroStride); + int (*DrawIndexedPrimitiveUP)(void *This, int PrimitiveType, unsigned MinVertexIndex, unsigned NumVertices, unsigned PrimitiveCount, const void *pIndexData, int IndexDataFormat, const void *pVertexStreamZeroData, unsigned VertexStreamZeroStride); + int (*ProcessVertices)(void *This, unsigned SrcStartIndex, unsigned DestIndex, unsigned VertexCount, void *pDestBuffer, void *pVertexDecl, unsigned Flags); + int (*CreateVertexDeclaration)(void *This, const void *pVertexElements, void **ppDecl); + int (*SetVertexDeclaration)(void *This, void *pDecl); + int (*GetVertexDeclaration)(void *This, void **ppDecl); + int (*SetFVF)(void *This, unsigned FVF); + int (*GetFVF)(void *This, void *pFVF); + int (*CreateVertexShader)(void *This, const void *pFunction, void **ppShader); + int (*SetVertexShader)(void *This, void *pShader); + int (*GetVertexShader)(void *This, void **ppShader); + int (*SetVertexShaderConstantF)(void *This, unsigned StartRegister, const void *pConstantData, unsigned Vector4fCount); + int (*GetVertexShaderConstantF)(void *This, unsigned StartRegister, void *pConstantData, unsigned Vector4fCount); + int (*SetVertexShaderConstantI)(void *This, unsigned StartRegister, const void *pConstantData, unsigned Vector4iCount); + int (*GetVertexShaderConstantI)(void *This, unsigned StartRegister, void *pConstantData, unsigned Vector4iCount); + int (*SetVertexShaderConstantB)(void *This, unsigned StartRegister, const void *pConstantData, unsigned BoolCount); + int (*GetVertexShaderConstantB)(void *This, unsigned StartRegister, void *pConstantData, unsigned BoolCount); + int (*SetStreamSource)(void *This, unsigned StreamNumber, void *pStreamData, unsigned OffsetInBytes, unsigned Stride); + int (*GetStreamSource)(void *This, unsigned StreamNumber, void **ppStreamData, void *pOffsetInBytes, void *pStride); + int (*SetStreamSourceFreq)(void *This, unsigned StreamNumber, unsigned Setting); + int (*GetStreamSourceFreq)(void *This, unsigned StreamNumber, void *pSetting); + int (*SetIndices)(void *This, void *pIndexData); + int (*GetIndices)(void *This, void **ppIndexData); + int (*CreatePixelShader)(void *This, const void *pFunction, void **ppShader); + int (*SetPixelShader)(void *This, void *pShader); + int (*GetPixelShader)(void *This, void **ppShader); + int (*SetPixelShaderConstantF)(void *This, unsigned StartRegister, const void *pConstantData, unsigned Vector4fCount); + int (*GetPixelShaderConstantF)(void *This, unsigned StartRegister, void *pConstantData, unsigned Vector4fCount); + int (*SetPixelShaderConstantI)(void *This, unsigned StartRegister, const void *pConstantData, unsigned Vector4iCount); + int (*GetPixelShaderConstantI)(void *This, unsigned StartRegister, void *pConstantData, unsigned Vector4iCount); + int (*SetPixelShaderConstantB)(void *This, unsigned StartRegister, const void *pConstantData, unsigned BoolCount); + int (*GetPixelShaderConstantB)(void *This, unsigned StartRegister, void *pConstantData, unsigned BoolCount); + int (*DrawRectPatch)(void *This, unsigned Handle, const void *pNumSegs, const void *pRectPatchInfo); + int (*DrawTriPatch)(void *This, unsigned Handle, const void *pNumSegs, const void *pTriPatchInfo); + int (*DeletePatch)(void *This, unsigned Handle); + int (*CreateQuery)(void *This, int Type, void **ppQuery); + /* IDirect3DDevice9Ex */ + int (*SetConvolutionMonoKernel)(void *This, unsigned width, unsigned height, void *rows, void *columns); + int (*ComposeRects)(void *This, void *pSrc, void *pDst, void *pSrcRectDescs, unsigned NumRects, void *pDstRectDescs, int Operation, int Xoffset, int Yoffset); + int (*PresentEx)(void *This, const void *pSourceRect, const void *pDestRect, void *hDestWindowOverride, const void *pDirtyRegion, unsigned dwFlags); + int (*GetGPUThreadPriority)(void *This, void *pPriority); + int (*SetGPUThreadPriority)(void *This, int Priority); + int (*WaitForVBlank)(void *This, unsigned iSwapChain); + int (*CheckResourceResidency)(void *This, void **pResourceArray, unsigned NumResources); + int (*SetMaximumFrameLatency)(void *This, unsigned MaxLatency); + int (*GetMaximumFrameLatency)(void *This, void *pMaxLatency); + int (*CheckDeviceState)(void *This, void *hDestinationWindow); + int (*CreateRenderTargetEx)(void *This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Lockable, void **ppSurface, void *pSharedHandle, unsigned Usage); + int (*CreateOffscreenPlainSurfaceEx)(void *This, unsigned Width, unsigned Height, int Format, int Pool, void **ppSurface, void *pSharedHandle, unsigned Usage); + int (*CreateDepthStencilSurfaceEx)(void *This, unsigned Width, unsigned Height, int Format, int MultiSample, unsigned MultisampleQuality, int Discard, void **ppSurface, void *pSharedHandle, unsigned Usage); + int (*ResetEx)(void *This, void *pPresentationParameters, void *pFullscreenDisplayMode); + int (*GetDisplayModeEx)(void *This, unsigned iSwapChain, void *pMode, void *pRotation); +} IDirect3DDevice9ExVtbl; + +typedef struct IDirect3DDevice9VideoVtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DDevice9Video */ + int (*GetContentProtectionCaps)(void *This, const void *pCryptoType, const void *pDecodeProfile, void *pCaps); + int (*CreateAuthenticatedChannel)(void *This, int ChannelType, void **ppAuthenticatedChannel, void *pChannelHandle); + int (*CreateCryptoSession)(void *This, const void *pCryptoType, const void *pDecodeProfile, void **ppCryptoSession, void *pCryptoHandle); +} IDirect3DDevice9VideoVtbl; + +typedef struct IDirect3DIndexBuffer9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DResource9 */ + int (*GetDevice)(void *This, void **ppDevice); + int (*SetPrivateData)(void *This, void *refguid, const void *pData, unsigned SizeOfData, unsigned Flags); + int (*GetPrivateData)(void *This, void *refguid, void *pData, void *pSizeOfData); + int (*FreePrivateData)(void *This, void *refguid); + unsigned (*SetPriority)(void *This, unsigned PriorityNew); + unsigned (*GetPriority)(void *This); + void (*PreLoad)(void *This); + int (*GetType)(void *This); + /* IDirect3DIndexBuffer9 */ + int (*Lock)(void *This, unsigned OffsetToLock, unsigned SizeToLock, void **ppbData, unsigned Flags); + int (*Unlock)(void *This); + int (*GetDesc)(void *This, void *pDesc); +} IDirect3DIndexBuffer9Vtbl; + +typedef struct IDirect3DPixelShader9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DPixelShader9 */ + int (*GetDevice)(void *This, void **ppDevice); + int (*GetFunction)(void *This, void *pData, void *pSizeOfData); +} IDirect3DPixelShader9Vtbl; + +typedef struct IDirect3DQuery9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DQuery9 */ + int (*GetDevice)(void *This, void **ppDevice); + int (*GetType)(void *This); + unsigned (*GetDataSize)(void *This); + int (*Issue)(void *This, unsigned dwIssueFlags); + int (*GetData)(void *This, void *pData, unsigned dwSize, unsigned dwGetDataFlags); +} IDirect3DQuery9Vtbl; + +typedef struct IDirect3DResource9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DResource9 */ + int (*GetDevice)(void *This, void **ppDevice); + int (*SetPrivateData)(void *This, void *refguid, const void *pData, unsigned SizeOfData, unsigned Flags); + int (*GetPrivateData)(void *This, void *refguid, void *pData, void *pSizeOfData); + int (*FreePrivateData)(void *This, void *refguid); + unsigned (*SetPriority)(void *This, unsigned PriorityNew); + unsigned (*GetPriority)(void *This); + void (*PreLoad)(void *This); + int (*GetType)(void *This); +} IDirect3DResource9Vtbl; + +typedef struct IDirect3DStateBlock9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DStateBlock9 */ + int (*GetDevice)(void *This, void **ppDevice); + int (*Capture)(void *This); + int (*Apply)(void *This); +} IDirect3DStateBlock9Vtbl; + +typedef struct IDirect3DSurface9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DResource9 */ + int (*GetDevice)(void *This, void **ppDevice); + int (*SetPrivateData)(void *This, void *refguid, const void *pData, unsigned SizeOfData, unsigned Flags); + int (*GetPrivateData)(void *This, void *refguid, void *pData, void *pSizeOfData); + int (*FreePrivateData)(void *This, void *refguid); + unsigned (*SetPriority)(void *This, unsigned PriorityNew); + unsigned (*GetPriority)(void *This); + void (*PreLoad)(void *This); + int (*GetType)(void *This); + /* IDirect3DSurface9 */ + int (*GetContainer)(void *This, void *riid, void **ppContainer); + int (*GetDesc)(void *This, void *pDesc); + int (*LockRect)(void *This, void *pLockedRect, const void *pRect, unsigned Flags); + int (*UnlockRect)(void *This); + int (*GetDC)(void *This, void *phdc); + int (*ReleaseDC)(void *This, void *hdc); +} IDirect3DSurface9Vtbl; + +typedef struct IDirect3DSwapChain9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DSwapChain9 */ + int (*Present)(void *This, const void *pSourceRect, const void *pDestRect, void *hDestWindowOverride, const void *pDirtyRegion, unsigned dwFlags); + int (*GetFrontBufferData)(void *This, void *pDestSurface); + int (*GetBackBuffer)(void *This, unsigned iBackBuffer, int Type, void **ppBackBuffer); + int (*GetRasterStatus)(void *This, void *pRasterStatus); + int (*GetDisplayMode)(void *This, void *pMode); + int (*GetDevice)(void *This, void **ppDevice); + int (*GetPresentParameters)(void *This, void *pPresentationParameters); +} IDirect3DSwapChain9Vtbl; + +typedef struct IDirect3DSwapChain9ExVtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DSwapChain9 */ + int (*Present)(void *This, const void *pSourceRect, const void *pDestRect, void *hDestWindowOverride, const void *pDirtyRegion, unsigned dwFlags); + int (*GetFrontBufferData)(void *This, void *pDestSurface); + int (*GetBackBuffer)(void *This, unsigned iBackBuffer, int Type, void **ppBackBuffer); + int (*GetRasterStatus)(void *This, void *pRasterStatus); + int (*GetDisplayMode)(void *This, void *pMode); + int (*GetDevice)(void *This, void **ppDevice); + int (*GetPresentParameters)(void *This, void *pPresentationParameters); + /* IDirect3DSwapChain9Ex */ + int (*GetLastPresentCount)(void *This, void *pLastPresentCount); + int (*GetPresentStats)(void *This, void *pPresentationStatistics); + int (*GetDisplayModeEx)(void *This, void *pMode, void *pRotation); +} IDirect3DSwapChain9ExVtbl; + +typedef struct IDirect3DTexture9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DResource9 */ + int (*GetDevice)(void *This, void **ppDevice); + int (*SetPrivateData)(void *This, void *refguid, const void *pData, unsigned SizeOfData, unsigned Flags); + int (*GetPrivateData)(void *This, void *refguid, void *pData, void *pSizeOfData); + int (*FreePrivateData)(void *This, void *refguid); + unsigned (*SetPriority)(void *This, unsigned PriorityNew); + unsigned (*GetPriority)(void *This); + void (*PreLoad)(void *This); + int (*GetType)(void *This); + /* IDirect3DBaseTexture9 */ + unsigned (*SetLOD)(void *This, unsigned LODNew); + unsigned (*GetLOD)(void *This); + unsigned (*GetLevelCount)(void *This); + int (*SetAutoGenFilterType)(void *This, int FilterType); + int (*GetAutoGenFilterType)(void *This); + void (*GenerateMipSubLevels)(void *This); + /* IDirect3DTexture9 */ + int (*GetLevelDesc)(void *This, unsigned Level, void *pDesc); + int (*GetSurfaceLevel)(void *This, unsigned Level, void **ppSurfaceLevel); + int (*LockRect)(void *This, unsigned Level, void *pLockedRect, const void *pRect, unsigned Flags); + int (*UnlockRect)(void *This, unsigned Level); + int (*AddDirtyRect)(void *This, const void *pDirtyRect); +} IDirect3DTexture9Vtbl; + +typedef struct IDirect3DVertexBuffer9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DResource9 */ + int (*GetDevice)(void *This, void **ppDevice); + int (*SetPrivateData)(void *This, void *refguid, const void *pData, unsigned SizeOfData, unsigned Flags); + int (*GetPrivateData)(void *This, void *refguid, void *pData, void *pSizeOfData); + int (*FreePrivateData)(void *This, void *refguid); + unsigned (*SetPriority)(void *This, unsigned PriorityNew); + unsigned (*GetPriority)(void *This); + void (*PreLoad)(void *This); + int (*GetType)(void *This); + /* IDirect3DVertexBuffer9 */ + int (*Lock)(void *This, unsigned OffsetToLock, unsigned SizeToLock, void **ppbData, unsigned Flags); + int (*Unlock)(void *This); + int (*GetDesc)(void *This, void *pDesc); +} IDirect3DVertexBuffer9Vtbl; + +typedef struct IDirect3DVertexDeclaration9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DVertexDeclaration9 */ + int (*GetDevice)(void *This, void **ppDevice); + int (*GetDeclaration)(void *This, void *pElement, void *pNumElements); +} IDirect3DVertexDeclaration9Vtbl; + +typedef struct IDirect3DVertexShader9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DVertexShader9 */ + int (*GetDevice)(void *This, void **ppDevice); + int (*GetFunction)(void *This, void *pData, void *pSizeOfData); +} IDirect3DVertexShader9Vtbl; + +typedef struct IDirect3DVolume9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DVolume9 */ + int (*GetDevice)(void *This, void **ppDevice); + int (*SetPrivateData)(void *This, void *refguid, const void *pData, unsigned SizeOfData, unsigned Flags); + int (*GetPrivateData)(void *This, void *refguid, void *pData, void *pSizeOfData); + int (*FreePrivateData)(void *This, void *refguid); + int (*GetContainer)(void *This, void *riid, void **ppContainer); + int (*GetDesc)(void *This, void *pDesc); + int (*LockBox)(void *This, void *pLockedVolume, const void *pBox, unsigned Flags); + int (*UnlockBox)(void *This); +} IDirect3DVolume9Vtbl; + +typedef struct IDirect3DVolumeTexture9Vtbl +{ + int (*QueryInterface)(void *This, void *riid, void **ppvObject); + unsigned (*AddRef)(void *This); + unsigned (*Release)(void *This); + /* IDirect3DResource9 */ + int (*GetDevice)(void *This, void **ppDevice); + int (*SetPrivateData)(void *This, void *refguid, const void *pData, unsigned SizeOfData, unsigned Flags); + int (*GetPrivateData)(void *This, void *refguid, void *pData, void *pSizeOfData); + int (*FreePrivateData)(void *This, void *refguid); + unsigned (*SetPriority)(void *This, unsigned PriorityNew); + unsigned (*GetPriority)(void *This); + void (*PreLoad)(void *This); + int (*GetType)(void *This); + /* IDirect3DBaseTexture9 */ + unsigned (*SetLOD)(void *This, unsigned LODNew); + unsigned (*GetLOD)(void *This); + unsigned (*GetLevelCount)(void *This); + int (*SetAutoGenFilterType)(void *This, int FilterType); + int (*GetAutoGenFilterType)(void *This); + void (*GenerateMipSubLevels)(void *This); + /* IDirect3DVolumeTexture9 */ + int (*GetLevelDesc)(void *This, unsigned Level, void *pDesc); + int (*GetVolumeLevel)(void *This, unsigned Level, void **ppVolumeLevel); + int (*LockBox)(void *This, unsigned Level, void *pLockedVolume, const void *pBox, unsigned Flags); + int (*UnlockBox)(void *This, unsigned Level); + int (*AddDirtyBox)(void *This, const void *pDirtyBox); +} IDirect3DVolumeTexture9Vtbl; + diff --git a/src/wrapped/wrappedlibdl.c b/src/wrapped/wrappedlibdl.c index f1518acd..9dee46bd 100755 --- a/src/wrapped/wrappedlibdl.c +++ b/src/wrapped/wrappedlibdl.c @@ -77,6 +77,11 @@ void* my_dlopen(x64emu_t* emu, void *filename, int flag) if(sys) return sys; } + if(!strcmp(rfilename, "/usr/lib/x86_64-linux-gnu/d3d")) { + void* sys = my_dlopen(emu, "d3dadapter9.so.1", flag); + if(sys) + return sys; + } printf_dlsym(LOG_DEBUG, "Call to dlopen(\"%s\"/%p, %X)\n", rfilename, filename, flag); // Transform any ${...} that maight be present while(strstr(rfilename, "${ORIGIN}")) { diff --git a/src/wrapped/wrappedlibxcb_private.h b/src/wrapped/wrappedlibxcb_private.h index 1e9c7698..470624e3 100755 --- a/src/wrapped/wrappedlibxcb_private.h +++ b/src/wrapped/wrappedlibxcb_private.h @@ -125,7 +125,7 @@ GO(xcb_connection_has_error, iFp) GO(xcb_convert_selection, pFpuuuuu) //GO(xcb_convert_selection_checked, GO(xcb_copy_area, pFpuuuwwwwWW) -//GO(xcb_copy_area_checked, +GO(xcb_copy_area_checked, pFpuuuwwwwWW) //GO(xcb_copy_colormap_and_free, //GO(xcb_copy_colormap_and_free_checked, //GO(xcb_copy_gc, @@ -656,7 +656,7 @@ GO(xcb_visualtype_next, vFp) GO(xcb_wait_for_event, pFp) GO(xcb_wait_for_reply, pFpup) GO(xcb_wait_for_reply64, pFpUp) -//GO(xcb_wait_for_special_event, +GO(xcb_wait_for_special_event, pFpp) GO(xcb_warp_pointer, pFpuuwwWWww) //GO(xcb_warp_pointer_checked, //GO(xcb_window_end, diff --git a/src/wrapped/wrappedlibxcbpresent.c b/src/wrapped/wrappedlibxcbpresent.c new file mode 100644 index 00000000..f8293d5b --- /dev/null +++ b/src/wrapped/wrappedlibxcbpresent.c @@ -0,0 +1,23 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#define _GNU_SOURCE /* See feature_test_macros(7) */ +#include <dlfcn.h> + +#include "wrappedlibs.h" + +#include "debug.h" +#include "wrapper.h" +#include "bridge.h" +#include "librarian/library_private.h" +#include "x64emu.h" +#include "emu/x64emu_private.h" +#include "callback.h" +#include "librarian.h" +#include "box64context.h" +#include "emu/x64emu_private.h" + +const char* libxcbpresentName = "libxcb-present.so.0"; +#define LIBNAME libxcbpresent + +#include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedlibxcbpresent_private.h b/src/wrapped/wrappedlibxcbpresent_private.h new file mode 100644 index 00000000..ea98c6ec --- /dev/null +++ b/src/wrapped/wrappedlibxcbpresent_private.h @@ -0,0 +1,29 @@ +#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA)) +#error meh! +#endif + +//GO(xcb_present_event_end, +//GO(xcb_present_event_next, +DATA(xcb_present_id, 8) +//GO(xcb_present_notify_end, +GO(xcb_present_notify_msc, pFpuuUUU) +//GO(xcb_present_notify_msc_checked, +//GO(xcb_present_notify_next, +GO(xcb_present_pixmap, pFpuuuuuwwuuuuUUUup) +GO(xcb_present_pixmap_checked, pFpuuuuuwwuuuuUUUup) +//GO(xcb_present_pixmap_notifies, +//GO(xcb_present_pixmap_notifies_iterator, +//GO(xcb_present_pixmap_notifies_length, +//GO(xcb_present_pixmap_sizeof, +//GO(xcb_present_query_capabilities, +//GO(xcb_present_query_capabilities_reply, +//GO(xcb_present_query_capabilities_unchecked, +GO(xcb_present_query_version, pFpuu) +GO(xcb_present_query_version_reply, pFpup) +//GO(xcb_present_query_version_unchecked, +//GO(xcb_present_redirect_notify_notifies, +//GO(xcb_present_redirect_notify_notifies_iterator, +//GO(xcb_present_redirect_notify_notifies_length, +//GO(xcb_present_redirect_notify_sizeof, +//GO(xcb_present_select_input, +GO(xcb_present_select_input_checked, pFpuuu) |