about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/sdl2align32.h192
-rw-r--r--src/libtools/sdl1rwops.c41
-rw-r--r--src/libtools/sdl2align32.c156
-rw-r--r--src/libtools/sdl2rwops.c70
-rw-r--r--src/wrapped/generated/functions_list.txt3
-rw-r--r--src/wrapped/generated/wrappedsdl2types.h4
-rw-r--r--src/wrapped/generated/wrapper.c2
-rw-r--r--src/wrapped/generated/wrapper.h1
-rw-r--r--src/wrapped/wrappedsdl2.c14
-rw-r--r--src/wrapped/wrappedsdl2_private.h2
-rw-r--r--src/wrapped32/generated/functions_list.txt39
-rw-r--r--src/wrapped32/generated/wrappedsdl2types32.h26
-rw-r--r--src/wrapped32/generated/wrapper32.c31
-rw-r--r--src/wrapped32/generated/wrapper32.h15
-rw-r--r--src/wrapped32/wrappedsdl2.c135
-rw-r--r--src/wrapped32/wrappedsdl2_private.h184
16 files changed, 746 insertions, 169 deletions
diff --git a/src/include/sdl2align32.h b/src/include/sdl2align32.h
index d1131fb2..4e0e97b5 100644
--- a/src/include/sdl2align32.h
+++ b/src/include/sdl2align32.h
@@ -358,12 +358,12 @@ typedef union my_SDL2_Event_s {
     my_SDL2_DropEvent_t drop;
 } my_SDL2_Event_t;
 
-typedef struct SDL2_CommonEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_CommonEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
 } my_SDL2_CommonEvent_32_t;
 
-typedef struct SDL2_DisplayEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_DisplayEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     uint32_t display;
@@ -374,7 +374,7 @@ typedef struct SDL2_DisplayEvent_32_s {
     int32_t data1;
 } my_SDL2_DisplayEvent_32_t;
 
-typedef struct SDL2_WindowEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_WindowEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     uint32_t windowID;
@@ -386,14 +386,14 @@ typedef struct SDL2_WindowEvent_32_s {
     int32_t data2;
 } my_SDL2_WindowEvent_32_t;
 
-typedef struct SDL2_Keysym_32_s {
+typedef struct __attribute__((packed)) SDL2_Keysym_32_s {
     int32_t scancode;
     int32_t sym;
     uint16_t mod;
     uint32_t unused;
 } my_SDL2_Keysym_32_t;
 
-typedef struct SDL2_KeyboardEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_KeyboardEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     uint32_t windowID;
@@ -404,7 +404,7 @@ typedef struct SDL2_KeyboardEvent_32_s {
     my_SDL2_Keysym_32_t keysym;
 } my_SDL2_KeyboardEvent_32_t;
 
-typedef struct SDL2_TextEditingEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_TextEditingEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     uint32_t windowID;
@@ -414,7 +414,7 @@ typedef struct SDL2_TextEditingEvent_32_s {
 } my_SDL2_TextEditingEvent_32_t;
 
 
-typedef struct SDL2_TextEditingExtEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_TextEditingExtEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     uint32_t windowID;
@@ -423,14 +423,14 @@ typedef struct SDL2_TextEditingExtEvent_32_s {
     int32_t length;
 } my_SDL2_TextEditingExtEvent_32_t;
 
-typedef struct SDL2_TextInputEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_TextInputEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     uint32_t windowID;
     char text[32];
 } my_SDL2_TextInputEvent_32_t;
 
-typedef struct SDL2_MouseMotionEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_MouseMotionEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     uint32_t windowID;
@@ -442,7 +442,7 @@ typedef struct SDL2_MouseMotionEvent_32_s {
     int32_t yrel;
 } my_SDL2_MouseMotionEvent_32_t;
 
-typedef struct SDL2_MouseButtonEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_MouseButtonEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     uint32_t windowID;
@@ -455,7 +455,7 @@ typedef struct SDL2_MouseButtonEvent_32_s {
     int32_t y;
 } my_SDL2_MouseButtonEvent_32_t;
 
-typedef struct SDL2_MouseWheelEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_MouseWheelEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     uint32_t windowID;
@@ -469,7 +469,7 @@ typedef struct SDL2_MouseWheelEvent_32_s {
     int32_t mouseY;
 } my_SDL2_MouseWheelEvent_32_t;
 
-typedef struct SDL2_JoyAxisEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_JoyAxisEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     int32_t which;
@@ -482,7 +482,7 @@ typedef struct SDL2_JoyAxisEvent_32_s {
 } my_SDL2_JoyAxisEvent_32_t;
 
 
-typedef struct SDL2_JoyBallEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_JoyBallEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     int32_t which;
@@ -494,7 +494,7 @@ typedef struct SDL2_JoyBallEvent_32_s {
     int16_t yrel;
 } my_SDL2_JoyBallEvent_32_t;
 
-typedef struct SDL2_JoyHatEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_JoyHatEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     int32_t which;
@@ -504,7 +504,7 @@ typedef struct SDL2_JoyHatEvent_32_s {
     uint8_t padding2;
 } my_SDL2_JoyHatEvent_32_t;
 
-typedef struct SDL2_JoyButtonEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_JoyButtonEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     int32_t which;
@@ -514,21 +514,21 @@ typedef struct SDL2_JoyButtonEvent_32_s {
     uint8_t padding2;
 } my_SDL2_JoyButtonEvent_32_t;
 
-typedef struct SDL2_JoyDeviceEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_JoyDeviceEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     int32_t which;
 } my_SDL2_JoyDeviceEvent_32_t;
 
 
-typedef struct SDL2_JoyBatteryEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_JoyBatteryEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     int32_t which;
     int32_t level;
 } my_SDL2_JoyBatteryEvent_32_t;
 
-typedef struct SDL2_ControllerAxisEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_ControllerAxisEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     int32_t which;
@@ -541,7 +541,7 @@ typedef struct SDL2_ControllerAxisEvent_32_s {
 } my_SDL2_ControllerAxisEvent_32_t;
 
 
-typedef struct SDL2_ControllerButtonEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_ControllerButtonEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     int32_t which;
@@ -552,13 +552,13 @@ typedef struct SDL2_ControllerButtonEvent_32_s {
 } my_SDL2_ControllerButtonEvent_32_t;
 
 
-typedef struct SDL2_ControllerDeviceEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_ControllerDeviceEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     int32_t which;
 } my_SDL2_ControllerDeviceEvent_32_t;
 
-typedef struct SDL2_ControllerTouchpadEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_ControllerTouchpadEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     int32_t which;
@@ -569,7 +569,7 @@ typedef struct SDL2_ControllerTouchpadEvent_32_s {
     float pressure;
 } my_SDL2_ControllerTouchpadEvent_32_t;
 
-typedef struct SDL2_ControllerSensorEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_ControllerSensorEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     int32_t which;
@@ -578,7 +578,7 @@ typedef struct SDL2_ControllerSensorEvent_32_s {
     uint64_t timestamp_us;
 } my_SDL2_ControllerSensorEvent_32_t;
 
-typedef struct SDL2_AudioDeviceEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_AudioDeviceEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     uint32_t which;
@@ -588,7 +588,7 @@ typedef struct SDL2_AudioDeviceEvent_32_s {
     uint8_t padding3;
 } my_SDL2_AudioDeviceEvent_32_t;
 
-typedef struct SDL2_TouchFingerEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_TouchFingerEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     int64_t touchId;
@@ -601,7 +601,7 @@ typedef struct SDL2_TouchFingerEvent_32_s {
     uint32_t windowID;
 } my_SDL2_TouchFingerEvent_32_t;
 
-typedef struct SDL2_MultiGestureEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_MultiGestureEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     int64_t touchId;
@@ -614,7 +614,7 @@ typedef struct SDL2_MultiGestureEvent_32_s {
 } my_SDL2_MultiGestureEvent_32_t;
 
 
-typedef struct SDL2_DollarGestureEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_DollarGestureEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     int64_t touchId;
@@ -625,14 +625,14 @@ typedef struct SDL2_DollarGestureEvent_32_s {
     float y;
 } my_SDL2_DollarGestureEvent_32_t;
 
-typedef struct SDL2_DropEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_DropEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     ptr_t file;
     uint32_t windowID;
 } my_SDL2_DropEvent_32_t;
 
-typedef struct SDL2_SensorEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_SensorEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     int32_t which;
@@ -641,13 +641,13 @@ typedef struct SDL2_SensorEvent_32_s {
 } my_SDL2_SensorEvent_32_t;
 
 
-typedef struct SDL2_QuitEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_QuitEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
 } my_SDL2_QuitEvent_32_t;
 
 
-typedef struct SDL2_UserEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_UserEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     uint32_t windowID;
@@ -656,14 +656,14 @@ typedef struct SDL2_UserEvent_32_s {
     ptr_t data2;
 } my_SDL2_UserEvent_32_t;
 
