diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-09-30 21:06:56 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-09-30 21:06:56 +0200 |
| commit | a188f4ebfe0fbf9f46601c683a686c23a1513ee7 (patch) | |
| tree | edc4af063c2c382a08c2c5ab42bd272ca7af5335 /src/wrapped32/generated | |
| parent | e59063a13c10e9c14f892a4b5cc01278565f86b7 (diff) | |
| download | box64-a188f4ebfe0fbf9f46601c683a686c23a1513ee7.tar.gz box64-a188f4ebfe0fbf9f46601c683a686c23a1513ee7.zip | |
[BOX32][WRAPPER] Added a bunch of wrapped 32bits functions, and fixed a few existing ones (Now Witcher 2 Linux boot and can enter tutorial, before crashing)
Diffstat (limited to 'src/wrapped32/generated')
| -rw-r--r-- | src/wrapped32/generated/functions_list.txt | 7 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrappedsdl2imagetypes32.h | 1 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrappedsdl2types32.h | 4 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.c | 8 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.h | 2 |
5 files changed, 20 insertions, 2 deletions
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt index 09d29d0a..26eda5fb 100644 --- a/src/wrapped32/generated/functions_list.txt +++ b/src/wrapped32/generated/functions_list.txt @@ -164,6 +164,7 @@ #() CFpi -> CFpi #() CFpp -> CFpp #() uFEp -> uFEp +#() uFii -> uFii #() uFiS -> uFiS #() uFuu -> uFuu #() uFup -> uFup @@ -430,6 +431,7 @@ #() SFEpp -> SFEpp #() SFppS -> SFppS #() tFipu -> tFipu +#() iFppBp_ -> iFppB #() iFppbL_ -> iFppB #() iFpbL_p -> iFpBp #() iFBp_LL -> iFBLL @@ -1724,9 +1726,11 @@ wrappedsdl2: - SDL_GetCurrentDisplayMode - SDL_GetDesktopDisplayMode - iFpi: + - SDL_GameControllerAddMappingsFromRW - SDL_WaitEventTimeout - iFpp: - SDL_GetWindowDisplayMode + - SDL_GetWindowWMInfo - SDL_OpenAudio - SDL_SetWindowDisplayMode - pFpi: @@ -1734,6 +1738,8 @@ wrappedsdl2: - SDL_notreal - pFpp: - SDL_RWFromFile +- iFiip: + - SDL_GetDisplayMode - iFppu: - SDL_FillRect - iFppV: @@ -1760,6 +1766,7 @@ wrappedsdl2: % JFEi -> pFEpi wrappedsdl2image: - pFp: + - IMG_Load - IMG_LoadBMP_RW - IMG_LoadCUR_RW - IMG_LoadGIF_RW diff --git a/src/wrapped32/generated/wrappedsdl2imagetypes32.h b/src/wrapped32/generated/wrappedsdl2imagetypes32.h index 630a8aee..74fe53d9 100644 --- a/src/wrapped32/generated/wrappedsdl2imagetypes32.h +++ b/src/wrapped32/generated/wrappedsdl2imagetypes32.h @@ -18,6 +18,7 @@ typedef void* (*pFppi_t)(void*, void*, int32_t); typedef void* (*pFppip_t)(void*, void*, int32_t, void*); #define SUPER() ADDED_FUNCTIONS() \ + GO(IMG_Load, pFp_t) \ GO(IMG_LoadBMP_RW, pFp_t) \ GO(IMG_LoadCUR_RW, pFp_t) \ GO(IMG_LoadGIF_RW, pFp_t) \ diff --git a/src/wrapped32/generated/wrappedsdl2types32.h b/src/wrapped32/generated/wrappedsdl2types32.h index 76272d87..6e5e276e 100644 --- a/src/wrapped32/generated/wrappedsdl2types32.h +++ b/src/wrapped32/generated/wrappedsdl2types32.h @@ -24,6 +24,7 @@ typedef int32_t (*iFpi_t)(void*, int32_t); typedef int32_t (*iFpp_t)(void*, void*); typedef void* (*pFpi_t)(void*, int32_t); typedef void* (*pFpp_t)(void*, void*); +typedef int32_t (*iFiip_t)(int32_t, int32_t, void*); typedef int32_t (*iFppu_t)(void*, void*, uint32_t); typedef int32_t (*iFppV_t)(void*, void*, ...); typedef int64_t (*IFpIi_t)(void*, int64_t, int32_t); @@ -52,13 +53,16 @@ typedef void* (*pFuiiiuuuu_t)(uint32_t, int32_t, int32_t, int32_t, uint32_t, uin GO(SDL_Log, vFpV_t) \ GO(SDL_GetCurrentDisplayMode, iFip_t) \ GO(SDL_GetDesktopDisplayMode, iFip_t) \ + GO(SDL_GameControllerAddMappingsFromRW, iFpi_t) \ GO(SDL_WaitEventTimeout, iFpi_t) \ GO(SDL_GetWindowDisplayMode, iFpp_t) \ + GO(SDL_GetWindowWMInfo, iFpp_t) \ GO(SDL_OpenAudio, iFpp_t) \ GO(SDL_SetWindowDisplayMode, iFpp_t) \ GO(SDL_LoadBMP_RW, pFpi_t) \ GO(SDL_notreal, pFpi_t) \ GO(SDL_RWFromFile, pFpp_t) \ + GO(SDL_GetDisplayMode, iFiip_t) \ GO(SDL_FillRect, iFppu_t) \ GO(SDL_sscanf, iFppV_t) \ GO(SDL_RWseek, IFpIi_t) \ diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c index 33ed6591..ea72c2d4 100644 --- a/src/wrapped32/generated/wrapper32.c +++ b/src/wrapped32/generated/wrapper32.c @@ -86,7 +86,7 @@ void VulkanTox86(void* src, void* save); int of_convert32(int); void* getDisplay(void*); -void* FindDisplay(void*); +void* addDisplay(void*); typedef void (*vFv_t)(void); typedef void (*vFc_t)(int8_t); @@ -254,6 +254,7 @@ typedef uint8_t (*CFuU_t)(uint32_t, uint64_t); typedef uint8_t (*CFpi_t)(void*, int32_t); typedef uint8_t (*CFpp_t)(void*, void*); typedef uint32_t (*uFEp_t)(x64emu_t*, void*); +typedef uint32_t (*uFii_t)(int32_t, int32_t); typedef uint32_t (*uFiS_t)(int32_t, void*); typedef uint32_t (*uFuu_t)(uint32_t, uint32_t); typedef uint32_t (*uFup_t)(uint32_t, void*); @@ -520,6 +521,7 @@ typedef void* (*aFipa_t)(int32_t, void*, void*); typedef void* (*SFEpp_t)(x64emu_t*, void*, void*); typedef void* (*SFppS_t)(void*, void*, void*); typedef char* (*tFipu_t)(int32_t, void*, uint32_t); +typedef int32_t (*iFppBp__t)(void*, void*, struct_p_t*); typedef int32_t (*iFppbL__t)(void*, void*, struct_L_t*); typedef int32_t (*iFpbL_p_t)(void*, struct_L_t*, void*); typedef int32_t (*iFBp_LL_t)(struct_p_t*, uintptr_t, uintptr_t); @@ -1266,7 +1268,7 @@ void aFa_32(x64emu_t *emu, uintptr_t fcn) { aFa_t fn = (aFa_t)fcn; R_EAX = to_lo void tFi_32(x64emu_t *emu, uintptr_t fcn) { tFi_t fn = (tFi_t)fcn; R_EAX = to_cstring(fn(from_ptri(int32_t, R_ESP + 4))); } void tFu_32(x64emu_t *emu, uintptr_t fcn) { tFu_t fn = (tFu_t)fcn; R_EAX = to_cstring(fn(from_ptri(uint32_t, R_ESP + 4))); } void tFp_32(x64emu_t *emu, uintptr_t fcn) { tFp_t fn = (tFp_t)fcn; R_EAX = to_cstring(fn(from_ptriv(R_ESP + 4))); } -void XFv_32(x64emu_t *emu, uintptr_t fcn) { XFv_t fn = (XFv_t)fcn; R_EAX = to_ptrv(FindDisplay(fn())); } +void XFv_32(x64emu_t *emu, uintptr_t fcn) { XFv_t fn = (XFv_t)fcn; R_EAX = to_ptrv(addDisplay(fn())); } void iFBp__32(x64emu_t *emu, uintptr_t fcn) { iFBp__t fn = (iFBp__t)fcn; struct_p_t arg_4={0}; R_EAX = fn(*(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 4)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 4))), &arg_4); } void LFrl__32(x64emu_t *emu, uintptr_t fcn) { LFrl__t fn = (LFrl__t)fcn; struct_l_t arg_4={0}; if (*(ptr_t*)(from_ptr((R_ESP + 4)))) from_struct_l(&arg_4, *(ptr_t*)(from_ptr((R_ESP + 4)))); R_EAX = to_ulong(fn(*(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL)); } void pFrl__32(x64emu_t *emu, uintptr_t fcn) { pFrl__t fn = (pFrl__t)fcn; struct_l_t arg_4={0}; if (*(ptr_t*)(from_ptr((R_ESP + 4)))) from_struct_l(&arg_4, *(ptr_t*)(from_ptr((R_ESP + 4)))); R_EAX = to_ptrv(fn(*(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL)); } @@ -1356,6 +1358,7 @@ void CFuU_32(x64emu_t *emu, uintptr_t fcn) { CFuU_t fn = (CFuU_t)fcn; R_EAX = (u void CFpi_32(x64emu_t *emu, uintptr_t fcn) { CFpi_t fn = (CFpi_t)fcn; R_EAX = (unsigned char)fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8)); } void CFpp_32(x64emu_t *emu, uintptr_t fcn) { CFpp_t fn = (CFpp_t)fcn; R_EAX = (unsigned char)fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8)); } void uFEp_32(x64emu_t *emu, uintptr_t fcn) { uFEp_t fn = (uFEp_t)fcn; R_EAX = (uint32_t)fn(emu, from_ptriv(R_ESP + 4)); } +void uFii_32(x64emu_t *emu, uintptr_t fcn) { uFii_t fn = (uFii_t)fcn; R_EAX = (uint32_t)fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8)); } void uFiS_32(x64emu_t *emu, uintptr_t fcn) { uFiS_t fn = (uFiS_t)fcn; R_EAX = (uint32_t)fn(from_ptri(int32_t, R_ESP + 4), io_convert32(from_ptriv(R_ESP + 8))); } void uFuu_32(x64emu_t *emu, uintptr_t fcn) { uFuu_t fn = (uFuu_t)fcn; R_EAX = (uint32_t)fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8)); } void uFup_32(x64emu_t *emu, uintptr_t fcn) { uFup_t fn = (uFup_t)fcn; R_EAX = (uint32_t)fn(from_ptri(uint32_t, R_ESP + 4), from_ptriv(R_ESP + 8)); } @@ -1622,6 +1625,7 @@ void aFipa_32(x64emu_t *emu, uintptr_t fcn) { aFipa_t fn = (aFipa_t)fcn; R_EAX = void SFEpp_32(x64emu_t *emu, uintptr_t fcn) { SFEpp_t fn = (SFEpp_t)fcn; R_EAX = to_ptrv(io_convert_from(fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8)))); } void SFppS_32(x64emu_t *emu, uintptr_t fcn) { SFppS_t fn = (SFppS_t)fcn; R_EAX = to_ptrv(io_convert_from(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), io_convert32(from_ptriv(R_ESP + 12))))); } void tFipu_32(x64emu_t *emu, uintptr_t fcn) { tFipu_t fn = (tFipu_t)fcn; R_EAX = to_cstring(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12))); } +void iFppBp__32(x64emu_t *emu, uintptr_t fcn) { iFppBp__t fn = (iFppBp__t)fcn; struct_p_t arg_12={0}; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); } void iFppbL__32(x64emu_t *emu, uintptr_t fcn) { iFppbL__t fn = (iFppbL__t)fcn; struct_L_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_L(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_L(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); } void iFpbL_p_32(x64emu_t *emu, uintptr_t fcn) { iFpbL_p_t fn = (iFpbL_p_t)fcn; struct_L_t arg_8={0}; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) from_struct_L(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); R_EAX = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptriv(R_ESP + 12)); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_L(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void iFBp_LL_32(x64emu_t *emu, uintptr_t fcn) { iFBp_LL_t fn = (iFBp_LL_t)fcn; struct_p_t arg_4={0}; R_EAX = fn(*(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL, to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_ulong(from_ptri(ulong_t, R_ESP + 12))); if (*(ptr_t*)(from_ptr((R_ESP + 4)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 4))), &arg_4); } diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h index b516845a..d9c16ddb 100644 --- a/src/wrapped32/generated/wrapper32.h +++ b/src/wrapped32/generated/wrapper32.h @@ -205,6 +205,7 @@ void CFuU_32(x64emu_t *emu, uintptr_t fnc); void CFpi_32(x64emu_t *emu, uintptr_t fnc); void CFpp_32(x64emu_t *emu, uintptr_t fnc); void uFEp_32(x64emu_t *emu, uintptr_t fnc); +void uFii_32(x64emu_t *emu, uintptr_t fnc); void uFiS_32(x64emu_t *emu, uintptr_t fnc); void uFuu_32(x64emu_t *emu, uintptr_t fnc); void uFup_32(x64emu_t *emu, uintptr_t fnc); @@ -471,6 +472,7 @@ void aFipa_32(x64emu_t *emu, uintptr_t fnc); void SFEpp_32(x64emu_t *emu, uintptr_t fnc); void SFppS_32(x64emu_t *emu, uintptr_t fnc); void tFipu_32(x64emu_t *emu, uintptr_t fnc); +void iFppBp__32(x64emu_t *emu, uintptr_t fnc); void iFppbL__32(x64emu_t *emu, uintptr_t fnc); void iFpbL_p_32(x64emu_t *emu, uintptr_t fnc); void iFBp_LL_32(x64emu_t *emu, uintptr_t fnc); |