-typedef struct SDL2_SysWMEvent_32_s {
+typedef struct __attribute__((packed)) SDL2_SysWMEvent_32_s {
     uint32_t type;
     uint32_t timestamp;
     ptr_t msg;
 } my_SDL2_SysWMEvent_32_t;
 
 
-typedef union my_SDL2_Event_32_s {
+typedef union __attribute__((packed)) my_SDL2_Event_32_s {
     uint32_t type;
     my_SDL2_CommonEvent_32_t common;
     my_SDL2_DisplayEvent_32_t display;
@@ -761,11 +761,137 @@ typedef enum SDL2_EventType {
     SDL2_LASTEVENT = 0xFFFF
 } SDL2_EventType;
 
+typedef struct my_SDL2_Palette_s {
+    int ncolors;
+    void* colors;
+    uint32_t version;
+    int refcount;
+} my_SDL2_Palette_t;
+
+typedef struct my_SDL2_PixelFormat_s {
+    uint32_t format;
+    my_SDL2_Palette_t* palette;
+    uint8_t BitsPerPixel;
+    uint8_t BytesPerPixel;
+    uint8_t padding[2];
+    uint32_t Rmask;
+    uint32_t Gmask;
+    uint32_t Bmask;
+    uint32_t Amask;
+    uint8_t Rloss;
+    uint8_t Gloss;
+    uint8_t Bloss;
+    uint8_t Aloss;
+    uint8_t Rshift;
+    uint8_t Gshift;
+    uint8_t Bshift;
+    uint8_t Ashift;
+    int refcount;
+    struct my_SDL2_PixelFormat_s* next;
+} my_SDL2_PixelFormat_t;
+
+typedef struct my_SDL2_Rect_s {
+    int x, y;
+    int w, h;
+} my_SDL2_Rect_t;
+
+typedef struct my_SDL2_Surface_s {
+    uint32_t flags;
+    my_SDL2_PixelFormat_t* format;
+    int w, h;
+    int pitch;
+    void* pixels;
+    void* userdata;
+    int locked;
+    void* list_blitmap;
+    my_SDL2_Rect_t clip_rect;
+    void* map;
+    int refcount;
+} my_SDL2_Surface_t;
+
+typedef struct __attribute__((packed)) my_SDL2_Palette_32_s {
+    int ncolors;
+    ptr_t colors;
+    uint32_t version;
+    int refcount;
+} my_SDL2_Palette_32_t;
+
+typedef struct __attribute__((packed)) my_SDL2_PixelFormat_32_s {
+    uint32_t format;
+    ptr_t palette;
+    uint8_t BitsPerPixel;
+    uint8_t BytesPerPixel;
+    uint8_t padding[2];
+    uint32_t Rmask;
+    uint32_t Gmask;
+    uint32_t Bmask;
+    uint32_t Amask;
+    uint8_t Rloss;
+    uint8_t Gloss;
+    uint8_t Bloss;
+    uint8_t Aloss;
+    uint8_t Rshift;
+    uint8_t Gshift;
+    uint8_t Bshift;
+    uint8_t Ashift;
+    int refcount;
+    ptr_t next;
+} my_SDL2_PixelFormat_32_t;
+
+typedef struct __attribute__((packed)) my_SDL2_Rect_32_s {
+    int x, y;
+    int w, h;
+} my_SDL2_Rect_32_t;
+
+typedef struct __attribute__((packed)) my_SDL2_Surface_32_s {
+    uint32_t flags;
+    ptr_t format;
+    int w, h;
+    int pitch;
+    ptr_t pixels;
+    ptr_t userdata;
+    int locked;
+    ptr_t list_blitmap;
+    my_SDL2_Rect_32_t clip_rect;
+    ptr_t map;
+    int refcount;
+} my_SDL2_Surface_32_t;
+
+// simplified RWops
+typedef struct my_SDL2_RWops_s {
+    void* size;
+    void* seek;
+    void* read;
+    void* write;
+    void* close;
+    uint32_t type;
+    void* hidden[3];
+} my_SDL2_RWops_t;
+
+typedef struct __attribute__((packed)) my_SDL2_RWops_32_s {
+    ptr_t size;
+    ptr_t seek;
+    ptr_t read;
+    ptr_t write;
+    ptr_t close;
+    uint32_t type;
+    void* hidden[3]; // not converting hidden, just moving it
+} my_SDL2_RWops_32_t;
+
 void inplace_SDL2_DisplayMode_to_64(void* a);
 void inplace_SDL2_DisplayMode_to_32(void* a);
 void convert_SDL2_DisplayMode_to_32(void* dst_, void* src_);
 
 void convert_SDL2_Event_to_32(void* dst_, const void* src_);
-void convert_SDL2_Event_to_64(void* dst_, const void* src_);
+
+void inplace_SDL2_Palette_to_32(void* a);
+void inplace_SDL2_PixelFormat_to_32(void* a);
+void inplace_SDL2_Surface_to_32(void* a);
+void inplace_SDL2_Palette_to_64(void* a);
+void inplace_SDL2_PixelFormat_to_64(void* a);
+void inplace_SDL2_Surface_to_64(void* a);
+
+void inplace_SDL2_RWops_to_32(void* a);
+void inplace_SDL2_RWops_to_64(void* a);
 
 #endif // __MY_SDL2ALIGN32_H_
\ No newline at end of file
diff --git a/src/libtools/sdl1rwops.c b/src/libtools/sdl1rwops.c
index edb900ce..baf6897b 100644
--- a/src/libtools/sdl1rwops.c
+++ b/src/libtools/sdl1rwops.c
@@ -55,6 +55,26 @@ typedef struct SDL1_RWops_s {
     } hidden;
 } SDL1_RWops_t;
 
+#ifdef BOX32
+#define SUPER()                 \
+    if (box64_is32bits) {       \
+        GO(seek, iFpii_32)      \
+        GO(read, iFppii_32)     \
+        GO(write, iFppii_32)    \
+        GO(close, iFp_32)       \
+    } else {                    \
+        GO(seek, iFpii)         \
+        GO(read, iFppii)        \
+        GO(write, iFppii)       \
+        GO(close, iFp)          \
+    }
+#else
+#define SUPER()                 \
+        GO(seek, iFpii)         \
+        GO(read, iFppii)        \
+        GO(write, iFppii)       \
+        GO(close, iFp)
+#endif
 
 EXPORT int32_t my_native_seek(SDL1_RWops_t *context, int32_t offset, int32_t whence)
 {
@@ -142,21 +162,7 @@ SDL1_RWops_t* AddNativeRW(x64emu_t* emu, SDL1_RWops_t* ops)
     fnc = AddCheckBridge(system, W, my_native_##A, 0, NULL); \
     newrw->A = (sdl1_##A)fnc;
 
-    #ifdef BOX32
-    if(box64_is32bits)
-    {
-        GO(seek, iFpii_32)
-        GO(read, iFppii_32)
-        GO(write, iFppii_32)
-        GO(close, iFp_32)
-    } else
-    #endif
-    {
-        GO(seek, iFpii)
-        GO(read, iFppii)
-        GO(write, iFppii)
-        GO(close, iFp)
-    }
+    SUPER()
 
     #undef GO
 
@@ -181,10 +187,7 @@ SDL1_RWops_t* RWNativeStart(x64emu_t* emu, SDL1_RWops_t* ops)
     #define GO(A, W) \
     newrw->A = my_emulated_##A;
 
-    GO(seek, iFpii)
-    GO(read, iFppii)
-    GO(write, iFppii)
-    GO(close, iFp)
+    SUPER()
 
     #undef GO
 
diff --git a/src/libtools/sdl2align32.c b/src/libtools/sdl2align32.c
index dd0b33da..dbef7722 100644
--- a/src/libtools/sdl2align32.c
+++ b/src/libtools/sdl2align32.c
@@ -140,4 +140,160 @@ void convert_SDL2_Event_to_32(void* dst_, const void* src_)
             printf_log(LOG_INFO, "Warning, unsuported SDL2 event %d\n", src->type);
             memcpy(dst, src, sizeof(my_SDL2_Event_32_t));
     }
+}
+
+void inplace_SDL2_Palette_to_32(void* a)
+{
+    if (!a) return;
+    my_SDL2_Palette_t* src = a;
+    my_SDL2_Palette_32_t* dst = a;
+    dst->ncolors = src->ncolors;
+    dst->colors = to_ptrv(src->colors);
+    dst->version = src->version;
+    dst->refcount = src->refcount;
+}
+
+void inplace_SDL2_PixelFormat_to_32(void* a)
+{
+    while (a) {
+        my_SDL2_PixelFormat_t* src = a;
+        my_SDL2_PixelFormat_32_t* dst = a;
+        dst->format = src->format;
+        inplace_SDL2_Palette_to_32(src->palette);
+        dst->palette = to_ptrv(src->palette);
+        dst->BitsPerPixel = src->BitsPerPixel;
+        dst->BytesPerPixel = src->BytesPerPixel;
+        dst->Rmask = src->Rmask;
+        dst->Gmask = src->Gmask;
+        dst->Bmask = src->Bmask;
+        dst->Amask = src->Amask;
+        dst->Rloss = src->Rloss;
+        dst->Gloss = src->Gloss;
+        dst->Bloss = src->Bloss;
+        dst->Aloss = src->Aloss;
+        dst->Rshift = src->Rshift;
+        dst->Gshift = src->Gshift;
+        dst->Bshift = src->Bshift;
+        dst->Ashift = src->Ashift;
+        dst->refcount = src->refcount;
+        a = (void*)src->next;
+        dst->next = to_ptrv(src->next);
+    }
+}
+
+void inplace_SDL2_Surface_to_32(void* a)
+{
+    if (!a) return;
+    my_SDL2_Surface_t* src = a;
+    my_SDL2_Surface_32_t* dst = a;
+    dst->flags = src->flags;
+    inplace_SDL2_PixelFormat_to_32(src->format);
+    dst->format = to_ptrv(src->format);
+    dst->w = src->w;
+    dst->h = src->h;
+    dst->pitch = src->pitch;
+    dst->pixels = to_ptrv(src->pixels);
+    dst->userdata = to_ptrv(src->userdata);
+    dst->locked = src->locked;
+    dst->list_blitmap = to_ptrv(src->list_blitmap);
+    dst->clip_rect.x = src->clip_rect.x;
+    dst->clip_rect.y = src->clip_rect.y;
+    dst->clip_rect.w = src->clip_rect.w;
+    dst->clip_rect.h = src->clip_rect.h;
+    dst->map = to_ptrv(src->map);
+    dst->refcount = src->refcount;
+}
+
+
+void inplace_SDL2_Palette_to_64(void* a)
+{
+    if (!a) return;
+    my_SDL2_Palette_32_t* src = a;
+    my_SDL2_Palette_t* dst = a;
+    dst->refcount = src->refcount;
+    dst->version = src->version;
+    dst->colors = from_ptrv(src->colors);
+    dst->ncolors = src->ncolors;
+}
+
+void inplace_SDL2_PixelFormat_to_64(void* a)
+{
+    while (a) {
+        my_SDL2_PixelFormat_32_t* src = a;
+        my_SDL2_PixelFormat_t* dst = a;
+        uintptr_t p = (uintptr_t)(src->next);
+        a = (void*)p;
+        dst->next = from_ptrv(src->next);
+        dst->refcount = src->refcount;
+        dst->Ashift = src->Ashift;
+        dst->Bshift = src->Bshift;
+        dst->Gshift = src->Gshift;
+        dst->Rshift = src->Rshift;
+        dst->Aloss = src->Aloss;
+        dst->Bloss = src->Bloss;
+        dst->Gloss = src->Gloss;
+        dst->Rloss = src->Rloss;
+        dst->Amask = src->Amask;
+        dst->Bmask = src->Bmask;
+        dst->Gmask = src->Gmask;
+        dst->Rmask = src->Rmask;
+        dst->BytesPerPixel = src->BytesPerPixel;
+        dst->BitsPerPixel = src->BitsPerPixel;
+        p = (uintptr_t)(src->palette);
+        inplace_SDL2_Palette_to_64((void*)p);
+        dst->palette = from_ptrv(src->palette);
+        dst->format = src->format;
+    }
+}
+
+void inplace_SDL2_Surface_to_64(void* a)
+{
+    if (!a) return;
+    my_SDL2_Surface_32_t* src = a;
+    my_SDL2_Surface_t* dst = a;
+    dst->refcount = src->refcount;
+    dst->map = from_ptrv(src->map);
+    dst->clip_rect.h = src->clip_rect.h;
+    dst->clip_rect.w = src->clip_rect.w;
+    dst->clip_rect.y = src->clip_rect.y;
+    dst->clip_rect.x = src->clip_rect.x;
+    dst->list_blitmap = from_ptrv(src->list_blitmap);
+    dst->locked = src->locked;
+    dst->userdata = from_ptrv(src->userdata);
+    dst->pixels = from_ptrv(src->pixels);
+    dst->pitch = src->pitch;
+    dst->h = src->h;
+    dst->w = src->w;
+    uintptr_t p = (uintptr_t)(src->format);
+    inplace_SDL2_PixelFormat_to_64((void*)p);
+    dst->format = from_ptrv(src->format);
+    dst->flags = src->flags;
+}
+
+void inplace_SDL2_RWops_to_32(void* a)
+{
+    if (!a) return;
+    my_SDL2_RWops_t* src = a;
+    my_SDL2_RWops_32_t* dst = a;
+    dst->size = to_ptrv(src->size);
+    dst->seek = to_ptrv(src->seek);
+    dst->read = to_ptrv(src->read);
+    dst->write = to_ptrv(src->write);
+    dst->close = to_ptrv(src->close);
+    dst->type = src->type;
+    memmove(&dst->hidden, &src->hidden, sizeof(dst->hidden));
+}
+
+void inplace_SDL2_RWops_to_64(void* a)
+{
+    if(!a) return;
+    my_SDL2_RWops_32_t* src = a;
+    my_SDL2_RWops_t* dst = a;
+    memmove(&dst->hidden, &src->hidden, sizeof(dst->hidden));
+    dst->type = src->type;
+    dst->close = from_ptrv(src->close);
+    dst->write = from_ptrv(src->write);
+    dst->read = from_ptrv(src->read);
+    dst->seek = from_ptrv(src->seek);
+    dst->size = from_ptrv(src->size);
 }
\ No newline at end of file
diff --git a/src/libtools/sdl2rwops.c b/src/libtools/sdl2rwops.c
index 2f11a202..d7d2f34c 100644
--- a/src/libtools/sdl2rwops.c
+++ b/src/libtools/sdl2rwops.c
@@ -6,6 +6,10 @@
 #include "sdl2rwops.h"
 #include "debug.h"
 #include "wrapper.h"
+#ifdef BOX32
+#include "wrapper32.h"
+#include "sdl2align32.h"
+#endif
 #include "box64context.h"
 #include "x64run.h"
 #include "x64emu.h"
@@ -54,31 +58,85 @@ typedef struct SDL2_RWops_s {
     } hidden;
 } SDL2_RWops_t;
 
-#define SUPER()         \
-    GO(size, IFp)       \
-    GO(seek, IFpIi)     \
-    GO(read, iFppii)    \
-    GO(write, iFppii)   \
-    GO(close, iFp)
+#ifdef BOX32
+#define SUPER()                 \
+    if (box64_is32bits) {       \
+        GO(size, IFp_32)        \
+        GO(seek, IFpIi_32)      \
+        GO(read, iFppii_32)     \
+        GO(write, iFppii_32)    \
+        GO(close, iFp_32)       \
+    } else {                    \
+        GO(size, IFp)           \
+        GO(seek, IFpIi)         \
+        GO(read, iFppii)        \
+        GO(write, iFppii)       \
+        GO(close, iFp)          \
+    }
+#else
+#define SUPER()                 \
+        GO(size, IFp)           \
+        GO(seek, IFpIi)         \
+        GO(read, iFppii)        \
+        GO(write, iFppii)       \
+        GO(close, iFp)
+#endif
 
 EXPORT int64_t my2_native_size(SDL2_RWops_t *context)
 {
+    #ifdef BOX32
+    if(box64_is32bits) {
+        inplace_SDL2_RWops_to_64(context);
+        int ret = context->hidden.my.orig->size(context->hidden.my.orig);
+        inplace_SDL2_RWops_to_32(context);
+        return ret;
+    }
+    #endif
     return context->hidden.my.orig->size(context->hidden.my.orig);
 }
 EXPORT int64_t my2_native_seek(SDL2_RWops_t *context, int64_t offset, int32_t whence)
 {
+    #ifdef BOX32
+    if(box64_is32bits) {
+        inplace_SDL2_RWops_to_64(context);
+        int ret = context->hidden.my.orig->seek(context->hidden.my.orig, offset, whence);
+        inplace_SDL2_RWops_to_32(context);
+        return ret;
+    }
+    #endif
     return context->hidden.my.orig->seek(context->hidden.my.orig, offset, whence);
 }
 EXPORT size_t my2_native_read(SDL2_RWops_t *context, void *ptr, size_t size, size_t maxnum)
 {
+    #ifdef BOX32
+    if(box64_is32bits) {
+        inplace_SDL2_RWops_to_64(context);
+        int ret = context->hidden.my.orig->read(context->hidden.my.orig, ptr, size, maxnum);
+        inplace_SDL2_RWops_to_32(context);
+        return ret;
+    }
+    #endif
     return context->hidden.my.orig->read(context->hidden.my.orig, ptr, size, maxnum);
 }
 EXPORT size_t my2_native_write(SDL2_RWops_t *context, const void *ptr, size_t size, size_t num)
 {
+    #ifdef BOX32
+    if(box64_is32bits) {
+        inplace_SDL2_RWops_to_64(context);
+        int ret = context->hidden.my.orig->write(context->hidden.my.orig, ptr, size, num);
+        inplace_SDL2_RWops_to_32(context);
+        return ret;
+    }
+    #endif
     return context->hidden.my.orig->write(context->hidden.my.orig, ptr, size, num);
 }
 EXPORT int32_t my2_native_close(SDL2_RWops_t *context)
 {
+    #ifdef BOX32
+    if(box64_is32bits) {
+        inplace_SDL2_RWops_to_64(context);
+    }
+    #endif
     int32_t ret = context->hidden.my.orig->close(context->hidden.my.orig);
     context->hidden.my.custom_free(context);
     return ret;
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index 1a694209..b3db228d 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -2183,6 +2183,7 @@
 #() iFpppppp
 #() uFEiippp
 #() uFEiuppp
+#() uFEpippi
 #() uFEpippp
 #() uFEpCppp
 #() uFEpuppp
@@ -5581,7 +5582,7 @@ wrappedsdl2:
   - SDL_RWwrite
 - vFGpppp:
   - SDL_GetJoystickGUIDInfo
-- iFpippi:
+- uFpippi:
   - SDL_OpenAudioDevice
 - pFpippp:
   - SDL_LoadWAV_RW
diff --git a/src/wrapped/generated/wrappedsdl2types.h b/src/wrapped/generated/wrappedsdl2types.h
index e0cf1884..4f2ef49f 100644
--- a/src/wrapped/generated/wrappedsdl2types.h
+++ b/src/wrapped/generated/wrappedsdl2types.h
@@ -46,7 +46,7 @@ typedef int32_t (*iFpLpp_t)(void*, uintptr_t, void*, void*);
 typedef int32_t (*iFpLpV_t)(void*, uintptr_t, void*, ...);
 typedef uint32_t (*uFppuu_t)(void*, void*, uint32_t, uint32_t);
 typedef void (*vFGpppp_t)(SDL_JoystickGUID, void*, void*, void*, void*);
-typedef int32_t (*iFpippi_t)(void*, int32_t, void*, void*, int32_t);
+typedef uint32_t (*uFpippi_t)(void*, int32_t, void*, void*, int32_t);
 typedef void* (*pFpippp_t)(void*, int32_t, void*, void*, void*);
 
 #define SUPER() ADDED_FUNCTIONS() \
@@ -130,7 +130,7 @@ typedef void* (*pFpippp_t)(void*, int32_t, void*, void*, void*);
 	GO(SDL_RWread, uFppuu_t) \
 	GO(SDL_RWwrite, uFppuu_t) \
 	GO(SDL_GetJoystickGUIDInfo, vFGpppp_t) \
-	GO(SDL_OpenAudioDevice, iFpippi_t) \
+	GO(SDL_OpenAudioDevice, uFpippi_t) \
 	GO(SDL_LoadWAV_RW, pFpippp_t)
 
 #endif // __wrappedsdl2TYPES_H_
diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c
index 1ff9f2c7..9f2f0b6b 100644
--- a/src/wrapped/generated/wrapper.c
+++ b/src/wrapped/generated/wrapper.c
@@ -2211,6 +2211,7 @@ typedef int32_t (*iFpppppL_t)(void*, void*, void*, void*, void*, uintptr_t);
 typedef int32_t (*iFpppppp_t)(void*, void*, void*, void*, void*, void*);
 typedef uint32_t (*uFEiippp_t)(x64emu_t*, int32_t, int32_t, void*, void*, void*);
 typedef uint32_t (*uFEiuppp_t)(x64emu_t*, int32_t, uint32_t, void*, void*, void*);
+typedef uint32_t (*uFEpippi_t)(x64emu_t*, void*, int32_t, void*, void*, int32_t);
 typedef uint32_t (*uFEpippp_t)(x64emu_t*, void*, int32_t, void*, void*, void*);
 typedef uint32_t (*uFEpCppp_t)(x64emu_t*, void*, uint8_t, void*, void*, void*);
 typedef uint32_t (*uFEpuppp_t)(x64emu_t*, void*, uint32_t, void*, void*, void*);
@@ -5444,6 +5445,7 @@ void iFpppppL(x64emu_t *emu, uintptr_t fcn) { iFpppppL_t fn = (iFpppppL_t)fcn; R
 void iFpppppp(x64emu_t *emu, uintptr_t fcn) { iFpppppp_t fn = (iFpppppp_t)fcn; R_RAX=(int32_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=(uint32_t)fn(emu, (int32_t)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void uFEiuppp(x64emu_t *emu, uintptr_t fcn) { uFEiuppp_t fn = (uFEiuppp_t)fcn; R_RAX=(uint32_t)fn(emu, (int32_t)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
+void uFEpippi(x64emu_t *emu, uintptr_t fcn) { uFEpippi_t fn = (uFEpippi_t)fcn; R_RAX=(uint32_t)fn(emu, (void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8); }
 void uFEpippp(x64emu_t *emu, uintptr_t fcn) { uFEpippp_t fn = (uFEpippp_t)fcn; R_RAX=(uint32_t)fn(emu, (void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void uFEpCppp(x64emu_t *emu, uintptr_t fcn) { uFEpCppp_t fn = (uFEpCppp_t)fcn; R_RAX=(uint32_t)fn(emu, (void*)R_RDI, (uint8_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void uFEpuppp(x64emu_t *emu, uintptr_t fcn) { uFEpuppp_t fn = (uFEpuppp_t)fcn; R_RAX=(uint32_t)fn(emu, (void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h
index 556c90d4..9b603b1e 100644
--- a/src/wrapped/generated/wrapper.h
+++ b/src/wrapped/generated/wrapper.h
@@ -2220,6 +2220,7 @@ void iFpppppL(x64emu_t *emu, uintptr_t fnc);
 void iFpppppp(x64emu_t *emu, uintptr_t fnc);
 void uFEiippp(x64emu_t *emu, uintptr_t fnc);
 void uFEiuppp(x64emu_t *emu, uintptr_t fnc);
+void uFEpippi(x64emu_t *emu, uintptr_t fnc);
 void uFEpippp(x64emu_t *emu, uintptr_t fnc);
 void uFEpCppp(x64emu_t *emu, uintptr_t fnc);
 void uFEpuppp(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped/wrappedsdl2.c b/src/wrapped/wrappedsdl2.c
index d0a933d7..a59ec93a 100644
--- a/src/wrapped/wrappedsdl2.c
+++ b/src/wrapped/wrappedsdl2.c
@@ -237,19 +237,15 @@ EXPORT int64_t my2_SDL_OpenAudio(x64emu_t* emu, void* d, void* o)
     return ret;
 }
 
-EXPORT int64_t my2_SDL_OpenAudioDevice(x64emu_t* emu, void* device, int64_t iscapture, void* d, void* o, int64_t allowed)
+EXPORT uint32_t my2_SDL_OpenAudioDevice(x64emu_t* emu, void* device, int iscapture, void* d, void* o, int allowed)
 {
-    SDL2_AudioSpec *desired = (SDL2_AudioSpec*)d;
+    SDL2_AudioSpec* desired = (SDL2_AudioSpec*)d;
 
     // create a callback
-    void *fnc = (void*)desired->callback;
+    void* fnc = (void*)desired->callback;
     desired->callback = find_AudioCallback_Fct(fnc);
-    int ret = my->SDL_OpenAudioDevice(device, iscapture, desired, (SDL2_AudioSpec*)o, allowed);
-    if (ret<=0) {
-        // error, clean the callback...
-        desired->callback = fnc;
-        return ret;
-    }
+    uint32_t ret = my->SDL_OpenAudioDevice(device, iscapture, desired, (SDL2_AudioSpec*)o, allowed);
+
     // put back stuff in place?
     desired->callback = fnc;
 
diff --git a/src/wrapped/wrappedsdl2_private.h b/src/wrapped/wrappedsdl2_private.h
index b3c100ca..fd700a46 100644
--- a/src/wrapped/wrappedsdl2_private.h
+++ b/src/wrapped/wrappedsdl2_private.h
@@ -483,7 +483,7 @@ GO(SDL_NumHaptics, iFv)
 GO(SDL_NumJoysticks, iFv)
 GO(SDL_NumSensors, iFv)
 GOM(SDL_OpenAudio, iFEpp)
-GOM(SDL_OpenAudioDevice, iFEpippi)
+GOM(SDL_OpenAudioDevice, uFEpippi)
 GO(SDL_PauseAudio, vFi)
 GO(SDL_PauseAudioDevice, vFui)
 GO(SDL_PeepEvents, iFpiuuu)
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt
index d67b10b9..de40c7fd 100644
--- a/src/wrapped32/generated/functions_list.txt
+++ b/src/wrapped32/generated/functions_list.txt
@@ -107,6 +107,7 @@
 #() vFdd -> vFdd
 #() vFlu -> vFlu
 #() vFlp -> vFlp
+#() vFpi -> vFpi
 #() vFpC -> vFpC
 #() vFpu -> vFpu
 #() vFpl -> vFpl
@@ -160,6 +161,7 @@
 #() uFuu -> uFuu
 #() uFup -> uFup
 #() uFpi -> uFpi
+#() uFpu -> uFpu
 #() uFpp -> uFpp
 #() uFpa -> uFpa
 #() UFii -> UFii
@@ -177,6 +179,7 @@
 #() dFdD -> dFdD
 #() dFdp -> dFdp
 #() dFLL -> dFLL
+#() dFpp -> dFpp
 #() lFES -> lFES
 #() lFui -> lFui
 #() lFll -> lFll
@@ -222,6 +225,7 @@
 #() vFEpi -> vFEpi
 #() vFEpu -> vFEpu
 #() vFEpp -> vFEpp
+#() vFEpV -> vFEpV
 #() vFccc -> vFccc
 #() vFwww -> vFwww
 #() vFiii -> vFiii
@@ -345,6 +349,7 @@
 #() iFXpu -> iFXpu
 #() iFXpp -> iFXpp
 #() IFiIi -> IFiIi
+#() IFpIi -> IFpIi
 #() CFipp -> CFipp
 #() CFuUu -> CFuUu
 #() CFuff -> CFuff
@@ -356,6 +361,7 @@
 #() uFuup -> uFuup
 #() uFupp -> uFupp
 #() uFpuU -> uFpuU
+#() uFppu -> uFppu
 #() fFuii -> fFuii
 #() fFfff -> fFfff
 #() fFffp -> fFffp
@@ -364,10 +370,12 @@
 #() lFipL -> lFipL
 #() lFlpi -> lFlpi
 #() lFpLL -> lFpLL
+#() lFppi -> lFppi
 #() lFppL -> lFppL
 #() LFEpi -> LFEpi
 #() LFpii -> LFpii
 #() LFpip -> LFpip
+#() LFppi -> LFppi
 #() LFppL -> LFppL
 #() LFXCi -> LFXCi
 #() LFXpi -> LFXpi
@@ -380,7 +388,9 @@
 #() pFipi -> pFipi
 #() pFipL -> pFipL
 #() pFulu -> pFulu
+#() pFupi -> pFupi
 #() pFupp -> pFupp
+#() pFLpi -> pFLpi
 #() pFpii -> pFpii
 #() pFpiu -> pFpiu
 #() pFpiL -> pFpiL
@@ -430,6 +440,7 @@
 #() vFiuip -> vFiuip
 #() vFiuuu -> vFiuuu
 #() vFiulp -> vFiulp
+#() vFiupV -> vFiupV
 #() vFiUUU -> vFiUUU
 #() vFifff -> vFifff
 #() vFiddd -> vFiddd
@@ -681,6 +692,7 @@
 #() vFpipiu -> vFpipiu
 #() vFpuipp -> vFpuipp
 #() vFpddii -> vFpddii
+#() vFppWui -> vFppWui
 #() vFpppii -> vFpppii
 #() vFppppu -> vFppppu
 #() vFppppp -> vFppppp
@@ -815,12 +827,14 @@
 #() iFXLiiiL -> iFXLiiiL
 #() iFXLpppp -> iFXLpppp
 #() iFXpIppp -> iFXpIppp
+#() uFEpippi -> uFEpippi
 #() uFupuufp -> uFupuufp
 #() lFipLipu -> lFipLipu
 #() lFipLipp -> lFipLipp
 #() pFEpiiuu -> pFEpiiuu
 #() pFEpLLiN -> pFEpLLiN
 #() pFEppLLp -> pFEppLLp
+#() pFWCiWCi -> pFWCiWCi
 #() pFpiiiiu -> pFpiiiiu
 #() vFiiiiiip -> vFiiiiiip
 #() vFiiiiuup -> vFiiiiuup
@@ -882,6 +896,7 @@
 #() iFXiuLiii -> iFXiuLiii
 #() uFuippppp -> uFuippppp
 #() LFXLLppuu -> LFXLLppuu
+#() pFEpiiiiu -> pFEpiiiiu
 #() pFEpLiiii -> pFEpLiiii
 #() pFEpLiiiI -> pFEpLiiiI
 #() vFiiiiuuip -> vFiiiiuuip
@@ -1584,9 +1599,33 @@ wrappedsdl1:
   - SDL_BuildAudioCVT
 wrappedsdl2:
 % G SDL_JoystickGUID UU
+- vFp:
+  - SDL_FreeSurface
 - iFp:
   - SDL_PollEvent
+- pFv:
+  - SDL_GetBasePath
+- pFp:
+  - SDL_GL_GetProcAddress
+- vFpp:
+  - SDL_SetWindowIcon
+- vFpV:
+  - SDL_Log
 - iFip:
   - SDL_GetDesktopDisplayMode
 - iFpp:
   - SDL_OpenAudio
+- pFpp:
+  - SDL_RWFromFile
+- iFppV:
+  - SDL_sscanf
+- pFppp:
+  - SDL_CreateThread
+- iFpLpp:
+  - SDL_vsnprintf
+- iFpLpV:
+  - SDL_snprintf
+- uFpippi:
+  - SDL_OpenAudioDevice
+- pFpiiiiu:
+  - SDL_CreateRGBSurfaceWithFormatFrom
diff --git a/src/wrapped32/generated/wrappedsdl2types32.h b/src/wrapped32/generated/wrappedsdl2types32.h
index e6ad5bc7..ec19e213 100644
--- a/src/wrapped32/generated/wrappedsdl2types32.h
+++ b/src/wrapped32/generated/wrappedsdl2types32.h
@@ -11,13 +11,37 @@
 #define ADDED_FUNCTIONS() 
 #endif
 
+typedef void (*vFp_t)(void*);
 typedef int32_t (*iFp_t)(void*);
+typedef void* (*pFv_t)(void);
+typedef void* (*pFp_t)(void*);
+typedef void (*vFpp_t)(void*, void*);
+typedef void (*vFpV_t)(void*, ...);
 typedef int32_t (*iFip_t)(int32_t, void*);
 typedef int32_t (*iFpp_t)(void*, void*);
+typedef void* (*pFpp_t)(void*, void*);
+typedef int32_t (*iFppV_t)(void*, void*, ...);
+typedef void* (*pFppp_t)(void*, void*, void*);
+typedef int32_t (*iFpLpp_t)(void*, uintptr_t, void*, void*);
+typedef int32_t (*iFpLpV_t)(void*, uintptr_t, void*, ...);
+typedef uint32_t (*uFpippi_t)(void*, int32_t, void*, void*, int32_t);
+typedef void* (*pFpiiiiu_t)(void*, int32_t, int32_t, int32_t, int32_t, uint32_t);
 
 #define SUPER() ADDED_FUNCTIONS() \
+	GO(SDL_FreeSurface, vFp_t) \
 	GO(SDL_PollEvent, iFp_t) \
+	GO(SDL_GetBasePath, pFv_t) \
+	GO(SDL_GL_GetProcAddress, pFp_t) \
+	GO(SDL_SetWindowIcon, vFpp_t) \
+	GO(SDL_Log, vFpV_t) \
 	GO(SDL_GetDesktopDisplayMode, iFip_t) \
-	GO(SDL_OpenAudio, iFpp_t)
+	GO(SDL_OpenAudio, iFpp_t) \
+	GO(SDL_RWFromFile, pFpp_t) \
+	GO(SDL_sscanf, iFppV_t) \
+	GO(SDL_CreateThread, pFppp_t) \
+	GO(SDL_vsnprintf, iFpLpp_t) \
+	GO(SDL_snprintf, iFpLpV_t) \
+	GO(SDL_OpenAudioDevice, uFpippi_t) \
+	GO(SDL_CreateRGBSurfaceWithFormatFrom, pFpiiiiu_t)
 
 #endif // __wrappedsdl2TYPES32_H_
diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c
index 8f7be283..bef6ca09 100644
--- a/src/wrapped32/generated/wrapper32.c
+++ b/src/wrapped32/generated/wrapper32.c
@@ -197,6 +197,7 @@ typedef void (*vFff_t)(float, float);
 typedef void (*vFdd_t)(double, double);
 typedef void (*vFlu_t)(intptr_t, uint32_t);
 typedef void (*vFlp_t)(intptr_t, void*);
+typedef void (*vFpi_t)(void*, int32_t);
 typedef void (*vFpC_t)(void*, uint8_t);
 typedef void (*vFpu_t)(void*, uint32_t);
 typedef void (*vFpl_t)(void*, intptr_t);
@@ -250,6 +251,7 @@ typedef uint32_t (*uFEV_t)(x64emu_t*, void*);
 typedef uint32_t (*uFuu_t)(uint32_t, uint32_t);
 typedef uint32_t (*uFup_t)(uint32_t, void*);
 typedef uint32_t (*uFpi_t)(void*, int32_t);
+typedef uint32_t (*uFpu_t)(void*, uint32_t);
 typedef uint32_t (*uFpp_t)(void*, void*);
 typedef uint32_t (*uFpa_t)(void*, void*);
 typedef uint64_t (*UFii_t)(int32_t, int32_t);
@@ -267,6 +269,7 @@ typedef double (*dFdd_t)(double, double);
 typedef double (*dFdD_t)(double, long double);
 typedef double (*dFdp_t)(double, void*);
 typedef double (*dFLL_t)(uintptr_t, uintptr_t);
+typedef double (*dFpp_t)(void*, void*);
 typedef intptr_t (*lFES_t)(x64emu_t*, void*);
 typedef intptr_t (*lFui_t)(uint32_t, int32_t);
 typedef intptr_t (*lFll_t)(intptr_t, intptr_t);
@@ -312,6 +315,7 @@ typedef void (*vFEip_t)(x64emu_t*, int32_t, void*);
 typedef void (*vFEpi_t)(x64emu_t*, void*, int32_t);
 typedef void (*vFEpu_t)(x64emu_t*, void*, uint32_t);
 typedef void (*vFEpp_t)(x64emu_t*, void*, void*);
+typedef void (*vFEpV_t)(x64emu_t*, void*, void*);
 typedef void (*vFccc_t)(int8_t, int8_t, int8_t);
 typedef void (*vFwww_t)(int16_t, int16_t, int16_t);
 typedef void (*vFiii_t)(int32_t, int32_t, int32_t);
@@ -435,6 +439,7 @@ typedef int32_t (*iFXLp_t)(void*, uintptr_t, void*);
 typedef int32_t (*iFXpu_t)(void*, void*, uint32_t);
 typedef int32_t (*iFXpp_t)(void*, void*, void*);
 typedef int64_t (*IFiIi_t)(int32_t, int64_t, int32_t);
+typedef int64_t (*IFpIi_t)(void*, int64_t, int32_t);
 typedef uint8_t (*CFipp_t)(int32_t, void*, void*);
 typedef uint8_t (*CFuUu_t)(uint32_t, uint64_t, uint32_t);
 typedef uint8_t (*CFuff_t)(uint32_t, float, float);
@@ -446,6 +451,7 @@ typedef uint32_t (*uFuuu_t)(uint32_t, uint32_t, uint32_t);
 typedef uint32_t (*uFuup_t)(uint32_t, uint32_t, void*);
 typedef uint32_t (*uFupp_t)(uint32_t, void*, void*);
 typedef uint32_t (*uFpuU_t)(void*, uint32_t, uint64_t);
+typedef uint32_t (*uFppu_t)(void*, void*, uint32_t);
 typedef float (*fFuii_t)(uint32_t, int32_t, int32_t);
 typedef float (*fFfff_t)(float, float, float);
 typedef float (*fFffp_t)(float, float, void*);
@@ -454,10 +460,12 @@ typedef double (*dFddp_t)(double, double, void*);
 typedef intptr_t (*lFipL_t)(int32_t, void*, uintptr_t);
 typedef intptr_t (*lFlpi_t)(intptr_t, void*, int32_t);
 typedef intptr_t (*lFpLL_t)(void*, uintptr_t, uintptr_t);
+typedef intptr_t (*lFppi_t)(void*, void*, int32_t);
 typedef intptr_t (*lFppL_t)(void*, void*, uintptr_t);
 typedef uintptr_t (*LFEpi_t)(x64emu_t*, void*, int32_t);
 typedef uintptr_t (*LFpii_t)(void*, int32_t, int32_t);
 typedef uintptr_t (*LFpip_t)(void*, int32_t, void*);
+typedef uintptr_t (*LFppi_t)(void*, void*, int32_t);
 typedef uintptr_t (*LFppL_t)(void*, void*, uintptr_t);
 typedef uintptr_t (*LFXCi_t)(void*, uint8_t, int32_t);
 typedef uintptr_t (*LFXpi_t)(void*, void*, int32_t);
@@ -470,7 +478,9 @@ typedef void* (*pFEXp_t)(x64emu_t*, void*, void*);
 typedef void* (*pFipi_t)(int32_t, void*, int32_t);
 typedef void* (*pFipL_t)(int32_t, void*, uintptr_t);
 typedef void* (*pFulu_t)(uint32_t, intptr_t, uint32_t);
+typedef void* (*pFupi_t)(uint32_t, void*, int32_t);
 typedef void* (*pFupp_t)(uint32_t, void*, void*);
+typedef void* (*pFLpi_t)(uintptr_t, void*, int32_t);
 typedef void* (*pFpii_t)(void*, int32_t, int32_t);
 typedef void* (*pFpiu_t)(void*, int32_t, uint32_t);
 typedef void* (*pFpiL_t)(void*, int32_t, uintptr_t);
@@ -520,6 +530,7 @@ typedef void (*vFiIII_t)(int32_t, int64_t, int64_t, int64_t);
 typedef void (*vFiuip_t)(int32_t, uint32_t, int32_t, void*);
 typedef void (*vFiuuu_t)(int32_t, uint32_t, uint32_t, uint32_t);
 typedef void (*vFiulp_t)(int32_t, uint32_t, intptr_t, void*);
+typedef void (*vFiupV_t)(int32_t, uint32_t, void*, void*);
 typedef void (*vFiUUU_t)(int32_t, uint64_t, uint64_t, uint64_t);
 typedef void (*vFifff_t)(int32_t, float, float, float);
 typedef void (*vFiddd_t)(int32_t, double, double, double);
@@ -771,6 +782,7 @@ typedef void (*vFpilpp_t)(void*, int32_t, intptr_t, void*, void*);
 typedef void (*vFpipiu_t)(void*, int32_t, void*, int32_t, uint32_t);
 typedef void (*vFpuipp_t)(void*, uint32_t, int32_t, void*, void*);
 typedef void (*vFpddii_t)(void*, double, double, int32_t, int32_t);
+typedef void (*vFppWui_t)(void*, void*, uint16_t, uint32_t, int32_t);
 typedef void (*vFpppii_t)(void*, void*, void*, int32_t, int32_t);
 typedef void (*vFppppu_t)(void*, void*, void*, void*, uint32_t);
 typedef void (*vFppppp_t)(void*, void*, void*, void*, void*);
@@ -905,12 +917,14 @@ typedef int32_t (*iFXiippp_t)(void*, int32_t, int32_t, void*, void*, void*);
 typedef int32_t (*iFXLiiiL_t)(void*, uintptr_t, int32_t, int32_t, int32_t, uintptr_t);
 typedef int32_t (*iFXLpppp_t)(void*, uintptr_t, void*, void*, void*, void*);
 typedef int32_t (*iFXpIppp_t)(void*, void*, int64_t, void*, void*, void*);
+typedef uint32_t (*uFEpippi_t)(x64emu_t*, void*, int32_t, void*, void*, int32_t);
 typedef uint32_t (*uFupuufp_t)(uint32_t, void*, uint32_t, uint32_t, float, void*);
 typedef intptr_t (*lFipLipu_t)(int32_t, void*, uintptr_t, int32_t, void*, uint32_t);
 typedef intptr_t (*lFipLipp_t)(int32_t, void*, uintptr_t, int32_t, void*, void*);
 typedef void* (*pFEpiiuu_t)(x64emu_t*, void*, int32_t, int32_t, uint32_t, uint32_t);
 typedef void* (*pFEpLLiN_t)(x64emu_t*, void*, uintptr_t, uintptr_t, int32_t, ...);
 typedef void* (*pFEppLLp_t)(x64emu_t*, void*, void*, uintptr_t, uintptr_t, void*);
+typedef void* (*pFWCiWCi_t)(uint16_t, uint8_t, int32_t, uint16_t, uint8_t, int32_t);
 typedef void* (*pFpiiiiu_t)(void*, int32_t, int32_t, int32_t, int32_t, uint32_t);
 typedef void (*vFiiiiiip_t)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, void*);
 typedef void (*vFiiiiuup_t)(int32_t, int32_t, int32_t, int32_t, uint32_t, uint32_t, void*);
@@ -972,6 +986,7 @@ typedef int32_t (*iFpupLpLi_t)(void*, uint32_t, void*, uintptr_t, void*, uintptr
 typedef int32_t (*iFXiuLiii_t)(void*, int32_t, uint32_t, uintptr_t, int32_t, int32_t, int32_t);
 typedef uint32_t (*uFuippppp_t)(uint32_t, int32_t, void*, void*, void*, void*, void*);
 typedef uintptr_t (*LFXLLppuu_t)(void*, uintptr_t, uintptr_t, void*, void*, uint32_t, uint32_t);
+typedef void* (*pFEpiiiiu_t)(x64emu_t*, void*, int32_t, int32_t, int32_t, int32_t, uint32_t);
 typedef void* (*pFEpLiiii_t)(x64emu_t*, void*, uintptr_t, int32_t, int32_t, int32_t, int32_t);
 typedef void* (*pFEpLiiiI_t)(x64emu_t*, void*, uintptr_t, int32_t, int32_t, int32_t, int64_t);
 typedef void (*vFiiiiuuip_t)(int32_t, int32_t, int32_t, int32_t, uint32_t, uint32_t, int32_t, void*);
@@ -1236,6 +1251,7 @@ void vFff_32(x64emu_t *emu, uintptr_t fcn) { vFff_t fn = (vFff_t)fcn; fn(from_pt
 void vFdd_32(x64emu_t *emu, uintptr_t fcn) { vFdd_t fn = (vFdd_t)fcn; fn(from_ptri(double, R_ESP + 4), from_ptri(double, R_ESP + 12)); }
 void vFlu_32(x64emu_t *emu, uintptr_t fcn) { vFlu_t fn = (vFlu_t)fcn; fn(to_long(from_ptri(long_t, R_ESP + 4)), from_ptri(uint32_t, R_ESP + 8)); }
 void vFlp_32(x64emu_t *emu, uintptr_t fcn) { vFlp_t fn = (vFlp_t)fcn; fn(to_long(from_ptri(long_t, R_ESP + 4)), from_ptriv(R_ESP + 8)); }
+void vFpi_32(x64emu_t *emu, uintptr_t fcn) { vFpi_t fn = (vFpi_t)fcn; fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8)); }
 void vFpC_32(x64emu_t *emu, uintptr_t fcn) { vFpC_t fn = (vFpC_t)fcn; fn(from_ptriv(R_ESP + 4), from_ptri(uint8_t, R_ESP + 8)); }
 void vFpu_32(x64emu_t *emu, uintptr_t fcn) { vFpu_t fn = (vFpu_t)fcn; fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8)); }
 void vFpl_32(x64emu_t *emu, uintptr_t fcn) { vFpl_t fn = (vFpl_t)fcn; fn(from_ptriv(R_ESP + 4), to_long(from_ptri(long_t, R_ESP + 8))); }
@@ -1289,6 +1305,7 @@ void uFEV_32(x64emu_t *emu, uintptr_t fcn) { uFEV_t fn = (uFEV_t)fcn; R_EAX = (u
 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)); }
 void uFpi_32(x64emu_t *emu, uintptr_t fcn) { uFpi_t fn = (uFpi_t)fcn; R_EAX = (uint32_t)fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8)); }
+void uFpu_32(x64emu_t *emu, uintptr_t fcn) { uFpu_t fn = (uFpu_t)fcn; R_EAX = (uint32_t)fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8)); }
 void uFpp_32(x64emu_t *emu, uintptr_t fcn) { uFpp_t fn = (uFpp_t)fcn; R_EAX = (uint32_t)fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8)); }
 void uFpa_32(x64emu_t *emu, uintptr_t fcn) { uFpa_t fn = (uFpa_t)fcn; R_EAX = (uint32_t)fn(from_ptriv(R_ESP + 4), from_locale(from_ptri(ptr_t, R_ESP + 8))); }
 void UFii_32(x64emu_t *emu, uintptr_t fcn) { UFii_t fn = (UFii_t)fcn; ui64_t r; r.u = (uint64_t)fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8)); R_EAX = r.d[0]; R_EDX = r.d[1]; }
@@ -1306,6 +1323,7 @@ void dFdd_32(x64emu_t *emu, uintptr_t fcn) { dFdd_t fn = (dFdd_t)fcn; double db
 void dFdD_32(x64emu_t *emu, uintptr_t fcn) { dFdD_t fn = (dFdD_t)fcn; double db = fn(from_ptri(double, R_ESP + 4), LD2localLD(from_ptrv(R_ESP + 12))); fpu_do_push(emu); ST0val = db; }
 void dFdp_32(x64emu_t *emu, uintptr_t fcn) { dFdp_t fn = (dFdp_t)fcn; double db = fn(from_ptri(double, R_ESP + 4), from_ptriv(R_ESP + 12)); fpu_do_push(emu); ST0val = db; }
 void dFLL_32(x64emu_t *emu, uintptr_t fcn) { dFLL_t fn = (dFLL_t)fcn; double db = fn(to_ulong(from_ptri(ulong_t, R_ESP + 4)), to_ulong(from_ptri(ulong_t, R_ESP + 8))); fpu_do_push(emu); ST0val = db; }
+void dFpp_32(x64emu_t *emu, uintptr_t fcn) { dFpp_t fn = (dFpp_t)fcn; double db = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8)); fpu_do_push(emu); ST0val = db; }
 void lFES_32(x64emu_t *emu, uintptr_t fcn) { lFES_t fn = (lFES_t)fcn; R_EAX = to_long(fn(emu, io_convert32(from_ptriv(R_ESP + 4)))); }
 void lFui_32(x64emu_t *emu, uintptr_t fcn) { lFui_t fn = (lFui_t)fcn; R_EAX = to_long(fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8))); }
 void lFll_32(x64emu_t *emu, uintptr_t fcn) { lFll_t fn = (lFll_t)fcn; R_EAX = to_long(fn(to_long(from_ptri(long_t, R_ESP + 4)), to_long(from_ptri(long_t, R_ESP + 8)))); }
@@ -1351,6 +1369,7 @@ void vFEip_32(x64emu_t *emu, uintptr_t fcn) { vFEip_t fn = (vFEip_t)fcn; fn(emu,
 void vFEpi_32(x64emu_t *emu, uintptr_t fcn) { vFEpi_t fn = (vFEpi_t)fcn; fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8)); }
 void vFEpu_32(x64emu_t *emu, uintptr_t fcn) { vFEpu_t fn = (vFEpu_t)fcn; fn(emu, from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8)); }
 void vFEpp_32(x64emu_t *emu, uintptr_t fcn) { vFEpp_t fn = (vFEpp_t)fcn; fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8)); }
+void vFEpV_32(x64emu_t *emu, uintptr_t fcn) { vFEpV_t fn = (vFEpV_t)fcn; fn(emu, from_ptriv(R_ESP + 4), from_ptrv(R_ESP + 8)); }
 void vFccc_32(x64emu_t *emu, uintptr_t fcn) { vFccc_t fn = (vFccc_t)fcn; fn(from_ptri(int8_t, R_ESP + 4), from_ptri(int8_t, R_ESP + 8), from_ptri(int8_t, R_ESP + 12)); }
 void vFwww_32(x64emu_t *emu, uintptr_t fcn) { vFwww_t fn = (vFwww_t)fcn; fn(from_ptri(int16_t, R_ESP + 4), from_ptri(int16_t, R_ESP + 8), from_ptri(int16_t, R_ESP + 12)); }
 void vFiii_32(x64emu_t *emu, uintptr_t fcn) { vFiii_t fn = (vFiii_t)fcn; fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12)); }
@@ -1474,6 +1493,7 @@ void iFXLp_32(x64emu_t *emu, uintptr_t fcn) { iFXLp_t fn = (iFXLp_t)fcn; R_EAX =
 void iFXpu_32(x64emu_t *emu, uintptr_t fcn) { iFXpu_t fn = (iFXpu_t)fcn; R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12)); }
 void iFXpp_32(x64emu_t *emu, uintptr_t fcn) { iFXpp_t fn = (iFXpp_t)fcn; R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); }
 void IFiIi_32(x64emu_t *emu, uintptr_t fcn) { IFiIi_t fn = (IFiIi_t)fcn; ui64_t r; r.i = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int64_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 16)); R_EAX = r.d[0]; R_EDX = r.d[1]; }
+void IFpIi_32(x64emu_t *emu, uintptr_t fcn) { IFpIi_t fn = (IFpIi_t)fcn; ui64_t r; r.i = fn(from_ptriv(R_ESP + 4), from_ptri(int64_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 16)); R_EAX = r.d[0]; R_EDX = r.d[1]; }
 void CFipp_32(x64emu_t *emu, uintptr_t fcn) { CFipp_t fn = (CFipp_t)fcn; R_EAX = (unsigned char)fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); }
 void CFuUu_32(x64emu_t *emu, uintptr_t fcn) { CFuUu_t fn = (CFuUu_t)fcn; R_EAX = (unsigned char)fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(uint64_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 16)); }
 void CFuff_32(x64emu_t *emu, uintptr_t fcn) { CFuff_t fn = (CFuff_t)fcn; R_EAX = (unsigned char)fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(float, R_ESP + 8), from_ptri(float, R_ESP + 12)); }
@@ -1485,6 +1505,7 @@ void uFuuu_32(x64emu_t *emu, uintptr_t fcn) { uFuuu_t fn = (uFuuu_t)fcn; R_EAX =
 void uFuup_32(x64emu_t *emu, uintptr_t fcn) { uFuup_t fn = (uFuup_t)fcn; R_EAX = (uint32_t)fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); }
 void uFupp_32(x64emu_t *emu, uintptr_t fcn) { uFupp_t fn = (uFupp_t)fcn; R_EAX = (uint32_t)fn(from_ptri(uint32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); }
 void uFpuU_32(x64emu_t *emu, uintptr_t fcn) { uFpuU_t fn = (uFpuU_t)fcn; R_EAX = (uint32_t)fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(uint64_t, R_ESP + 12)); }
+void uFppu_32(x64emu_t *emu, uintptr_t fcn) { uFppu_t fn = (uFppu_t)fcn; R_EAX = (uint32_t)fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12)); }
 void fFuii_32(x64emu_t *emu, uintptr_t fcn) { fFuii_t fn = (fFuii_t)fcn; float fl = fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12)); fpu_do_push(emu); ST0val = fl; }
 void fFfff_32(x64emu_t *emu, uintptr_t fcn) { fFfff_t fn = (fFfff_t)fcn; float fl = fn(from_ptri(float, R_ESP + 4), from_ptri(float, R_ESP + 8), from_ptri(float, R_ESP + 12)); fpu_do_push(emu); ST0val = fl; }
 void fFffp_32(x64emu_t *emu, uintptr_t fcn) { fFffp_t fn = (fFffp_t)fcn; float fl = fn(from_ptri(float, R_ESP + 4), from_ptri(float, R_ESP + 8), from_ptriv(R_ESP + 12)); fpu_do_push(emu); ST0val = fl; }
@@ -1493,10 +1514,12 @@ void dFddp_32(x64emu_t *emu, uintptr_t fcn) { dFddp_t fn = (dFddp_t)fcn; double
 void lFipL_32(x64emu_t *emu, uintptr_t fcn) { lFipL_t fn = (lFipL_t)fcn; R_EAX = to_long(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)))); }
 void lFlpi_32(x64emu_t *emu, uintptr_t fcn) { lFlpi_t fn = (lFlpi_t)fcn; R_EAX = to_long(fn(to_long(from_ptri(long_t, R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); }
 void lFpLL_32(x64emu_t *emu, uintptr_t fcn) { lFpLL_t fn = (lFpLL_t)fcn; R_EAX = to_long(fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_ulong(from_ptri(ulong_t, R_ESP + 12)))); }
+void lFppi_32(x64emu_t *emu, uintptr_t fcn) { lFppi_t fn = (lFppi_t)fcn; R_EAX = to_long(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); }
 void lFppL_32(x64emu_t *emu, uintptr_t fcn) { lFppL_t fn = (lFppL_t)fcn; R_EAX = to_long(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)))); }
 void LFEpi_32(x64emu_t *emu, uintptr_t fcn) { LFEpi_t fn = (LFEpi_t)fcn; R_EAX = to_ulong(fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8))); }
 void LFpii_32(x64emu_t *emu, uintptr_t fcn) { LFpii_t fn = (LFpii_t)fcn; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); }
 void LFpip_32(x64emu_t *emu, uintptr_t fcn) { LFpip_t fn = (LFpip_t)fcn; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12))); }
+void LFppi_32(x64emu_t *emu, uintptr_t fcn) { LFppi_t fn = (LFppi_t)fcn; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); }
 void LFppL_32(x64emu_t *emu, uintptr_t fcn) { LFppL_t fn = (LFppL_t)fcn; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)))); }
 void LFXCi_32(x64emu_t *emu, uintptr_t fcn) { LFXCi_t fn = (LFXCi_t)fcn; R_EAX = to_ulong(fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptri(uint8_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); }
 void LFXpi_32(x64emu_t *emu, uintptr_t fcn) { LFXpi_t fn = (LFXpi_t)fcn; R_EAX = to_ulong(fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); }
@@ -1509,7 +1532,9 @@ void pFEXp_32(x64emu_t *emu, uintptr_t fcn) { pFEXp_t fn = (pFEXp_t)fcn; R_EAX =
 void pFipi_32(x64emu_t *emu, uintptr_t fcn) { pFipi_t fn = (pFipi_t)fcn; R_EAX = to_ptrv(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); }
 void pFipL_32(x64emu_t *emu, uintptr_t fcn) { pFipL_t fn = (pFipL_t)fcn; R_EAX = to_ptrv(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)))); }
 void pFulu_32(x64emu_t *emu, uintptr_t fcn) { pFulu_t fn = (pFulu_t)fcn; R_EAX = to_ptrv(fn(from_ptri(uint32_t, R_ESP + 4), to_long(from_ptri(long_t, R_ESP + 8)), from_ptri(uint32_t, R_ESP + 12))); }
+void pFupi_32(x64emu_t *emu, uintptr_t fcn) { pFupi_t fn = (pFupi_t)fcn; R_EAX = to_ptrv(fn(from_ptri(uint32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); }
 void pFupp_32(x64emu_t *emu, uintptr_t fcn) { pFupp_t fn = (pFupp_t)fcn; R_EAX = to_ptrv(fn(from_ptri(uint32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12))); }
+void pFLpi_32(x64emu_t *emu, uintptr_t fcn) { pFLpi_t fn = (pFLpi_t)fcn; R_EAX = to_ptrv(fn(to_ulong(from_ptri(ulong_t, R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); }
 void pFpii_32(x64emu_t *emu, uintptr_t fcn) { pFpii_t fn = (pFpii_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); }
 void pFpiu_32(x64emu_t *emu, uintptr_t fcn) { pFpiu_t fn = (pFpiu_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12))); }
 void pFpiL_32(x64emu_t *emu, uintptr_t fcn) { pFpiL_t fn = (pFpiL_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)))); }
@@ -1559,6 +1584,7 @@ void vFiIII_32(x64emu_t *emu, uintptr_t fcn) { vFiIII_t fn = (vFiIII_t)fcn; fn(f
 void vFiuip_32(x64emu_t *emu, uintptr_t fcn) { vFiuip_t fn = (vFiuip_t)fcn; fn(from_ptri(int32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); }
 void vFiuuu_32(x64emu_t *emu, uintptr_t fcn) { vFiuuu_t fn = (vFiuuu_t)fcn; fn(from_ptri(int32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), from_ptri(uint32_t, R_ESP + 16)); }
 void vFiulp_32(x64emu_t *emu, uintptr_t fcn) { vFiulp_t fn = (vFiulp_t)fcn; fn(from_ptri(int32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), to_long(from_ptri(long_t, R_ESP + 12)), from_ptriv(R_ESP + 16)); }
+void vFiupV_32(x64emu_t *emu, uintptr_t fcn) { vFiupV_t fn = (vFiupV_t)fcn; fn(from_ptri(int32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptrv(R_ESP + 16)); }
 void vFiUUU_32(x64emu_t *emu, uintptr_t fcn) { vFiUUU_t fn = (vFiUUU_t)fcn; fn(from_ptri(int32_t, R_ESP + 4), from_ptri(uint64_t, R_ESP + 8), from_ptri(uint64_t, R_ESP + 16), from_ptri(uint64_t, R_ESP + 24)); }
 void vFifff_32(x64emu_t *emu, uintptr_t fcn) { vFifff_t fn = (vFifff_t)fcn; fn(from_ptri(int32_t, R_ESP + 4), from_ptri(float, R_ESP + 8), from_ptri(float, R_ESP + 12), from_ptri(float, R_ESP + 16)); }
 void vFiddd_32(x64emu_t *emu, uintptr_t fcn) { vFiddd_t fn = (vFiddd_t)fcn; fn(from_ptri(int32_t, R_ESP + 4), from_ptri(double, R_ESP + 8), from_ptri(double, R_ESP + 16), from_ptri(double, R_ESP + 24)); }
@@ -1810,6 +1836,7 @@ void vFpilpp_32(x64emu_t *emu, uintptr_t fcn) { vFpilpp_t fn = (vFpilpp_t)fcn; f
 void vFpipiu_32(x64emu_t *emu, uintptr_t fcn) { vFpipiu_t fn = (vFpipiu_t)fcn; fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(uint32_t, R_ESP + 20)); }
 void vFpuipp_32(x64emu_t *emu, uintptr_t fcn) { vFpuipp_t fn = (vFpuipp_t)fcn; fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20)); }
 void vFpddii_32(x64emu_t *emu, uintptr_t fcn) { vFpddii_t fn = (vFpddii_t)fcn; fn(from_ptriv(R_ESP + 4), from_ptri(double, R_ESP + 8), from_ptri(double, R_ESP + 16), from_ptri(int32_t, R_ESP + 24), from_ptri(int32_t, R_ESP + 28)); }
+void vFppWui_32(x64emu_t *emu, uintptr_t fcn) { vFppWui_t fn = (vFppWui_t)fcn; fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint16_t, R_ESP + 12), from_ptri(uint32_t, R_ESP + 16), from_ptri(int32_t, R_ESP + 20)); }
 void vFpppii_32(x64emu_t *emu, uintptr_t fcn) { vFpppii_t fn = (vFpppii_t)fcn; fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(int32_t, R_ESP + 20)); }
 void vFppppu_32(x64emu_t *emu, uintptr_t fcn) { vFppppu_t fn = (vFppppu_t)fcn; fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_ptri(uint32_t, R_ESP + 20)); }
 void vFppppp_32(x64emu_t *emu, uintptr_t fcn) { vFppppp_t fn = (vFppppp_t)fcn; fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20)); }
@@ -1944,12 +1971,14 @@ void iFXiippp_32(x64emu_t *emu, uintptr_t fcn) { iFXiippp_t fn = (iFXiippp_t)fcn
 void iFXLiiiL_32(x64emu_t *emu, uintptr_t fcn) { iFXLiiiL_t fn = (iFXLiiiL_t)fcn; R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(int32_t, R_ESP + 20), to_ulong(from_ptri(ulong_t, R_ESP + 24))); }
 void iFXLpppp_32(x64emu_t *emu, uintptr_t fcn) { iFXLpppp_t fn = (iFXLpppp_t)fcn; R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20), from_ptriv(R_ESP + 24)); }
 void iFXpIppp_32(x64emu_t *emu, uintptr_t fcn) { iFXpIppp_t fn = (iFXpIppp_t)fcn; R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptri(int64_t, R_ESP + 12), from_ptriv(R_ESP + 20), from_ptriv(R_ESP + 24), from_ptriv(R_ESP + 28)); }
+void uFEpippi_32(x64emu_t *emu, uintptr_t fcn) { uFEpippi_t fn = (uFEpippi_t)fcn; R_EAX = (uint32_t)fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_ptri(int32_t, R_ESP + 20)); }
 void uFupuufp_32(x64emu_t *emu, uintptr_t fcn) { uFupuufp_t fn = (uFupuufp_t)fcn; R_EAX = (uint32_t)fn(from_ptri(uint32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), from_ptri(uint32_t, R_ESP + 16), from_ptri(float, R_ESP + 20), from_ptriv(R_ESP + 24)); }
 void lFipLipu_32(x64emu_t *emu, uintptr_t fcn) { lFipLipu_t fn = (lFipLipu_t)fcn; R_EAX = to_long(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptri(int32_t, R_ESP + 16), from_ptriv(R_ESP + 20), from_ptri(uint32_t, R_ESP + 24))); }
 void lFipLipp_32(x64emu_t *emu, uintptr_t fcn) { lFipLipp_t fn = (lFipLipp_t)fcn; R_EAX = to_long(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptri(int32_t, R_ESP + 16), from_ptriv(R_ESP + 20), from_ptriv(R_ESP + 24))); }
 void pFEpiiuu_32(x64emu_t *emu, uintptr_t fcn) { pFEpiiuu_t fn = (pFEpiiuu_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(uint32_t, R_ESP + 16), from_ptri(uint32_t, R_ESP + 20))); }
 void pFEpLLiN_32(x64emu_t *emu, uintptr_t fcn) { pFEpLLiN_t fn = (pFEpLLiN_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptri(int32_t, R_ESP + 16), from_ptriv(R_ESP + 20))); }
 void pFEppLLp_32(x64emu_t *emu, uintptr_t fcn) { pFEppLLp_t fn = (pFEppLLp_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)), to_ulong(from_ptri(ulong_t, R_ESP + 16)), from_ptriv(R_ESP + 20))); }
+void pFWCiWCi_32(x64emu_t *emu, uintptr_t fcn) { pFWCiWCi_t fn = (pFWCiWCi_t)fcn; R_EAX = to_ptrv(fn(from_ptri(uint16_t, R_ESP + 4), from_ptri(uint8_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(uint16_t, R_ESP + 16), from_ptri(uint8_t, R_ESP + 20), from_ptri(int32_t, R_ESP + 24))); }
 void pFpiiiiu_32(x64emu_t *emu, uintptr_t fcn) { pFpiiiiu_t fn = (pFpiiiiu_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(int32_t, R_ESP + 20), from_ptri(uint32_t, R_ESP + 24))); }
 void vFiiiiiip_32(x64emu_t *emu, uintptr_t fcn) { vFiiiiiip_t fn = (vFiiiiiip_t)fcn; fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(int32_t, R_ESP + 20), from_ptri(int32_t, R_ESP + 24), from_ptriv(R_ESP + 28)); }
 void vFiiiiuup_32(x64emu_t *emu, uintptr_t fcn) { vFiiiiuup_t fn = (vFiiiiuup_t)fcn; fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(uint32_t, R_ESP + 20), from_ptri(uint32_t, R_ESP + 24), from_ptriv(R_ESP + 28)); }
@@ -2011,6 +2040,7 @@ void iFpupLpLi_32(x64emu_t *emu, uintptr_t fcn) { iFpupLpLi_t fn = (iFpupLpLi_t)
 void iFXiuLiii_32(x64emu_t *emu, uintptr_t fcn) { iFXiuLiii_t fn = (iFXiuLiii_t)fcn; R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptri(int32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), to_ulong(from_ptri(ulong_t, R_ESP + 16)), from_ptri(int32_t, R_ESP + 20), from_ptri(int32_t, R_ESP + 24), from_ptri(int32_t, R_ESP + 28)); }
 void uFuippppp_32(x64emu_t *emu, uintptr_t fcn) { uFuippppp_t fn = (uFuippppp_t)fcn; R_EAX = (uint32_t)fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20), from_ptriv(R_ESP + 24), from_ptriv(R_ESP + 28)); }
 void LFXLLppuu_32(x64emu_t *emu, uintptr_t fcn) { LFXLLppuu_t fn = (LFXLLppuu_t)fcn; R_EAX = to_ulong(fn(getDisplay(from_ptriv(R_ESP + 4)), to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20), from_ptri(uint32_t, R_ESP + 24), from_ptri(uint32_t, R_ESP + 28))); }
+void pFEpiiiiu_32(x64emu_t *emu, uintptr_t fcn) { pFEpiiiiu_t fn = (pFEpiiiiu_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(int32_t, R_ESP + 20), from_ptri(uint32_t, R_ESP + 24))); }
 void pFEpLiiii_32(x64emu_t *emu, uintptr_t fcn) { pFEpLiiii_t fn = (pFEpLiiii_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(int32_t, R_ESP + 20), from_ptri(int32_t, R_ESP + 24))); }
 void pFEpLiiiI_32(x64emu_t *emu, uintptr_t fcn) { pFEpLiiiI_t fn = (pFEpLiiiI_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(int32_t, R_ESP + 20), from_ptri(int64_t, R_ESP + 24))); }
 void vFiiiiuuip_32(x64emu_t *emu, uintptr_t fcn) { vFiiiiuuip_t fn = (vFiiiiuuip_t)fcn; fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(uint32_t, R_ESP + 20), from_ptri(uint32_t, R_ESP + 24), from_ptri(int32_t, R_ESP + 28), from_ptriv(R_ESP + 32)); }
@@ -2195,6 +2225,7 @@ int isRetX87Wrapper32(wrapper_t fun) {
 	if (fun == &dFdD_32) return 1;
 	if (fun == &dFdp_32) return 1;
 	if (fun == &dFLL_32) return 1;
+	if (fun == &dFpp_32) return 1;
 	if (fun == &fFpBp__32) return 1;
 	if (fun == &dFpBp__32) return 1;
 	if (fun == &fFuii_32) return 1;
diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h
index 28822773..c040c523 100644
--- a/src/wrapped32/generated/wrapper32.h
+++ b/src/wrapped32/generated/wrapper32.h
@@ -148,6 +148,7 @@ void vFff_32(x64emu_t *emu, uintptr_t fnc);
 void vFdd_32(x64emu_t *emu, uintptr_t fnc);
 void vFlu_32(x64emu_t *emu, uintptr_t fnc);
 void vFlp_32(x64emu_t *emu, uintptr_t fnc);
+void vFpi_32(x64emu_t *emu, uintptr_t fnc);
 void vFpC_32(x64emu_t *emu, uintptr_t fnc);
 void vFpu_32(x64emu_t *emu, uintptr_t fnc);
 void vFpl_32(x64emu_t *emu, uintptr_t fnc);
@@ -201,6 +202,7 @@ void uFEV_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);
 void uFpi_32(x64emu_t *emu, uintptr_t fnc);
+void uFpu_32(x64emu_t *emu, uintptr_t fnc);
 void uFpp_32(x64emu_t *emu, uintptr_t fnc);
 void uFpa_32(x64emu_t *emu, uintptr_t fnc);
 void UFii_32(x64emu_t *emu, uintptr_t fnc);
@@ -218,6 +220,7 @@ void dFdd_32(x64emu_t *emu, uintptr_t fnc);
 void dFdD_32(x64emu_t *emu, uintptr_t fnc);
 void dFdp_32(x64emu_t *emu, uintptr_t fnc);
 void dFLL_32(x64emu_t *emu, uintptr_t fnc);
+void dFpp_32(x64emu_t *emu, uintptr_t fnc);
 void lFES_32(x64emu_t *emu, uintptr_t fnc);
 void lFui_32(x64emu_t *emu, uintptr_t fnc);
 void lFll_32(x64emu_t *emu, uintptr_t fnc);
@@ -263,6 +266,7 @@ void vFEip_32(x64emu_t *emu, uintptr_t fnc);
 void vFEpi_32(x64emu_t *emu, uintptr_t fnc);
 void vFEpu_32(x64emu_t *emu, uintptr_t fnc);
 void vFEpp_32(x64emu_t *emu, uintptr_t fnc);
+void vFEpV_32(x64emu_t *emu, uintptr_t fnc);
 void vFccc_32(x64emu_t *emu, uintptr_t fnc);
 void vFwww_32(x64emu_t *emu, uintptr_t fnc);
 void vFiii_32(x64emu_t *emu, uintptr_t fnc);
@@ -386,6 +390,7 @@ void iFXLp_32(x64emu_t *emu, uintptr_t fnc);
 void iFXpu_32(x64emu_t *emu, uintptr_t fnc);
 void iFXpp_32(x64emu_t *emu, uintptr_t fnc);
 void IFiIi_32(x64emu_t *emu, uintptr_t fnc);
+void IFpIi_32(x64emu_t *emu, uintptr_t fnc);
 void CFipp_32(x64emu_t *emu, uintptr_t fnc);
 void CFuUu_32(x64emu_t *emu, uintptr_t fnc);
 void CFuff_32(x64emu_t *emu, uintptr_t fnc);
@@ -397,6 +402,7 @@ void uFuuu_32(x64emu_t *emu, uintptr_t fnc);
 void uFuup_32(x64emu_t *emu, uintptr_t fnc);
 void uFupp_32(x64emu_t *emu, uintptr_t fnc);
 void uFpuU_32(x64emu_t *emu, uintptr_t fnc);
+void uFppu_32(x64emu_t *emu, uintptr_t fnc);
 void fFuii_32(x64emu_t *emu, uintptr_t fnc);
 void fFfff_32(x64emu_t *emu, uintptr_t fnc);
 void fFffp_32(x64emu_t *emu, uintptr_t fnc);
@@ -405,10 +411,12 @@ void dFddp_32(x64emu_t *emu, uintptr_t fnc);
 void lFipL_32(x64emu_t *emu, uintptr_t fnc);
 void lFlpi_32(x64emu_t *emu, uintptr_t fnc);
 void lFpLL_32(x64emu_t *emu, uintptr_t fnc);
+void lFppi_32(x64emu_t *emu, uintptr_t fnc);
 void lFppL_32(x64emu_t *emu, uintptr_t fnc);
 void LFEpi_32(x64emu_t *emu, uintptr_t fnc);
 void LFpii_32(x64emu_t *emu, uintptr_t fnc);
 void LFpip_32(x64emu_t *emu, uintptr_t fnc);
+void LFppi_32(x64emu_t *emu, uintptr_t fnc);
 void LFppL_32(x64emu_t *emu, uintptr_t fnc);
 void LFXCi_32(x64emu_t *emu, uintptr_t fnc);
 void LFXpi_32(x64emu_t *emu, uintptr_t fnc);
@@ -421,7 +429,9 @@ void pFEXp_32(x64emu_t *emu, uintptr_t fnc);
 void pFipi_32(x64emu_t *emu, uintptr_t fnc);
 void pFipL_32(x64emu_t *emu, uintptr_t fnc);
 void pFulu_32(x64emu_t *emu, uintptr_t fnc);
+void pFupi_32(x64emu_t *emu, uintptr_t fnc);
 void pFupp_32(x64emu_t *emu, uintptr_t fnc);
+void pFLpi_32(x64emu_t *emu, uintptr_t fnc);
 void pFpii_32(x64emu_t *emu, uintptr_t fnc);
 void pFpiu_32(x64emu_t *emu, uintptr_t fnc);
 void pFpiL_32(x64emu_t *emu, uintptr_t fnc);
@@ -471,6 +481,7 @@ void vFiIII_32(x64emu_t *emu, uintptr_t fnc);
 void vFiuip_32(x64emu_t *emu, uintptr_t fnc);
 void vFiuuu_32(x64emu_t *emu, uintptr_t fnc);
 void vFiulp_32(x64emu_t *emu, uintptr_t fnc);
+void vFiupV_32(x64emu_t *emu, uintptr_t fnc);
 void vFiUUU_32(x64emu_t *emu, uintptr_t fnc);
 void vFifff_32(x64emu_t *emu, uintptr_t fnc);
 void vFiddd_32(x64emu_t *emu, uintptr_t fnc);
@@ -722,6 +733,7 @@ void vFpilpp_32(x64emu_t *emu, uintptr_t fnc);
 void vFpipiu_32(x64emu_t *emu, uintptr_t fnc);
 void vFpuipp_32(x64emu_t *emu, uintptr_t fnc);
 void vFpddii_32(x64emu_t *emu, uintptr_t fnc);
+void vFppWui_32(x64emu_t *emu, uintptr_t fnc);
 void vFpppii_32(x64emu_t *emu, uintptr_t fnc);
 void vFppppu_32(x64emu_t *emu, uintptr_t fnc);
 void vFppppp_32(x64emu_t *emu, uintptr_t fnc);
@@ -856,12 +868,14 @@ void iFXiippp_32(x64emu_t *emu, uintptr_t fnc);
 void iFXLiiiL_32(x64emu_t *emu, uintptr_t fnc);
 void iFXLpppp_32(x64emu_t *emu, uintptr_t fnc);
 void iFXpIppp_32(x64emu_t *emu, uintptr_t fnc);
+void uFEpippi_32(x64emu_t *emu, uintptr_t fnc);
 void uFupuufp_32(x64emu_t *emu, uintptr_t fnc);
 void lFipLipu_32(x64emu_t *emu, uintptr_t fnc);
 void lFipLipp_32(x64emu_t *emu, uintptr_t fnc);
 void pFEpiiuu_32(x64emu_t *emu, uintptr_t fnc);
 void pFEpLLiN_32(x64emu_t *emu, uintptr_t fnc);
 void pFEppLLp_32(x64emu_t *emu, uintptr_t fnc);
+void pFWCiWCi_32(x64emu_t *emu, uintptr_t fnc);
 void pFpiiiiu_32(x64emu_t *emu, uintptr_t fnc);
 void vFiiiiiip_32(x64emu_t *emu, uintptr_t fnc);
 void vFiiiiuup_32(x64emu_t *emu, uintptr_t fnc);
@@ -923,6 +937,7 @@ void iFpupLpLi_32(x64emu_t *emu, uintptr_t fnc);
 void iFXiuLiii_32(x64emu_t *emu, uintptr_t fnc);
 void uFuippppp_32(x64emu_t *emu, uintptr_t fnc);
 void LFXLLppuu_32(x64emu_t *emu, uintptr_t fnc);
+void pFEpiiiiu_32(x64emu_t *emu, uintptr_t fnc);
 void pFEpLiiii_32(x64emu_t *emu, uintptr_t fnc);
 void pFEpLiiiI_32(x64emu_t *emu, uintptr_t fnc);
 void vFiiiiuuip_32(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped32/wrappedsdl2.c b/src/wrapped32/wrappedsdl2.c
index 0914f7d1..bf444cff 100644
--- a/src/wrapped32/wrappedsdl2.c
+++ b/src/wrapped32/wrappedsdl2.c
@@ -17,6 +17,9 @@
 #include "librarian.h"
 #include "box32context.h"
 #include "emu/x64emu_private.h"
+#include "myalign32.h"
+#include "gltools.h"
+#include "sdl2rwops.h"
 
 #include "x64trace.h"
 #include "threads.h"
@@ -38,7 +41,7 @@ typedef struct {
     void* userdata;
 } SDL2_AudioSpec;
 
-typedef struct {
+typedef struct __attribute__((packed)) {
     int32_t freq;
     uint16_t format;
     uint8_t channels;
@@ -50,7 +53,11 @@ typedef struct {
     ptr_t userdata; // void *userdata;
 } SDL2_AudioSpec32;
 
-#define ADDED_FUNCTIONS()
+typedef void (*vFiupV_t)(int, uint32_t, void*, va_list);
+#define ADDED_FUNCTIONS()         \
+    GO(SDL_LogMessageV, vFiupV_t) \
+    GO(SDL_AllocRW, sdl2_allocrw) \
+    GO(SDL_FreeRW, sdl2_freerw)
 
 #define ADDED_FINI()
 
@@ -117,10 +124,10 @@ EXPORT int my32_2_SDL_OpenAudio(x64emu_t* emu, void* d, void* o)
     desired.userdata = from_ptrv(d_->userdata);
     desired.callback = find_AudioCallback_Fct(from_ptrv(d_->callback));
     int ret = my->SDL_OpenAudio(&desired, &output);
-    if (ret != 0) {
+    if (ret <= 0) {
         return ret;
     }
-    // put back stuff in place?
+
     if (o) {
         SDL2_AudioSpec32* o_ = o;
         o_->channels = output.channels;
@@ -130,11 +137,44 @@ EXPORT int my32_2_SDL_OpenAudio(x64emu_t* emu, void* d, void* o)
         o_->padding = output.padding;
         o_->silence = output.silence;
         o_->size = output.size;
-        o_->userdata = o_->callback = 0;
+        o_->userdata = to_ptrv(output.userdata);
+        o_->callback = to_ptrv(output.callback);
     }
     return ret;
 }
 
+EXPORT uint32_t my32_2_SDL_OpenAudioDevice(x64emu_t* emu, void* device, int iscapture, void* d, void* o, int allowed)
+{
+    SDL2_AudioSpec desired = { 0 };
+    SDL2_AudioSpec output = { 0 };
+    SDL2_AudioSpec32* d_ = d;
+    desired.channels = d_->channels;
+    desired.format = d_->format;
+    desired.freq = d_->freq;
+    desired.samples = d_->samples;
+    desired.padding = d_->padding;
+    desired.silence = d_->silence;
+    desired.size = d_->size;
+    desired.userdata = from_ptrv(d_->userdata);
+    desired.callback = find_AudioCallback_Fct(from_ptrv(d_->callback));
+    uint32_t ret = my->SDL_OpenAudioDevice(device, iscapture, &desired, &output, allowed);
+
+    if (o) {
+        SDL2_AudioSpec32* o_ = o;
+        o_->channels = output.channels;
+        o_->format = output.format;
+        o_->freq = output.freq;
+        o_->samples = output.samples;
+        o_->padding = output.padding;
+        o_->silence = output.silence;
+        o_->size = output.size;
+        o_->userdata = to_ptrv(output.userdata);
+        o_->callback = to_ptrv(output.callback);
+    }
+    return ret;
+}
+
+
 EXPORT int my32_2_SDL_PollEvent(my_SDL2_Event_32_t* evt)
 {
     my_SDL2_Event_t event;
@@ -145,6 +185,91 @@ EXPORT int my32_2_SDL_PollEvent(my_SDL2_Event_32_t* evt)
     return ret;
 }
 
+EXPORT char* my32_2_SDL_GetBasePath(x64emu_t* emu)
+{
+    char* p = strdup(emu->context->fullpath);
+    char* b = strrchr(p, '/');
+    if (b) *(b + 1) = '\0';
+    return p;
+}
+
+EXPORT void my32_2_SDL_Log(x64emu_t* emu, void* fmt, void* b)
+{
+    myStackAlign32((const char*)fmt, (uint32_t*)b, emu->scratch);
+    PREPARE_VALIST_32;
+    my->SDL_LogMessageV(0, 3, fmt, VARARGS_32);
+}
+
+EXPORT int my32_2_SDL_vsnprintf(x64emu_t* emu, void* buff, size_t s, void* fmt, void* b)
+{
+    myStackAlign32((const char*)fmt, (uint32_t*)b, emu->scratch);
+    PREPARE_VALIST_32;
+    int r = vsnprintf(buff, s, fmt, VARARGS_32);
+    return r;
+}
+
+EXPORT int my32_2_SDL_snprintf(x64emu_t* emu, void* buff, size_t s, void* fmt, uint64_t* b)
+{
+    (void)emu;
+    myStackAlign32((const char*)fmt, (uint32_t*)b, emu->scratch);
+    PREPARE_VALIST_32;
+    return vsnprintf(buff, s, fmt, VARARGS_32);
+}
+
+EXPORT void* my32_2_SDL_GL_GetProcAddress(x64emu_t* emu, void* name)
+{
+    khint_t k;
+    const char* rname = (const char*)name;
+    return getGLProcAddress32(emu, (glprocaddress_t)my->SDL_GL_GetProcAddress, rname);
+}
+
+EXPORT void* my32_2_SDL_CreateRGBSurfaceWithFormatFrom(x64emu_t* emu, void* pixels, int width, int height, int depth, int pitch, uint32_t format)
+{
+    void* p = my->SDL_CreateRGBSurfaceWithFormatFrom(pixels, width, height, depth, pitch, format);
+    inplace_SDL2_Surface_to_32(p);
+    return p;
+}
+
+EXPORT void my32_2_SDL_SetWindowIcon(x64emu_t* emu, void* window, void* icon)
+{
+    inplace_SDL2_Surface_to_64(icon);
+    my->SDL_SetWindowIcon(window, icon);
+    inplace_SDL2_Surface_to_32(icon);
+}
+
+EXPORT void my32_2_SDL_FreeSurface(x64emu_t* emu, void* surface)
+{
+    inplace_SDL2_Surface_to_64(surface);
+    my->SDL_FreeSurface(surface);
+}
+
+void* my32_prepare_thread(x64emu_t* emu, void* f, void* arg, int ssize, void** pet);
+EXPORT void* my32_2_SDL_CreateThread(x64emu_t* emu, void* f, void* n, void* p)
+{
+    void* et = NULL;
+    void* fnc = my32_prepare_thread(emu, f, p, 0, &et);
+    return my->SDL_CreateThread(fnc, n, et);
+}
+
+EXPORT void* my32_2_SDL_RWFromFile(x64emu_t* emu, void* a, void* b)
+{
+    SDL2_RWops_t* r = (SDL2_RWops_t*)my->SDL_RWFromFile(a, b);
+    void* ret = AddNativeRW2(emu, r);
+    inplace_SDL2_RWops_to_32(ret);
+    return ret;
+}
+
 #define ALTMY my32_2_
 
+#define CUSTOM_INIT                       \
+    box64->sdl2allocrw = my->SDL_AllocRW; \
+    box64->sdl2freerw = my->SDL_FreeRW;
+
+#define NEEDED_LIBS "libdl.so.2", "libm.so.6", "librt.so.1", "libpthread.so.0"
+
+#define CUSTOM_FINI                 \
+    my_context->sdl2allocrw = NULL; \
+    my_context->sdl2freerw = NULL;
+
+
 #include "wrappedlib_init32.h"
\ No newline at end of file
diff --git a/src/wrapped32/wrappedsdl2_private.h b/src/wrapped32/wrappedsdl2_private.h
index cb423016..684141b4 100644
--- a/src/wrapped32/wrappedsdl2_private.h
+++ b/src/wrapped32/wrappedsdl2_private.h
@@ -16,14 +16,14 @@
 // GO(SDL_AllocFormat, pFu)
 // GO(SDL_AllocPalette, pFi)
 // GO(SDL_AllocRW, pFv)    // no need to create a "my_" probably
-// GO(SDL_asin, dFd)
-// GO(SDL_asinf, fFf)
-// GO(SDL_atan, dFd)
-// GO(SDL_atan2, dFdd)
-// GO(SDL_atan2f, fFff)
-// GO(SDL_atanf, fFf)
-// GO(SDL_atof, dFp)
-// GO(SDL_atoi, iFp)
+GO(SDL_asin, dFd)
+GO(SDL_asinf, fFf)
+GO(SDL_atan, dFd)
+GO(SDL_atan2, dFdd)
+GO(SDL_atan2f, fFff)
+GO(SDL_atanf, fFf)
+GO(SDL_atof, dFp)
+GO(SDL_atoi, iFp)
 // GO(SDL_AtomicAdd, iFpi)
 // GO(SDL_AtomicCAS, uFpii)
 // GO(SDL_AtomicCASPtr, uFppp)
@@ -38,12 +38,12 @@
 GO(SDL_AudioQuit, vFv)
 // GO(SDL_AudioStreamAvailable, iFp)
 // GO(SDL_AudioStreamClear, vFp)
-// GO(SDL_AudioStreamFlush, iFp)
-// GO(SDL_AudioStreamGet, iFppi)
-// GO(SDL_AudioStreamPut, iFppi)
+GO(SDL_AudioStreamFlush, iFp)
+GO(SDL_AudioStreamGet, iFppi)
+GO(SDL_AudioStreamPut, iFppi)
 // GO(SDL_BuildAudioCVT, iFpWCiWCi)
 // GO(SDL_CalculateGammaRamp, vFfp)
-// GO(SDL_calloc, pFLL)
+GO(SDL_calloc, pFLL)
 // GO(SDL_CaptureMouse, iFu)
 // GO(SDL_ceil, dFd)
 // GO(SDL_ceilf, fFf)
@@ -68,19 +68,19 @@ GO(SDL_CloseAudio, vFv)
 // GO(SDL_CreateColorCursor, pFpii)
 // GO(SDL_CreateCond, pFv)
 // GO(SDL_CreateCursor, pFppiiii)
-// GO(SDL_CreateMutex, pFv)
+GO(SDL_CreateMutex, pFv)
 GO(SDL_CreateRenderer, pFpiu)
 // GO(SDL_CreateRGBSurface, pFuiiiuuuu)
 // GO(SDL_CreateRGBSurfaceFrom, pFpiiiiuuuu)
 // GO(SDL_CreateRGBSurfaceWithFormat, pFuiiiu)
-// GO(SDL_CreateRGBSurfaceWithFormatFrom, pFpiiiiu)
+GOM(SDL_CreateRGBSurfaceWithFormatFrom, pFEpiiiiu)
 // GO(SDL_CreateSemaphore, pFu)
 // GO(SDL_CreateShapedWindow, pFpuuuuu)
 // GO(SDL_CreateSoftwareRenderer, pFp)
 // GO(SDL_CreateSystemCursor, pFu)
 GO(SDL_CreateTexture, pFpuiii)
 // GO(SDL_CreateTextureFromSurface, pFpp)
-// GOM(SDL_CreateThread, pFEppp)
+GOM(SDL_CreateThread, pFEppp)
 // SDL_CreateThreadWithStackSize
 GO(SDL_CreateWindow, pFpiiiiu)
 // GO(SDL_CreateWindowAndRenderer, iFiiupp)
@@ -97,7 +97,7 @@ GO(SDL_Delay, vFu)
 // GO(SDL_DestroyWindow, vFp)
 // GO(SDL_DestroyWindowSurface, iFp)
 // GO(SDL_DetachThread, vFp)
-// GO(SDL_DisableScreenSaver, vFv)
+GO(SDL_DisableScreenSaver, vFv)
 // GO(SDL_DuplicateSurface, pFp)
 // GOM(SDL_DYNAPI_entry, iFEupu)
 // GO(SDL_EnableScreenSaver, vFv)
@@ -118,12 +118,12 @@ GO(SDL_Delay, vFu)
 // GO(SDL_fmod, dFdd)
 // GO(SDL_fmodf, fFff)
 GO(SDL_free, vFp)
-// GO(SDL_FreeAudioStream, vFp)
+GO(SDL_FreeAudioStream, vFp)
 // GO(SDL_FreeCursor, vFp)
 // GO(SDL_FreeFormat, vFp)
 // GO(SDL_FreePalette, vFp)
 // GO(SDL_FreeRW, vFp)
-// GO(SDL_FreeSurface, vFp)
+GOM(SDL_FreeSurface, vFEp)
 // GO(SDL_FreeWAV, vFp)
 // GO(SDL_GameControllerAddMapping, iFp)
 // GOM(SDL_GameControllerAddMappingsFromRW, iFEpi)
@@ -182,7 +182,7 @@ GO(SDL_GameControllerEventState, iFi)
 // GO(SDL_GetAudioDriver, pFi)
 // GO(SDL_GetAudioDeviceSpec, iFiip)
 // GO(SDL_GetAudioStatus, uFv)
-// GOM(SDL_GetBasePath, pFEv)
+GOM(SDL_GetBasePath, pFEv)
 // GO(SDL_GetClipboardText, pFv)
 // GO(SDL_GetClipRect, vFpp)
 // GO(SDL_GetClosestDisplayMode, pFipp)
@@ -202,14 +202,14 @@ GOM(SDL_GetDesktopDisplayMode, iFEip)
 // GO(SDL_GetDisplayMode, iFiip)
 // GO(SDL_GetDisplayName, pFi)
 // GO(SDL_GetDisplayOrientation, uFi)
-// GO(SDL_GetDisplayUsableBounds, iFip)
-// GO(SDL_getenv, pFp)
+GO(SDL_GetDisplayUsableBounds, iFip)
+GO(SDL_getenv, pFp)
 // GO(SDL_GetError, pFv)
 // GOM(SDL_GetEventFilter, iFEpp)
 // GO(SDL_GetGlobalMouseState, uFpp)
 // GO(SDL_GetGrabbedWindow, pFv)
 // GO(SDL_GetHint, pFp)
-// GO(SDL_GetHintBoolean, uFpu)
+GO(SDL_GetHintBoolean, uFpu)
 // GOM(SDL_GetJoystickGUIDInfo, vFGpppp)
 // GO(SDL_GetKeyboardFocus, pFv)
 // GO(SDL_GetKeyboardState, pFp)
@@ -241,7 +241,7 @@ GO(SDL_GetMouseState, uFpp)
 // GO(SDL_GetPrimarySelectionText, pFv)
 // GO(SDL_GetQueuedAudioSize, uFu)
 // GO(SDL_GetRectDisplayIndex, iFp)
-// GO(SDL_GetRelativeMouseMode, iFv)
+GO(SDL_GetRelativeMouseMode, iFv)
 // GO(SDL_GetRelativeMouseState, uFpp)
 // GO(SDL_GetRenderDrawBlendMode, iFpp)
 // GO(SDL_GetRenderDrawColor, iFppppp)
@@ -279,7 +279,7 @@ GO(SDL_GetTicks, uFv)
 // GO(SDL_GetWindowData, pFpp)
 // GO(SDL_GetWindowDisplayIndex, iFp)
 // GO(SDL_GetWindowDisplayMode, iFpp)
-// GO(SDL_GetWindowFlags, uFp)
+GO(SDL_GetWindowFlags, uFp)
 // GO(SDL_GetWindowFromID, pFu)
 // GO(SDL_GetWindowGammaRamp, iFpppp)
 // GO(SDL_GetWindowGrab, iFp)
@@ -297,23 +297,23 @@ GO(SDL_GetWindowSize, vFppp)
 // GO(SDL_GetYUVConversionMode, uFv)
 // GO(SDL_GetYUVConversionModeForResolution, uFii)
 // GO(SDL_GL_BindTexture, iFppp)
-// GO(SDL_GL_CreateContext, pFp)
+GO(SDL_GL_CreateContext, pFp)
 // GO(SDL_GL_DeleteContext, vFp)
 // GO(SDL_GL_ExtensionSupported, iFp)
 // GO(SDL_GL_GetAttribute, iFup)
 // GO(SDL_GL_GetCurrentContext, pFv)
 // GO(SDL_GL_GetCurrentWindow, pFv)
-// GO(SDL_GL_GetDrawableSize, vFppp)
-// GOM(SDL_GL_GetProcAddress, pFEp)
-// GO(SDL_GL_GetSwapInterval, iFv)
+GO(SDL_GL_GetDrawableSize, vFppp)
+GOM(SDL_GL_GetProcAddress, pFEp)
+GO(SDL_GL_GetSwapInterval, iFv)
 // GO(SDL_GL_LoadLibrary, iFp)
 // GO(SDL_GL_MakeCurrent, iFpp)
-// GO(SDL_GL_ResetAttributes, vFv)
-// GO(SDL_GL_SetAttribute, iFui)
-// GO(SDL_GL_SetSwapInterval, iFi)
-// GO(SDL_GL_SwapWindow, vFp)
-// GO(SDL_GL_UnbindTexture, iFp)
-// GO(SDL_GL_UnloadLibrary, vFv)
+GO(SDL_GL_ResetAttributes, vFv)
+GO(SDL_GL_SetAttribute, iFui)
+GO(SDL_GL_SetSwapInterval, iFi)
+GO(SDL_GL_SwapWindow, vFp)
+GO(SDL_GL_UnbindTexture, iFp)
+GO(SDL_GL_UnloadLibrary, vFv)
 // GO(SDL_GUIDToString, vFUUpi)
 // GO(SDL_HapticClose, vFp)
 // GO(SDL_HapticDestroyEffect, vFpi)
@@ -371,7 +371,7 @@ GO(SDL_GetWindowSize, vFppp)
 // GO(SDL_iconv_open, pFpp)
 // GO(SDL_iconv_string, pFpppL)
 GO(SDL_Init, iFu)
-// GO(SDL_InitSubSystem, iFu)
+GO(SDL_InitSubSystem, iFu)
 // GO(SDL_IntersectRect, uFppp)
 // GO(SDL_IntersectRectAndLine, uFppppp)
 // GO(SDL_isdigit, iFi)
@@ -381,7 +381,7 @@ GO(SDL_Init, iFu)
 // GO(SDL_IsShapedWindow, uFp)
 // GO(SDL_isspace, iFi)
 // GO(SDL_IsTablet, uFv)
-// GO(SDL_IsTextInputActive, iFv)
+GO(SDL_IsTextInputActive, iFv)
 // GO(SDL_itoa, pFipi)
 // GO(SDL_JoystickAttachVirtualEx, iFp)
 // GO(SDL_JoystickClose, vFp)
@@ -435,14 +435,14 @@ GO(SDL_JoystickEventState, iFi)
 // GOM(SDL_LoadObject, pFEp)
 // GOM(SDL_LoadWAV_RW, pFEpippp)
 GO(SDL_LockAudio, vFv)
-// GO(SDL_LockAudioDevice, vFi)
+GO(SDL_LockAudioDevice, vFi)
 // GO(SDL_LockJoysticks, vFv)
-// GO(SDL_LockMutex, iFp)
+GO(SDL_LockMutex, iFp)
 // GO(SDL_LockSensors, vFv)
 // GO(SDL_LockSurface, iFp)
 // GO(SDL_LockTexture, iFpppp)
 // GO(SDL_log, dFd)
-// GOM(SDL_Log, vFEpV)
+GOM(SDL_Log, vFEpV)
 // GO(SDL_log10, dFd)
 // GO(SDL_log10f, fFf)
 // GOM(SDL_LogCritical, vFEipV)
@@ -453,7 +453,7 @@ GO(SDL_LockAudio, vFv)
 // GO(SDL_LogGetPriority, uFi)
 // GOM(SDL_LogInfo, vFEipV)
 // GO2(SDL_LogMessage, vFiupV, SDL_LogMessageV)
-// GO(SDL_LogMessageV, vFiupV)
+GO(SDL_LogMessageV, vFiupV)
 // GO(SDL_LogResetPriorities, vFv)
 // GO(SDL_LogSetAllPriority, vFu)
 // GOM(SDL_LogSetOutputFunction, vFEpp)
@@ -463,29 +463,29 @@ GO(SDL_LockAudio, vFv)
 // GO(SDL_LowerBlit, iFpppp)
 // GO(SDL_LowerBlitScaled, iFpppp)
 // GO(SDL_ltoa, pFlpi)
-// GO(SDL_malloc, pFL)
+GO(SDL_malloc, pFL)
 // GO(SDL_MapRGB, uFpCCC)
 // GO(SDL_MapRGBA, uFpCCCC)
 // GO(SDL_MasksToPixelFormatEnum, uFiuuuu)
 // GO(SDL_MaximizeWindow, vFp)
-// GO(SDL_memcmp, iFppL)
-// GO(SDL_memcpy, pFppu)
-// GO(SDL_memmove, pFppu)
+GO(SDL_memcmp, iFppL)
+GO(SDL_memcpy, pFppu)
+GO(SDL_memmove, pFppu)
 // GO(SDL_MemoryBarrierAcquireFunction, vFv)
 // GO(SDL_MemoryBarrierReleaseFunction, vFv)
 GO(SDL_memset, pFpiL)
 // GO(SDL_MinimizeWindow, vFp)
 // GO(SDL_MixAudio, vFppui)
-// GO(SDL_MixAudioFormat, vFppWui)
+GO(SDL_MixAudioFormat, vFppWui)
 // GO(SDL_MouseIsHaptic, iFv)
-// GO(SDL_NewAudioStream, pFWCiWCi)
+GO(SDL_NewAudioStream, pFWCiWCi)
 // GO(SDL_NumHaptics, iFv)
 GO(SDL_NumJoysticks, iFv)
 // GO(SDL_NumSensors, iFv)
 GOM(SDL_OpenAudio, iFEpp)
-// GOM(SDL_OpenAudioDevice, iFEpippi)
+GOM(SDL_OpenAudioDevice, uFEpippi)
 GO(SDL_PauseAudio, vFi)
-// GO(SDL_PauseAudioDevice, vFui)
+GO(SDL_PauseAudioDevice, vFui)
 // GO(SDL_PeepEvents, iFpiuuu)
 // GO(SDL_PixelFormatEnumToMasks, uFuppppp)
 GOM(SDL_PollEvent, iFp) //%noE
@@ -506,7 +506,7 @@ GO(SDL_Quit, vFv)
 // GOM(SDL_ReadLE32, uFEp)
 // GOM(SDL_ReadLE64, UFEp)
 // GOM(SDL_ReadU8, uFEp)
-// GO(SDL_realloc, pFpL)
+GO(SDL_realloc, pFpL)
 // GO(SDL_RecordGesture, iFl)
 // GO(SDL_RegisterEvents, uFi)
 // GOM(SDL_RemoveTimer, iFEp)
@@ -557,7 +557,7 @@ GO(SDL_RenderSetLogicalSize, iFpii)
 // GO(SDL_RestoreWindow, vFp)
 // GOM(SDL_RWFromConstMem, pFEpi)
 // GOM(SDL_RWFromFP, pFEpi)
-// GOM(SDL_RWFromFile, pFEpp)
+GOM(SDL_RWFromFile, pFEpp)
 // GOM(SDL_RWFromMem, pFEpi)
 // GOM(SDL_SaveAllDollarTemplates, iFEp)
 // GOM(SDL_SaveBMP_RW, iFEppi)
@@ -588,7 +588,7 @@ GO(SDL_RenderSetLogicalSize, iFpii)
 // GO(SDL_SetClipRect, uFpp)
 // GO(SDL_SetColorKey, iFpiu)
 // GO(SDL_SetCursor, vFp)
-// GO(SDL_setenv, iFppi)
+GO(SDL_setenv, iFppi)
 // GO(SDL_SetError, iFppppp)    // it use ..., so putarbitrary  4 args
 // GOM(SDL_SetEventFilter, vFEpp)
 GO(SDL_SetHint, uFpp)
@@ -614,19 +614,19 @@ GO(SDL_SetRenderDrawColor, iFpCCCC)
 // GO(SDL_SetTextureBlendMode, iFpu)
 // GO(SDL_SetTextureColorMod, iFpCCC)
 // GO(SDL_SetTextureScaleMode, iFpu)
-// GO(SDL_SetThreadPriority, iFu)
+GO(SDL_SetThreadPriority, iFu)
 // GO(SDL_SetWindowBordered, vFpi)
 // GO(SDL_SetWindowBrightness, iFpf)
 // GO(SDL_SetWindowData, pFppp)
 // GO(SDL_SetWindowDisplayMode, iFpp)
-// GO(SDL_SetWindowFullscreen, iFpu)
+GO(SDL_SetWindowFullscreen, iFpu)
 // GO(SDL_SetWindowGammaRamp, iFpppp)
-// GO(SDL_SetWindowGrab, vFpi)
+GO(SDL_SetWindowGrab, vFpi)
 // SDL_SetWindowHitTest
-// GO(SDL_SetWindowIcon, vFpp)
+GOM(SDL_SetWindowIcon, vFEpp)
 // SDL_SetWindowInputFocus
 // GO(SDL_SetWindowMaximumSize, vFpii)
-// GO(SDL_SetWindowMinimumSize, vFpii)
+GO(SDL_SetWindowMinimumSize, vFpii)
 // SDL_SetWindowModalFor
 // SDL_SetWindowOpacity
 // GO(SDL_SetWindowPosition, vFpii)
@@ -638,57 +638,57 @@ GO(SDL_SetRenderDrawColor, iFpCCCC)
 GO(SDL_ShowCursor, iFi)
 // GO(SDL_ShowMessageBox, iFpp)
 // GO(SDL_ShowSimpleMessageBox, iFuppp)
-// GO(SDL_ShowWindow, vFp)
+GO(SDL_ShowWindow, vFp)
 // GO(SDL_SIMDAlloc, pFL)
 // GO(SDL_SIMDGetAlignment, LFv)
 // GO(SDL_SIMDRealloc, pFpL)
 // GO(SDL_SIMDFree, vFp)
-// GO(SDL_sin, dFd)
-// GO(SDL_sinf, fFf)
-// GOM(SDL_snprintf, iFEpLpV)
+GO(SDL_sin, dFd)
+GO(SDL_sinf, fFf)
+GOM(SDL_snprintf, iFEpLpV)
 // GO(SDL_SoftStretch, iFpppp)
-// GO(SDL_sqrt, dFd)
-// GO(SDL_sqrtf, fFf)
-// GO2(SDL_sscanf, iFEppV, my_sscanf)
+GO(SDL_sqrt, dFd)
+GO(SDL_sqrtf, fFf)
+GO2(SDL_sscanf, iFEppV, my_sscanf)
 // GO(SDL_StartTextInput, vFv)
 // GO(SDL_StopTextInput, vFv)
-// GO(SDL_strcasecmp, iFpp)
-// GO(SDL_strchr, pFpi)
-// GO(SDL_strcmp, iFpp)
+GO(SDL_strcasecmp, iFpp)
+GO(SDL_strchr, pFpi)
+GO(SDL_strcmp, iFpp)
 GO(SDL_strdup, pFp)
-// GO(SDL_strlcat, LFppL)
-// GO(SDL_strlcpy, uFppu)
-// GO(SDL_strlen, uFp)
-// GO(SDL_strlwr, pFp)
-// GO(SDL_strncasecmp, iFppL)
-// GO(SDL_strncmp, iFppu)
-// GO(SDL_strrchr, pFpi)
-// GO(SDL_strrev, pFp)
-// GO(SDL_strstr, pFpp)
-// GO(SDL_strtod, dFpp)
-// GO(SDL_strtol, lFppi)
-// GO(SDL_strtoll, lFppi)
-// GO(SDL_strtoul, LFppi)
-// GO(SDL_strtoull, LFppi)
-// GO(SDL_strupr, pFp)
-// GO(SDL_tan, dFd)
-// GO(SDL_tanf, fFf)
+GO(SDL_strlcat, LFppL)
+GO(SDL_strlcpy, uFppu)
+GO(SDL_strlen, uFp)
+GO(SDL_strlwr, pFp)
+GO(SDL_strncasecmp, iFppL)
+GO(SDL_strncmp, iFppu)
+GO(SDL_strrchr, pFpi)
+GO(SDL_strrev, pFp)
+GO(SDL_strstr, pFpp)
+GO(SDL_strtod, dFpp)
+GO(SDL_strtol, lFppi)
+GO(SDL_strtoll, lFppi)
+GO(SDL_strtoul, LFppi)
+GO(SDL_strtoull, LFppi)
+GO(SDL_strupr, pFp)
+GO(SDL_tan, dFd)
+GO(SDL_tanf, fFf)
 // GO(SDL_ThreadID, LFv)
 // GO(SDL_TLSCreate, uFv)
 // GO(SDL_TLSGet, pFu)
 // GOM(SDL_TLSSet, iFEupp)
-// GO(SDL_tolower, iFi)
-// GO(SDL_toupper, iFi)
+GO(SDL_tolower, iFi)
+GO(SDL_toupper, iFi)
 // GO(SDL_TryLockMutex, iFp)
-// GO(SDL_uitoa, pFupi)
-// GO(SDL_ulltoa, pFLpi)
-// GO(SDL_ultoa, pFLpi)
+GO(SDL_uitoa, pFupi)
+GO(SDL_ulltoa, pFLpi)
+GO(SDL_ultoa, pFLpi)
 // GO(SDL_UnionRect, vFppp)
 // GOM(SDL_UnloadObject, vFEp)
 GO(SDL_UnlockAudio, vFv)
-// GO(SDL_UnlockAudioDevice, vFi)
+GO(SDL_UnlockAudioDevice, vFi)
 // GO(SDL_UnlockJoysticks, vFv)
-// GO(SDL_UnlockMutex, iFp)
+GO(SDL_UnlockMutex, iFp)
 // GO(SDL_UnlockSensors, vFv)
 // GO(SDL_UnlockSurface, vFp)
 // GO(SDL_UnlockTexture, vFp)
@@ -702,7 +702,7 @@ GO(SDL_UpdateTexture, iFpppi)
 // SDL_utf8strlen
 // GO(SDL_VideoInit, iFp)
 // GO(SDL_VideoQuit, vFv)
-// GOM(SDL_vsnprintf, iFEpLpp)
+GOM(SDL_vsnprintf, iFEpLpp)
 // SDL_vsscanf
 // GO(SDL_Vulkan_CreateSurface, iFppp)
 // GO(SDL_Vulkan_GetDrawableSize, vFppp)
@@ -738,7 +738,7 @@ GO(SDL_WasInit, uFu)
 // GO2(SDL_mutexP, iFp, SDL_LockMutex)
 // GO2(SDL_mutexV, iFp, SDL_UnlockMutex)
 
-// GO(SDL_doesntexist, IFpIi)
+GO(SDL_doesntexist, IFpIi)
 
 // GOM(SDL_IsJoystickPS4, iFEWW)
 // GOM(SDL_IsJoystickNintendoSwitchPro, iFEWW)